983 lines
36 KiB
Go
983 lines
36 KiB
Go
// Code generated by go-bindata.
|
|
// sources:
|
|
// web/ui/templates/_base.html
|
|
// web/ui/templates/alerts.html
|
|
// web/ui/templates/config.html
|
|
// web/ui/templates/flags.html
|
|
// web/ui/templates/flags.html~
|
|
// web/ui/templates/graph.html
|
|
// web/ui/templates/rules.html
|
|
// web/ui/templates/status.html
|
|
// web/ui/templates/targets.html
|
|
// web/ui/static/css/alerts.css
|
|
// web/ui/static/css/graph.css
|
|
// web/ui/static/css/prom_console.css
|
|
// web/ui/static/css/prometheus.css
|
|
// web/ui/static/img/ajax-loader.gif
|
|
// web/ui/static/js/alerts.js
|
|
// web/ui/static/js/graph.js
|
|
// web/ui/static/js/graph_template.handlebar
|
|
// web/ui/static/js/prom_console.js
|
|
// web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css
|
|
// web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap.min.css
|
|
// web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot
|
|
// web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg
|
|
// web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf
|
|
// web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff
|
|
// web/ui/static/vendor/bootstrap-3.3.1/js/bootstrap.min.js
|
|
// web/ui/static/vendor/bootstrap-3.3.1/js/npm.js
|
|
// web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js
|
|
// web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css
|
|
// web/ui/static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js
|
|
// web/ui/static/vendor/js/handlebars.js
|
|
// web/ui/static/vendor/js/jquery.hotkeys.js
|
|
// web/ui/static/vendor/js/jquery.min.js
|
|
// web/ui/static/vendor/js/jquery.selection.js
|
|
// web/ui/static/vendor/rickshaw/rickshaw.min.css
|
|
// web/ui/static/vendor/rickshaw/rickshaw.min.js
|
|
// web/ui/static/vendor/rickshaw/vendor/d3.layout.min.js
|
|
// web/ui/static/vendor/rickshaw/vendor/d3.v3.js
|
|
// DO NOT EDIT!
|
|
|
|
package ui
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"os"
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
// bindataRead reads the given file from disk. It returns an error on failure.
|
|
func bindataRead(path, name string) ([]byte, error) {
|
|
buf, err := ioutil.ReadFile(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset %s at %s: %v", name, path, err)
|
|
}
|
|
return buf, err
|
|
}
|
|
|
|
type asset struct {
|
|
bytes []byte
|
|
info os.FileInfo
|
|
}
|
|
|
|
// webUiTemplates_baseHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplates_baseHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/_base.html"
|
|
name := "web/ui/templates/_base.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesAlertsHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesAlertsHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/alerts.html"
|
|
name := "web/ui/templates/alerts.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesConfigHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesConfigHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/config.html"
|
|
name := "web/ui/templates/config.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesFlagsHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesFlagsHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/flags.html"
|
|
name := "web/ui/templates/flags.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesFlagsHtml2 reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesFlagsHtml2() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/flags.html~"
|
|
name := "web/ui/templates/flags.html~"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesGraphHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesGraphHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/graph.html"
|
|
name := "web/ui/templates/graph.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesRulesHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesRulesHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/rules.html"
|
|
name := "web/ui/templates/rules.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesStatusHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesStatusHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/status.html"
|
|
name := "web/ui/templates/status.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiTemplatesTargetsHtml reads file data from disk. It returns an error on failure.
|
|
func webUiTemplatesTargetsHtml() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/templates/targets.html"
|
|
name := "web/ui/templates/targets.html"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticCssAlertsCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticCssAlertsCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/css/alerts.css"
|
|
name := "web/ui/static/css/alerts.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticCssGraphCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticCssGraphCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/css/graph.css"
|
|
name := "web/ui/static/css/graph.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticCssProm_consoleCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticCssProm_consoleCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/css/prom_console.css"
|
|
name := "web/ui/static/css/prom_console.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticCssPrometheusCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticCssPrometheusCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/css/prometheus.css"
|
|
name := "web/ui/static/css/prometheus.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticImgAjaxLoaderGif reads file data from disk. It returns an error on failure.
|
|
func webUiStaticImgAjaxLoaderGif() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/img/ajax-loader.gif"
|
|
name := "web/ui/static/img/ajax-loader.gif"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticJsAlertsJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticJsAlertsJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/js/alerts.js"
|
|
name := "web/ui/static/js/alerts.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticJsGraphJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticJsGraphJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/js/graph.js"
|
|
name := "web/ui/static/js/graph.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticJsGraph_templateHandlebar reads file data from disk. It returns an error on failure.
|
|
func webUiStaticJsGraph_templateHandlebar() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/js/graph_template.handlebar"
|
|
name := "web/ui/static/js/graph_template.handlebar"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticJsProm_consoleJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticJsProm_consoleJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/js/prom_console.js"
|
|
name := "web/ui/static/js/prom_console.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331CssBootstrapThemeMinCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331CssBootstrapThemeMinCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331CssBootstrapMinCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331CssBootstrapMinCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap.min.css"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap.min.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331JsBootstrapMinJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331JsBootstrapMinJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/js/bootstrap.min.js"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/js/bootstrap.min.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap331JsNpmJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap331JsNpmJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-3.3.1/js/npm.js"
|
|
name := "web/ui/static/vendor/bootstrap-3.3.1/js/npm.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js"
|
|
name := "web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"
|
|
name := "web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js"
|
|
name := "web/ui/static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorJsHandlebarsJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorJsHandlebarsJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/js/handlebars.js"
|
|
name := "web/ui/static/vendor/js/handlebars.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorJsJqueryHotkeysJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorJsJqueryHotkeysJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/js/jquery.hotkeys.js"
|
|
name := "web/ui/static/vendor/js/jquery.hotkeys.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorJsJqueryMinJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorJsJqueryMinJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/js/jquery.min.js"
|
|
name := "web/ui/static/vendor/js/jquery.min.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorJsJquerySelectionJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorJsJquerySelectionJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/js/jquery.selection.js"
|
|
name := "web/ui/static/vendor/js/jquery.selection.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorRickshawRickshawMinCss reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorRickshawRickshawMinCss() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/rickshaw/rickshaw.min.css"
|
|
name := "web/ui/static/vendor/rickshaw/rickshaw.min.css"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorRickshawRickshawMinJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorRickshawRickshawMinJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/rickshaw/rickshaw.min.js"
|
|
name := "web/ui/static/vendor/rickshaw/rickshaw.min.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorRickshawVendorD3LayoutMinJs reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorRickshawVendorD3LayoutMinJs() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/rickshaw/vendor/d3.layout.min.js"
|
|
name := "web/ui/static/vendor/rickshaw/vendor/d3.layout.min.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// webUiStaticVendorRickshawVendorD3V3Js reads file data from disk. It returns an error on failure.
|
|
func webUiStaticVendorRickshawVendorD3V3Js() (*asset, error) {
|
|
path := "/home/bjoern/gocode/src/github.com/prometheus/prometheus/web/ui/static/vendor/rickshaw/vendor/d3.v3.js"
|
|
name := "web/ui/static/vendor/rickshaw/vendor/d3.v3.js"
|
|
bytes, err := bindataRead(path, name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
fi, err := os.Stat(path)
|
|
if err != nil {
|
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: fi}
|
|
return a, err
|
|
}
|
|
|
|
// Asset loads and returns the asset for the given name.
|
|
// It returns an error if the asset could not be found or
|
|
// could not be loaded.
|
|
func Asset(name string) ([]byte, error) {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
if f, ok := _bindata[cannonicalName]; ok {
|
|
a, err := f()
|
|
if err != nil {
|
|
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
|
}
|
|
return a.bytes, nil
|
|
}
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
}
|
|
|
|
// MustAsset is like Asset but panics when Asset would return an error.
|
|
// It simplifies safe initialization of global variables.
|
|
func MustAsset(name string) []byte {
|
|
a, err := Asset(name)
|
|
if err != nil {
|
|
panic("asset: Asset(" + name + "): " + err.Error())
|
|
}
|
|
|
|
return a
|
|
}
|
|
|
|
// AssetInfo loads and returns the asset info for the given name.
|
|
// It returns an error if the asset could not be found or
|
|
// could not be loaded.
|
|
func AssetInfo(name string) (os.FileInfo, error) {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
if f, ok := _bindata[cannonicalName]; ok {
|
|
a, err := f()
|
|
if err != nil {
|
|
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
|
}
|
|
return a.info, nil
|
|
}
|
|
return nil, fmt.Errorf("AssetInfo %s not found", name)
|
|
}
|
|
|
|
// AssetNames returns the names of the assets.
|
|
func AssetNames() []string {
|
|
names := make([]string, 0, len(_bindata))
|
|
for name := range _bindata {
|
|
names = append(names, name)
|
|
}
|
|
return names
|
|
}
|
|
|
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
|
var _bindata = map[string]func() (*asset, error){
|
|
"web/ui/templates/_base.html": webUiTemplates_baseHtml,
|
|
"web/ui/templates/alerts.html": webUiTemplatesAlertsHtml,
|
|
"web/ui/templates/config.html": webUiTemplatesConfigHtml,
|
|
"web/ui/templates/flags.html": webUiTemplatesFlagsHtml,
|
|
"web/ui/templates/flags.html~": webUiTemplatesFlagsHtml2,
|
|
"web/ui/templates/graph.html": webUiTemplatesGraphHtml,
|
|
"web/ui/templates/rules.html": webUiTemplatesRulesHtml,
|
|
"web/ui/templates/status.html": webUiTemplatesStatusHtml,
|
|
"web/ui/templates/targets.html": webUiTemplatesTargetsHtml,
|
|
"web/ui/static/css/alerts.css": webUiStaticCssAlertsCss,
|
|
"web/ui/static/css/graph.css": webUiStaticCssGraphCss,
|
|
"web/ui/static/css/prom_console.css": webUiStaticCssProm_consoleCss,
|
|
"web/ui/static/css/prometheus.css": webUiStaticCssPrometheusCss,
|
|
"web/ui/static/img/ajax-loader.gif": webUiStaticImgAjaxLoaderGif,
|
|
"web/ui/static/js/alerts.js": webUiStaticJsAlertsJs,
|
|
"web/ui/static/js/graph.js": webUiStaticJsGraphJs,
|
|
"web/ui/static/js/graph_template.handlebar": webUiStaticJsGraph_templateHandlebar,
|
|
"web/ui/static/js/prom_console.js": webUiStaticJsProm_consoleJs,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css": webUiStaticVendorBootstrap331CssBootstrapThemeMinCss,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/css/bootstrap.min.css": webUiStaticVendorBootstrap331CssBootstrapMinCss,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot": webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg": webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf": webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff": webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/js/bootstrap.min.js": webUiStaticVendorBootstrap331JsBootstrapMinJs,
|
|
"web/ui/static/vendor/bootstrap-3.3.1/js/npm.js": webUiStaticVendorBootstrap331JsNpmJs,
|
|
"web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js": webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs,
|
|
"web/ui/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css": webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss,
|
|
"web/ui/static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js": webUiStaticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs,
|
|
"web/ui/static/vendor/js/handlebars.js": webUiStaticVendorJsHandlebarsJs,
|
|
"web/ui/static/vendor/js/jquery.hotkeys.js": webUiStaticVendorJsJqueryHotkeysJs,
|
|
"web/ui/static/vendor/js/jquery.min.js": webUiStaticVendorJsJqueryMinJs,
|
|
"web/ui/static/vendor/js/jquery.selection.js": webUiStaticVendorJsJquerySelectionJs,
|
|
"web/ui/static/vendor/rickshaw/rickshaw.min.css": webUiStaticVendorRickshawRickshawMinCss,
|
|
"web/ui/static/vendor/rickshaw/rickshaw.min.js": webUiStaticVendorRickshawRickshawMinJs,
|
|
"web/ui/static/vendor/rickshaw/vendor/d3.layout.min.js": webUiStaticVendorRickshawVendorD3LayoutMinJs,
|
|
"web/ui/static/vendor/rickshaw/vendor/d3.v3.js": webUiStaticVendorRickshawVendorD3V3Js,
|
|
}
|
|
|
|
// AssetDir returns the file names below a certain
|
|
// directory embedded in the file by go-bindata.
|
|
// For example if you run go-bindata on data/... and data contains the
|
|
// following hierarchy:
|
|
// data/
|
|
// foo.txt
|
|
// img/
|
|
// a.png
|
|
// b.png
|
|
// then AssetDir("data") would return []string{"foo.txt", "img"}
|
|
// AssetDir("data/img") would return []string{"a.png", "b.png"}
|
|
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
|
|
// AssetDir("") will return []string{"data"}.
|
|
func AssetDir(name string) ([]string, error) {
|
|
node := _bintree
|
|
if len(name) != 0 {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
pathList := strings.Split(cannonicalName, "/")
|
|
for _, p := range pathList {
|
|
node = node.Children[p]
|
|
if node == nil {
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
}
|
|
}
|
|
}
|
|
if node.Func != nil {
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
}
|
|
rv := make([]string, 0, len(node.Children))
|
|
for childName := range node.Children {
|
|
rv = append(rv, childName)
|
|
}
|
|
return rv, nil
|
|
}
|
|
|
|
type bintree struct {
|
|
Func func() (*asset, error)
|
|
Children map[string]*bintree
|
|
}
|
|
|
|
var _bintree = &bintree{nil, map[string]*bintree{
|
|
"web": &bintree{nil, map[string]*bintree{
|
|
"ui": &bintree{nil, map[string]*bintree{
|
|
"static": &bintree{nil, map[string]*bintree{
|
|
"css": &bintree{nil, map[string]*bintree{
|
|
"alerts.css": &bintree{webUiStaticCssAlertsCss, map[string]*bintree{}},
|
|
"graph.css": &bintree{webUiStaticCssGraphCss, map[string]*bintree{}},
|
|
"prom_console.css": &bintree{webUiStaticCssProm_consoleCss, map[string]*bintree{}},
|
|
"prometheus.css": &bintree{webUiStaticCssPrometheusCss, map[string]*bintree{}},
|
|
}},
|
|
"img": &bintree{nil, map[string]*bintree{
|
|
"ajax-loader.gif": &bintree{webUiStaticImgAjaxLoaderGif, map[string]*bintree{}},
|
|
}},
|
|
"js": &bintree{nil, map[string]*bintree{
|
|
"alerts.js": &bintree{webUiStaticJsAlertsJs, map[string]*bintree{}},
|
|
"graph.js": &bintree{webUiStaticJsGraphJs, map[string]*bintree{}},
|
|
"graph_template.handlebar": &bintree{webUiStaticJsGraph_templateHandlebar, map[string]*bintree{}},
|
|
"prom_console.js": &bintree{webUiStaticJsProm_consoleJs, map[string]*bintree{}},
|
|
}},
|
|
"vendor": &bintree{nil, map[string]*bintree{
|
|
"bootstrap-3.3.1": &bintree{nil, map[string]*bintree{
|
|
"css": &bintree{nil, map[string]*bintree{
|
|
"bootstrap-theme.min.css": &bintree{webUiStaticVendorBootstrap331CssBootstrapThemeMinCss, map[string]*bintree{}},
|
|
"bootstrap.min.css": &bintree{webUiStaticVendorBootstrap331CssBootstrapMinCss, map[string]*bintree{}},
|
|
}},
|
|
"fonts": &bintree{nil, map[string]*bintree{
|
|
"glyphicons-halflings-regular.eot": &bintree{webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot, map[string]*bintree{}},
|
|
"glyphicons-halflings-regular.svg": &bintree{webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg, map[string]*bintree{}},
|
|
"glyphicons-halflings-regular.ttf": &bintree{webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf, map[string]*bintree{}},
|
|
"glyphicons-halflings-regular.woff": &bintree{webUiStaticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff, map[string]*bintree{}},
|
|
}},
|
|
"js": &bintree{nil, map[string]*bintree{
|
|
"bootstrap.min.js": &bintree{webUiStaticVendorBootstrap331JsBootstrapMinJs, map[string]*bintree{}},
|
|
"npm.js": &bintree{webUiStaticVendorBootstrap331JsNpmJs, map[string]*bintree{}},
|
|
}},
|
|
}},
|
|
"bootstrap-datetimepicker": &bintree{nil, map[string]*bintree{
|
|
"bootstrap-datetimepicker.js": &bintree{webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs, map[string]*bintree{}},
|
|
"bootstrap-datetimepicker.min.css": &bintree{webUiStaticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss, map[string]*bintree{}},
|
|
}},
|
|
"bootstrap3-typeahead": &bintree{nil, map[string]*bintree{
|
|
"bootstrap3-typeahead.min.js": &bintree{webUiStaticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs, map[string]*bintree{}},
|
|
}},
|
|
"js": &bintree{nil, map[string]*bintree{
|
|
"handlebars.js": &bintree{webUiStaticVendorJsHandlebarsJs, map[string]*bintree{}},
|
|
"jquery.hotkeys.js": &bintree{webUiStaticVendorJsJqueryHotkeysJs, map[string]*bintree{}},
|
|
"jquery.min.js": &bintree{webUiStaticVendorJsJqueryMinJs, map[string]*bintree{}},
|
|
"jquery.selection.js": &bintree{webUiStaticVendorJsJquerySelectionJs, map[string]*bintree{}},
|
|
}},
|
|
"rickshaw": &bintree{nil, map[string]*bintree{
|
|
"rickshaw.min.css": &bintree{webUiStaticVendorRickshawRickshawMinCss, map[string]*bintree{}},
|
|
"rickshaw.min.js": &bintree{webUiStaticVendorRickshawRickshawMinJs, map[string]*bintree{}},
|
|
"vendor": &bintree{nil, map[string]*bintree{
|
|
"d3.layout.min.js": &bintree{webUiStaticVendorRickshawVendorD3LayoutMinJs, map[string]*bintree{}},
|
|
"d3.v3.js": &bintree{webUiStaticVendorRickshawVendorD3V3Js, map[string]*bintree{}},
|
|
}},
|
|
}},
|
|
}},
|
|
}},
|
|
"templates": &bintree{nil, map[string]*bintree{
|
|
"_base.html": &bintree{webUiTemplates_baseHtml, map[string]*bintree{}},
|
|
"alerts.html": &bintree{webUiTemplatesAlertsHtml, map[string]*bintree{}},
|
|
"config.html": &bintree{webUiTemplatesConfigHtml, map[string]*bintree{}},
|
|
"flags.html": &bintree{webUiTemplatesFlagsHtml, map[string]*bintree{}},
|
|
"flags.html~": &bintree{webUiTemplatesFlagsHtml2, map[string]*bintree{}},
|
|
"graph.html": &bintree{webUiTemplatesGraphHtml, map[string]*bintree{}},
|
|
"rules.html": &bintree{webUiTemplatesRulesHtml, map[string]*bintree{}},
|
|
"status.html": &bintree{webUiTemplatesStatusHtml, map[string]*bintree{}},
|
|
"targets.html": &bintree{webUiTemplatesTargetsHtml, map[string]*bintree{}},
|
|
}},
|
|
}},
|
|
}},
|
|
}}
|
|
|
|
// RestoreAsset restores an asset under the given directory
|
|
func RestoreAsset(dir, name string) error {
|
|
data, err := Asset(name)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
info, err := AssetInfo(name)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// RestoreAssets restores an asset under the given directory recursively
|
|
func RestoreAssets(dir, name string) error {
|
|
children, err := AssetDir(name)
|
|
// File
|
|
if err != nil {
|
|
return RestoreAsset(dir, name)
|
|
}
|
|
// Dir
|
|
for _, child := range children {
|
|
err = RestoreAssets(dir, filepath.Join(name, child))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _filePath(dir, name string) string {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
|
}
|