diff --git a/web/blob/files.go b/web/blob/files.go index c60f3df1b82..befbce0af52 100644 --- a/web/blob/files.go +++ b/web/blob/files.go @@ -46,12 +46,12 @@ import ( "compress/gzip" "fmt" "io" - "strings" - "os" - "time" "io/ioutil" + "os" "path" "path/filepath" + "strings" + "time" ) func bindataRead(data []byte, name string) ([]byte, error) { @@ -80,9 +80,9 @@ type asset struct { } type bindataFileInfo struct { - name string - size int64 - mode os.FileMode + name string + size int64 + mode os.FileMode modTime time.Time } @@ -121,7 +121,7 @@ func templates_baseHtml() (*asset, error) { } info := bindataFileInfo{name: "templates/_base.html", size: 2017, mode: os.FileMode(436), modTime: time.Unix(1444576136, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -141,7 +141,7 @@ func templatesAlertsHtml() (*asset, error) { } info := bindataFileInfo{name: "templates/alerts.html", size: 1707, mode: os.FileMode(436), modTime: time.Unix(1444576136, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -161,7 +161,7 @@ func templatesGraphHtml() (*asset, error) { } info := bindataFileInfo{name: "templates/graph.html", size: 1463, mode: os.FileMode(436), modTime: time.Unix(1444576136, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -181,7 +181,7 @@ func templatesStatusHtml() (*asset, error) { } info := bindataFileInfo{name: "templates/status.html", size: 3393, mode: os.FileMode(436), modTime: time.Unix(1444576136, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -201,7 +201,7 @@ func staticCssAlertsCss() (*asset, error) { } info := bindataFileInfo{name: "static/css/alerts.css", size: 74, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -221,7 +221,7 @@ func staticCssGraphCss() (*asset, error) { } info := bindataFileInfo{name: "static/css/graph.css", size: 2668, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -241,7 +241,7 @@ func staticCssProm_consoleCss() (*asset, error) { } info := bindataFileInfo{name: "static/css/prom_console.css", size: 2883, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -261,7 +261,7 @@ func staticCssPrometheusCss() (*asset, error) { } info := bindataFileInfo{name: "static/css/prometheus.css", size: 346, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -281,7 +281,7 @@ func staticImgAjaxLoaderGif() (*asset, error) { } info := bindataFileInfo{name: "static/img/ajax-loader.gif", size: 847, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -301,7 +301,7 @@ func staticJsAlertsJs() (*asset, error) { } info := bindataFileInfo{name: "static/js/alerts.js", size: 444, mode: os.FileMode(436), modTime: time.Unix(1444576136, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -321,7 +321,7 @@ func staticJsGraphJs() (*asset, error) { } info := bindataFileInfo{name: "static/js/graph.js", size: 22188, mode: os.FileMode(436), modTime: time.Unix(1444763581, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -341,7 +341,7 @@ func staticJsGraph_templateHandlebar() (*asset, error) { } info := bindataFileInfo{name: "static/js/graph_template.handlebar", size: 5951, mode: os.FileMode(436), modTime: time.Unix(1444763820, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -361,7 +361,7 @@ func staticJsProm_consoleJs() (*asset, error) { } info := bindataFileInfo{name: "static/js/prom_console.js", size: 20889, mode: os.FileMode(436), modTime: time.Unix(1444576136, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -381,7 +381,7 @@ func staticVendorBootstrap331CssBootstrapThemeCss() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.css", size: 22474, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -401,7 +401,7 @@ func staticVendorBootstrap331CssBootstrapThemeCssMap() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.css.map", size: 43029, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -421,7 +421,7 @@ func staticVendorBootstrap331CssBootstrapThemeMinCss() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css", size: 19835, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -441,7 +441,7 @@ func staticVendorBootstrap331CssBootstrapCss() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/css/bootstrap.css", size: 137067, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -461,7 +461,7 @@ func staticVendorBootstrap331CssBootstrapCssMap() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/css/bootstrap.css.map", size: 366144, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -481,7 +481,7 @@ func staticVendorBootstrap331CssBootstrapMinCss() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/css/bootstrap.min.css", size: 113498, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -501,7 +501,7 @@ func staticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot() (*asset, error } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot", size: 20335, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -521,7 +521,7 @@ func staticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg() (*asset, error } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg", size: 62926, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -541,7 +541,7 @@ func staticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf() (*asset, error } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf", size: 41280, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -561,7 +561,7 @@ func staticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff() (*asset, erro } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff", size: 23320, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -581,7 +581,7 @@ func staticVendorBootstrap331JsBootstrapJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/js/bootstrap.js", size: 67155, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -601,7 +601,7 @@ func staticVendorBootstrap331JsBootstrapMinJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/js/bootstrap.min.js", size: 35601, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -621,7 +621,7 @@ func staticVendorBootstrap331JsNpmJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap-3.3.1/js/npm.js", size: 484, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -641,7 +641,7 @@ func staticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs() (*asset, err } info := bindataFileInfo{name: "static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js", size: 53185, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -661,7 +661,7 @@ func staticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss() (*asset, } info := bindataFileInfo{name: "static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css", size: 5059, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -681,7 +681,7 @@ func staticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js", size: 7856, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -701,7 +701,7 @@ func staticVendorJsHandlebarsJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/js/handlebars.js", size: 65639, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -721,7 +721,7 @@ func staticVendorJsJqueryHotkeysJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/js/jquery.hotkeys.js", size: 3283, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -741,7 +741,7 @@ func staticVendorJsJqueryMinJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/js/jquery.min.js", size: 95935, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -761,7 +761,7 @@ func staticVendorJsJquerySelectionJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/js/jquery.selection.js", size: 13320, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -781,7 +781,7 @@ func staticVendorRickshawRickshawMinCss() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/rickshaw/rickshaw.min.css", size: 6102, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -801,7 +801,7 @@ func staticVendorRickshawRickshawMinJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/rickshaw/rickshaw.min.js", size: 76322, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -821,7 +821,7 @@ func staticVendorRickshawVendorD3LayoutMinJs() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/rickshaw/vendor/d3.layout.min.js", size: 17514, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -841,7 +841,7 @@ func staticVendorRickshawVendorD3V3Js() (*asset, error) { } info := bindataFileInfo{name: "static/vendor/rickshaw/vendor/d3.v3.js", size: 144718, mode: os.FileMode(436), modTime: time.Unix(1442397535, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -864,7 +864,7 @@ func Asset(name string) ([]byte, error) { // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { a, err := Asset(name) - if (err != nil) { + if err != nil { panic("asset: Asset(" + name + "): " + err.Error()) } @@ -897,43 +897,43 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "templates/_base.html": templates_baseHtml, - "templates/alerts.html": templatesAlertsHtml, - "templates/graph.html": templatesGraphHtml, - "templates/status.html": templatesStatusHtml, - "static/css/alerts.css": staticCssAlertsCss, - "static/css/graph.css": staticCssGraphCss, - "static/css/prom_console.css": staticCssProm_consoleCss, - "static/css/prometheus.css": staticCssPrometheusCss, - "static/img/ajax-loader.gif": staticImgAjaxLoaderGif, - "static/js/alerts.js": staticJsAlertsJs, - "static/js/graph.js": staticJsGraphJs, - "static/js/graph_template.handlebar": staticJsGraph_templateHandlebar, - "static/js/prom_console.js": staticJsProm_consoleJs, - "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.css": staticVendorBootstrap331CssBootstrapThemeCss, - "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.css.map": staticVendorBootstrap331CssBootstrapThemeCssMap, - "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css": staticVendorBootstrap331CssBootstrapThemeMinCss, - "static/vendor/bootstrap-3.3.1/css/bootstrap.css": staticVendorBootstrap331CssBootstrapCss, - "static/vendor/bootstrap-3.3.1/css/bootstrap.css.map": staticVendorBootstrap331CssBootstrapCssMap, - "static/vendor/bootstrap-3.3.1/css/bootstrap.min.css": staticVendorBootstrap331CssBootstrapMinCss, - "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot, - "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg, - "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf, - "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff, - "static/vendor/bootstrap-3.3.1/js/bootstrap.js": staticVendorBootstrap331JsBootstrapJs, - "static/vendor/bootstrap-3.3.1/js/bootstrap.min.js": staticVendorBootstrap331JsBootstrapMinJs, - "static/vendor/bootstrap-3.3.1/js/npm.js": staticVendorBootstrap331JsNpmJs, - "static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js": staticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs, + "templates/_base.html": templates_baseHtml, + "templates/alerts.html": templatesAlertsHtml, + "templates/graph.html": templatesGraphHtml, + "templates/status.html": templatesStatusHtml, + "static/css/alerts.css": staticCssAlertsCss, + "static/css/graph.css": staticCssGraphCss, + "static/css/prom_console.css": staticCssProm_consoleCss, + "static/css/prometheus.css": staticCssPrometheusCss, + "static/img/ajax-loader.gif": staticImgAjaxLoaderGif, + "static/js/alerts.js": staticJsAlertsJs, + "static/js/graph.js": staticJsGraphJs, + "static/js/graph_template.handlebar": staticJsGraph_templateHandlebar, + "static/js/prom_console.js": staticJsProm_consoleJs, + "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.css": staticVendorBootstrap331CssBootstrapThemeCss, + "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.css.map": staticVendorBootstrap331CssBootstrapThemeCssMap, + "static/vendor/bootstrap-3.3.1/css/bootstrap-theme.min.css": staticVendorBootstrap331CssBootstrapThemeMinCss, + "static/vendor/bootstrap-3.3.1/css/bootstrap.css": staticVendorBootstrap331CssBootstrapCss, + "static/vendor/bootstrap-3.3.1/css/bootstrap.css.map": staticVendorBootstrap331CssBootstrapCssMap, + "static/vendor/bootstrap-3.3.1/css/bootstrap.min.css": staticVendorBootstrap331CssBootstrapMinCss, + "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.eot": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot, + "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.svg": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg, + "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.ttf": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf, + "static/vendor/bootstrap-3.3.1/fonts/glyphicons-halflings-regular.woff": staticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff, + "static/vendor/bootstrap-3.3.1/js/bootstrap.js": staticVendorBootstrap331JsBootstrapJs, + "static/vendor/bootstrap-3.3.1/js/bootstrap.min.js": staticVendorBootstrap331JsBootstrapMinJs, + "static/vendor/bootstrap-3.3.1/js/npm.js": staticVendorBootstrap331JsNpmJs, + "static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js": staticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs, "static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css": staticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss, - "static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js": staticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs, - "static/vendor/js/handlebars.js": staticVendorJsHandlebarsJs, - "static/vendor/js/jquery.hotkeys.js": staticVendorJsJqueryHotkeysJs, - "static/vendor/js/jquery.min.js": staticVendorJsJqueryMinJs, - "static/vendor/js/jquery.selection.js": staticVendorJsJquerySelectionJs, - "static/vendor/rickshaw/rickshaw.min.css": staticVendorRickshawRickshawMinCss, - "static/vendor/rickshaw/rickshaw.min.js": staticVendorRickshawRickshawMinJs, - "static/vendor/rickshaw/vendor/d3.layout.min.js": staticVendorRickshawVendorD3LayoutMinJs, - "static/vendor/rickshaw/vendor/d3.v3.js": staticVendorRickshawVendorD3V3Js, + "static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js": staticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs, + "static/vendor/js/handlebars.js": staticVendorJsHandlebarsJs, + "static/vendor/js/jquery.hotkeys.js": staticVendorJsJqueryHotkeysJs, + "static/vendor/js/jquery.min.js": staticVendorJsJqueryMinJs, + "static/vendor/js/jquery.selection.js": staticVendorJsJquerySelectionJs, + "static/vendor/rickshaw/rickshaw.min.css": staticVendorRickshawRickshawMinCss, + "static/vendor/rickshaw/rickshaw.min.js": staticVendorRickshawRickshawMinJs, + "static/vendor/rickshaw/vendor/d3.layout.min.js": staticVendorRickshawVendorD3LayoutMinJs, + "static/vendor/rickshaw/vendor/d3.v3.js": staticVendorRickshawVendorD3V3Js, } // AssetDir returns the file names below a certain @@ -972,160 +972,123 @@ func AssetDir(name string) ([]string, error) { } type bintree struct { - Func func() (*asset, error) + Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "static": &bintree{nil, map[string]*bintree{ "css": &bintree{nil, map[string]*bintree{ - "alerts.css": &bintree{staticCssAlertsCss, map[string]*bintree{ - }}, - "graph.css": &bintree{staticCssGraphCss, map[string]*bintree{ - }}, - "prom_console.css": &bintree{staticCssProm_consoleCss, map[string]*bintree{ - }}, - "prometheus.css": &bintree{staticCssPrometheusCss, map[string]*bintree{ - }}, + "alerts.css": &bintree{staticCssAlertsCss, map[string]*bintree{}}, + "graph.css": &bintree{staticCssGraphCss, map[string]*bintree{}}, + "prom_console.css": &bintree{staticCssProm_consoleCss, map[string]*bintree{}}, + "prometheus.css": &bintree{staticCssPrometheusCss, map[string]*bintree{}}, }}, "img": &bintree{nil, map[string]*bintree{ - "ajax-loader.gif": &bintree{staticImgAjaxLoaderGif, map[string]*bintree{ - }}, + "ajax-loader.gif": &bintree{staticImgAjaxLoaderGif, map[string]*bintree{}}, }}, "js": &bintree{nil, map[string]*bintree{ - "alerts.js": &bintree{staticJsAlertsJs, map[string]*bintree{ - }}, - "graph.js": &bintree{staticJsGraphJs, map[string]*bintree{ - }}, - "graph_template.handlebar": &bintree{staticJsGraph_templateHandlebar, map[string]*bintree{ - }}, - "prom_console.js": &bintree{staticJsProm_consoleJs, map[string]*bintree{ - }}, + "alerts.js": &bintree{staticJsAlertsJs, map[string]*bintree{}}, + "graph.js": &bintree{staticJsGraphJs, map[string]*bintree{}}, + "graph_template.handlebar": &bintree{staticJsGraph_templateHandlebar, map[string]*bintree{}}, + "prom_console.js": &bintree{staticJsProm_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.css": &bintree{staticVendorBootstrap331CssBootstrapThemeCss, map[string]*bintree{ - }}, - "bootstrap-theme.css.map": &bintree{staticVendorBootstrap331CssBootstrapThemeCssMap, map[string]*bintree{ - }}, - "bootstrap-theme.min.css": &bintree{staticVendorBootstrap331CssBootstrapThemeMinCss, map[string]*bintree{ - }}, - "bootstrap.css": &bintree{staticVendorBootstrap331CssBootstrapCss, map[string]*bintree{ - }}, - "bootstrap.css.map": &bintree{staticVendorBootstrap331CssBootstrapCssMap, map[string]*bintree{ - }}, - "bootstrap.min.css": &bintree{staticVendorBootstrap331CssBootstrapMinCss, map[string]*bintree{ - }}, + "bootstrap-theme.css": &bintree{staticVendorBootstrap331CssBootstrapThemeCss, map[string]*bintree{}}, + "bootstrap-theme.css.map": &bintree{staticVendorBootstrap331CssBootstrapThemeCssMap, map[string]*bintree{}}, + "bootstrap-theme.min.css": &bintree{staticVendorBootstrap331CssBootstrapThemeMinCss, map[string]*bintree{}}, + "bootstrap.css": &bintree{staticVendorBootstrap331CssBootstrapCss, map[string]*bintree{}}, + "bootstrap.css.map": &bintree{staticVendorBootstrap331CssBootstrapCssMap, map[string]*bintree{}}, + "bootstrap.min.css": &bintree{staticVendorBootstrap331CssBootstrapMinCss, map[string]*bintree{}}, }}, "fonts": &bintree{nil, map[string]*bintree{ - "glyphicons-halflings-regular.eot": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot, map[string]*bintree{ - }}, - "glyphicons-halflings-regular.svg": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg, map[string]*bintree{ - }}, - "glyphicons-halflings-regular.ttf": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf, map[string]*bintree{ - }}, - "glyphicons-halflings-regular.woff": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff, map[string]*bintree{ - }}, + "glyphicons-halflings-regular.eot": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularEot, map[string]*bintree{}}, + "glyphicons-halflings-regular.svg": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularSvg, map[string]*bintree{}}, + "glyphicons-halflings-regular.ttf": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularTtf, map[string]*bintree{}}, + "glyphicons-halflings-regular.woff": &bintree{staticVendorBootstrap331FontsGlyphiconsHalflingsRegularWoff, map[string]*bintree{}}, }}, "js": &bintree{nil, map[string]*bintree{ - "bootstrap.js": &bintree{staticVendorBootstrap331JsBootstrapJs, map[string]*bintree{ - }}, - "bootstrap.min.js": &bintree{staticVendorBootstrap331JsBootstrapMinJs, map[string]*bintree{ - }}, - "npm.js": &bintree{staticVendorBootstrap331JsNpmJs, map[string]*bintree{ - }}, + "bootstrap.js": &bintree{staticVendorBootstrap331JsBootstrapJs, map[string]*bintree{}}, + "bootstrap.min.js": &bintree{staticVendorBootstrap331JsBootstrapMinJs, map[string]*bintree{}}, + "npm.js": &bintree{staticVendorBootstrap331JsNpmJs, map[string]*bintree{}}, }}, }}, "bootstrap-datetimepicker": &bintree{nil, map[string]*bintree{ - "bootstrap-datetimepicker.js": &bintree{staticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs, map[string]*bintree{ - }}, - "bootstrap-datetimepicker.min.css": &bintree{staticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss, map[string]*bintree{ - }}, + "bootstrap-datetimepicker.js": &bintree{staticVendorBootstrapDatetimepickerBootstrapDatetimepickerJs, map[string]*bintree{}}, + "bootstrap-datetimepicker.min.css": &bintree{staticVendorBootstrapDatetimepickerBootstrapDatetimepickerMinCss, map[string]*bintree{}}, }}, "bootstrap3-typeahead": &bintree{nil, map[string]*bintree{ - "bootstrap3-typeahead.min.js": &bintree{staticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs, map[string]*bintree{ - }}, + "bootstrap3-typeahead.min.js": &bintree{staticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs, map[string]*bintree{}}, }}, "js": &bintree{nil, map[string]*bintree{ - "handlebars.js": &bintree{staticVendorJsHandlebarsJs, map[string]*bintree{ - }}, - "jquery.hotkeys.js": &bintree{staticVendorJsJqueryHotkeysJs, map[string]*bintree{ - }}, - "jquery.min.js": &bintree{staticVendorJsJqueryMinJs, map[string]*bintree{ - }}, - "jquery.selection.js": &bintree{staticVendorJsJquerySelectionJs, map[string]*bintree{ - }}, + "handlebars.js": &bintree{staticVendorJsHandlebarsJs, map[string]*bintree{}}, + "jquery.hotkeys.js": &bintree{staticVendorJsJqueryHotkeysJs, map[string]*bintree{}}, + "jquery.min.js": &bintree{staticVendorJsJqueryMinJs, map[string]*bintree{}}, + "jquery.selection.js": &bintree{staticVendorJsJquerySelectionJs, map[string]*bintree{}}, }}, "rickshaw": &bintree{nil, map[string]*bintree{ - "rickshaw.min.css": &bintree{staticVendorRickshawRickshawMinCss, map[string]*bintree{ - }}, - "rickshaw.min.js": &bintree{staticVendorRickshawRickshawMinJs, map[string]*bintree{ - }}, + "rickshaw.min.css": &bintree{staticVendorRickshawRickshawMinCss, map[string]*bintree{}}, + "rickshaw.min.js": &bintree{staticVendorRickshawRickshawMinJs, map[string]*bintree{}}, "vendor": &bintree{nil, map[string]*bintree{ - "d3.layout.min.js": &bintree{staticVendorRickshawVendorD3LayoutMinJs, map[string]*bintree{ - }}, - "d3.v3.js": &bintree{staticVendorRickshawVendorD3V3Js, map[string]*bintree{ - }}, + "d3.layout.min.js": &bintree{staticVendorRickshawVendorD3LayoutMinJs, map[string]*bintree{}}, + "d3.v3.js": &bintree{staticVendorRickshawVendorD3V3Js, map[string]*bintree{}}, }}, }}, }}, }}, "templates": &bintree{nil, map[string]*bintree{ - "_base.html": &bintree{templates_baseHtml, map[string]*bintree{ - }}, - "alerts.html": &bintree{templatesAlertsHtml, map[string]*bintree{ - }}, - "graph.html": &bintree{templatesGraphHtml, map[string]*bintree{ - }}, - "status.html": &bintree{templatesStatusHtml, map[string]*bintree{ - }}, + "_base.html": &bintree{templates_baseHtml, map[string]*bintree{}}, + "alerts.html": &bintree{templatesAlertsHtml, map[string]*bintree{}}, + "graph.html": &bintree{templatesGraphHtml, map[string]*bintree{}}, + "status.html": &bintree{templatesStatusHtml, 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, path.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 + data, err := Asset(name) + if err != nil { + return err + } + info, err := AssetInfo(name) + if err != nil { + return err + } + err = os.MkdirAll(_filePath(dir, path.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, path.Join(name, child)) - if err != nil { - return err - } - } - return nil + children, err := AssetDir(name) + // File + if err != nil { + return RestoreAsset(dir, name) + } + // Dir + for _, child := range children { + err = RestoreAssets(dir, path.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, "/")...)...) + cannonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } -