Update bindata to be in dist. Use dev and debug for now
parent
8525144618
commit
b9b0d4db08
9
Makefile
9
Makefile
|
@ -5,7 +5,7 @@ BUILD_TIME ?= $$(date +%FT%T%z)
|
|||
|
||||
SOURCES := $(shell find . -name '*.go')
|
||||
|
||||
LDFLAGS=-ldflags "-s -X main.Version=${VERSION} -X main.Commit=${COMMIT} -X main.BuildTime=${BUILD_TIME} -X main.Branch=${BRANCH}"
|
||||
LDFLAGS=-ldflags "-s -X dist.rootDir=. -X main.Version=${VERSION} -X main.Commit=${COMMIT} -X main.BuildTime=${BUILD_TIME} -X main.Branch=${BRANCH}"
|
||||
BINARY=mrfusion
|
||||
|
||||
default: prepare ${BINARY}
|
||||
|
@ -21,8 +21,11 @@ docker-${BINARY}: $(SOURCES)
|
|||
docker: docker-${BINARY}
|
||||
docker build -t mrfusion .
|
||||
|
||||
assets: jsbuild
|
||||
go-bindata -o ui/ui.go -ignore 'map|go' -pkg ui -nocompress=true ui/build/...
|
||||
bindata:
|
||||
go-bindata -debug -dev -o dist/dist_gen.go -ignore 'map|go' -pkg dist ui/build/...
|
||||
|
||||
assets: jsbuild go-bindata
|
||||
|
||||
|
||||
jsbuild:
|
||||
cd ui && npm run build
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
package dist
|
||||
|
||||
var rootDir string
|
|
@ -1,7 +1,30 @@
|
|||
// Code generated by go-bindata.
|
||||
// sources:
|
||||
// dist/bundle.js
|
||||
// dist/index.html
|
||||
// ui/build/24d12bd76c3a876e54c103a800a9eb49.svg
|
||||
// ui/build/2ec4663c887ea215056e9952e8b94b8b.woff
|
||||
// ui/build/38624467180a60d999cd749f3d580b36.ttf
|
||||
// ui/build/3f68500b267c20051088bcc0698af773.ttf
|
||||
// ui/build/448c34a56d699c29117adc64c43affeb.woff2
|
||||
// ui/build/45c73723862c6fc5eb3d6961db2d71fb.eot
|
||||
// ui/build/4b5a84aaf1c9485e060c503a0ff8cadb.woff2
|
||||
// ui/build/4f63a23c789567a91aafabfbb17ad9a2.woff2
|
||||
// ui/build/76a4f23c6be74fd309e0d0fd2c27a5de.svg
|
||||
// ui/build/7b5fb88f12bec8143f00e21bc3222124.ttf
|
||||
// ui/build/7c87870ab40d63cfb8870c1f183f9939.ttf
|
||||
// ui/build/893fe14628bd7ac498d550e96367e1be.ttf
|
||||
// ui/build/89889688147bd7575d6327160d64e760.svg
|
||||
// ui/build/ac3f799d5bbaf5196fab15ab8de8431c.ttf
|
||||
// ui/build/app.dev.js
|
||||
// ui/build/app.js
|
||||
// ui/build/cdb1d47e7ffa00c380374f74d2937f7e.eot
|
||||
// ui/build/d329cc8b34667f114a95422aaad1b063.ttf
|
||||
// ui/build/dfb02f8f6d0cedc009ee5887cc68f1f3.woff
|
||||
// ui/build/e18bbf611f2a2e43afc071aa2f4e1512.ttf
|
||||
// ui/build/f4769f9bdb7466be65088239c12046d1.eot
|
||||
// ui/build/fa2772327f55d8198301fdb8bcfc8158.woff
|
||||
// ui/build/fe13e4170719c2fc586501e777bde143.ttf
|
||||
// ui/build/index.html
|
||||
// ui/build/style.css
|
||||
// DO NOT EDIT!
|
||||
|
||||
package dist
|
||||
|
@ -12,136 +35,470 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
type bindataFileInfo struct {
|
||||
name string
|
||||
size int64
|
||||
mode os.FileMode
|
||||
modTime time.Time
|
||||
}
|
||||
|
||||
func (fi bindataFileInfo) Name() string {
|
||||
return fi.name
|
||||
}
|
||||
func (fi bindataFileInfo) Size() int64 {
|
||||
return fi.size
|
||||
}
|
||||
func (fi bindataFileInfo) Mode() os.FileMode {
|
||||
return fi.mode
|
||||
}
|
||||
func (fi bindataFileInfo) ModTime() time.Time {
|
||||
return fi.modTime
|
||||
}
|
||||
func (fi bindataFileInfo) IsDir() bool {
|
||||
return false
|
||||
}
|
||||
func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _distBundleJs = []byte(`/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "/";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
console.log("hello GUNNAR");
|
||||
|
||||
|
||||
/***/ }
|
||||
/******/ ]);`)
|
||||
|
||||
func distBundleJsBytes() ([]byte, error) {
|
||||
return _distBundleJs, nil
|
||||
}
|
||||
|
||||
func distBundleJs() (*asset, error) {
|
||||
bytes, err := distBundleJsBytes()
|
||||
// uiBuild24d12bd76c3a876e54c103a800a9eb49Svg reads file data from disk. It returns an error on failure.
|
||||
func uiBuild24d12bd76c3a876e54c103a800a9eb49Svg() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/24d12bd76c3a876e54c103a800a9eb49.svg")
|
||||
name := "ui/build/24d12bd76c3a876e54c103a800a9eb49.svg"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "dist/bundle.js", size: 1535, mode: os.FileMode(420), modTime: time.Unix(1474043462, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
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
|
||||
}
|
||||
|
||||
var _distIndexHtml = []byte(`<html>
|
||||
<head>
|
||||
<!--<link href="/css/style.css" rel="stylesheet" />-->
|
||||
</head>
|
||||
<body>
|
||||
<h1>My Application</h1>
|
||||
<script type="text/javascript" src="/bundle.js?b04b771ca6df9b44e37c"></script></body>
|
||||
</html>
|
||||
`)
|
||||
|
||||
func distIndexHtmlBytes() ([]byte, error) {
|
||||
return _distIndexHtml, nil
|
||||
}
|
||||
|
||||
func distIndexHtml() (*asset, error) {
|
||||
bytes, err := distIndexHtmlBytes()
|
||||
// uiBuild2ec4663c887ea215056e9952e8b94b8bWoff reads file data from disk. It returns an error on failure.
|
||||
func uiBuild2ec4663c887ea215056e9952e8b94b8bWoff() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/2ec4663c887ea215056e9952e8b94b8b.woff")
|
||||
name := "ui/build/2ec4663c887ea215056e9952e8b94b8b.woff"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "dist/index.html", size: 234, mode: os.FileMode(420), modTime: time.Unix(1474043462, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
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
|
||||
}
|
||||
|
||||
// uiBuild38624467180a60d999cd749f3d580b36Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuild38624467180a60d999cd749f3d580b36Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/38624467180a60d999cd749f3d580b36.ttf")
|
||||
name := "ui/build/38624467180a60d999cd749f3d580b36.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
|
||||
}
|
||||
|
||||
// uiBuild3f68500b267c20051088bcc0698af773Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuild3f68500b267c20051088bcc0698af773Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/3f68500b267c20051088bcc0698af773.ttf")
|
||||
name := "ui/build/3f68500b267c20051088bcc0698af773.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
|
||||
}
|
||||
|
||||
// uiBuild448c34a56d699c29117adc64c43affebWoff2 reads file data from disk. It returns an error on failure.
|
||||
func uiBuild448c34a56d699c29117adc64c43affebWoff2() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/448c34a56d699c29117adc64c43affeb.woff2")
|
||||
name := "ui/build/448c34a56d699c29117adc64c43affeb.woff2"
|
||||
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
|
||||
}
|
||||
|
||||
// uiBuild45c73723862c6fc5eb3d6961db2d71fbEot reads file data from disk. It returns an error on failure.
|
||||
func uiBuild45c73723862c6fc5eb3d6961db2d71fbEot() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/45c73723862c6fc5eb3d6961db2d71fb.eot")
|
||||
name := "ui/build/45c73723862c6fc5eb3d6961db2d71fb.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
|
||||
}
|
||||
|
||||
// uiBuild4b5a84aaf1c9485e060c503a0ff8cadbWoff2 reads file data from disk. It returns an error on failure.
|
||||
func uiBuild4b5a84aaf1c9485e060c503a0ff8cadbWoff2() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/4b5a84aaf1c9485e060c503a0ff8cadb.woff2")
|
||||
name := "ui/build/4b5a84aaf1c9485e060c503a0ff8cadb.woff2"
|
||||
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
|
||||
}
|
||||
|
||||
// uiBuild4f63a23c789567a91aafabfbb17ad9a2Woff2 reads file data from disk. It returns an error on failure.
|
||||
func uiBuild4f63a23c789567a91aafabfbb17ad9a2Woff2() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/4f63a23c789567a91aafabfbb17ad9a2.woff2")
|
||||
name := "ui/build/4f63a23c789567a91aafabfbb17ad9a2.woff2"
|
||||
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
|
||||
}
|
||||
|
||||
// uiBuild76a4f23c6be74fd309e0d0fd2c27a5deSvg reads file data from disk. It returns an error on failure.
|
||||
func uiBuild76a4f23c6be74fd309e0d0fd2c27a5deSvg() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/76a4f23c6be74fd309e0d0fd2c27a5de.svg")
|
||||
name := "ui/build/76a4f23c6be74fd309e0d0fd2c27a5de.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
|
||||
}
|
||||
|
||||
// uiBuild7b5fb88f12bec8143f00e21bc3222124Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuild7b5fb88f12bec8143f00e21bc3222124Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/7b5fb88f12bec8143f00e21bc3222124.ttf")
|
||||
name := "ui/build/7b5fb88f12bec8143f00e21bc3222124.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
|
||||
}
|
||||
|
||||
// uiBuild7c87870ab40d63cfb8870c1f183f9939Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuild7c87870ab40d63cfb8870c1f183f9939Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/7c87870ab40d63cfb8870c1f183f9939.ttf")
|
||||
name := "ui/build/7c87870ab40d63cfb8870c1f183f9939.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
|
||||
}
|
||||
|
||||
// uiBuild893fe14628bd7ac498d550e96367e1beTtf reads file data from disk. It returns an error on failure.
|
||||
func uiBuild893fe14628bd7ac498d550e96367e1beTtf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/893fe14628bd7ac498d550e96367e1be.ttf")
|
||||
name := "ui/build/893fe14628bd7ac498d550e96367e1be.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
|
||||
}
|
||||
|
||||
// uiBuild89889688147bd7575d6327160d64e760Svg reads file data from disk. It returns an error on failure.
|
||||
func uiBuild89889688147bd7575d6327160d64e760Svg() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/89889688147bd7575d6327160d64e760.svg")
|
||||
name := "ui/build/89889688147bd7575d6327160d64e760.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
|
||||
}
|
||||
|
||||
// uiBuildAc3f799d5bbaf5196fab15ab8de8431cTtf reads file data from disk. It returns an error on failure.
|
||||
func uiBuildAc3f799d5bbaf5196fab15ab8de8431cTtf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/ac3f799d5bbaf5196fab15ab8de8431c.ttf")
|
||||
name := "ui/build/ac3f799d5bbaf5196fab15ab8de8431c.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
|
||||
}
|
||||
|
||||
// uiBuildAppDevJs reads file data from disk. It returns an error on failure.
|
||||
func uiBuildAppDevJs() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/app.dev.js")
|
||||
name := "ui/build/app.dev.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
|
||||
}
|
||||
|
||||
// uiBuildAppJs reads file data from disk. It returns an error on failure.
|
||||
func uiBuildAppJs() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/app.js")
|
||||
name := "ui/build/app.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
|
||||
}
|
||||
|
||||
// uiBuildCdb1d47e7ffa00c380374f74d2937f7eEot reads file data from disk. It returns an error on failure.
|
||||
func uiBuildCdb1d47e7ffa00c380374f74d2937f7eEot() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/cdb1d47e7ffa00c380374f74d2937f7e.eot")
|
||||
name := "ui/build/cdb1d47e7ffa00c380374f74d2937f7e.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
|
||||
}
|
||||
|
||||
// uiBuildD329cc8b34667f114a95422aaad1b063Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuildD329cc8b34667f114a95422aaad1b063Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/d329cc8b34667f114a95422aaad1b063.ttf")
|
||||
name := "ui/build/d329cc8b34667f114a95422aaad1b063.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
|
||||
}
|
||||
|
||||
// uiBuildDfb02f8f6d0cedc009ee5887cc68f1f3Woff reads file data from disk. It returns an error on failure.
|
||||
func uiBuildDfb02f8f6d0cedc009ee5887cc68f1f3Woff() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/dfb02f8f6d0cedc009ee5887cc68f1f3.woff")
|
||||
name := "ui/build/dfb02f8f6d0cedc009ee5887cc68f1f3.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
|
||||
}
|
||||
|
||||
// uiBuildE18bbf611f2a2e43afc071aa2f4e1512Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuildE18bbf611f2a2e43afc071aa2f4e1512Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/e18bbf611f2a2e43afc071aa2f4e1512.ttf")
|
||||
name := "ui/build/e18bbf611f2a2e43afc071aa2f4e1512.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
|
||||
}
|
||||
|
||||
// uiBuildF4769f9bdb7466be65088239c12046d1Eot reads file data from disk. It returns an error on failure.
|
||||
func uiBuildF4769f9bdb7466be65088239c12046d1Eot() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/f4769f9bdb7466be65088239c12046d1.eot")
|
||||
name := "ui/build/f4769f9bdb7466be65088239c12046d1.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
|
||||
}
|
||||
|
||||
// uiBuildFa2772327f55d8198301fdb8bcfc8158Woff reads file data from disk. It returns an error on failure.
|
||||
func uiBuildFa2772327f55d8198301fdb8bcfc8158Woff() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/fa2772327f55d8198301fdb8bcfc8158.woff")
|
||||
name := "ui/build/fa2772327f55d8198301fdb8bcfc8158.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
|
||||
}
|
||||
|
||||
// uiBuildFe13e4170719c2fc586501e777bde143Ttf reads file data from disk. It returns an error on failure.
|
||||
func uiBuildFe13e4170719c2fc586501e777bde143Ttf() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/fe13e4170719c2fc586501e777bde143.ttf")
|
||||
name := "ui/build/fe13e4170719c2fc586501e777bde143.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
|
||||
}
|
||||
|
||||
// uiBuildIndexHtml reads file data from disk. It returns an error on failure.
|
||||
func uiBuildIndexHtml() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/index.html")
|
||||
name := "ui/build/index.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
|
||||
}
|
||||
|
||||
// uiBuildStyleCss reads file data from disk. It returns an error on failure.
|
||||
func uiBuildStyleCss() (*asset, error) {
|
||||
path := filepath.Join(rootDir, "ui/build/style.css")
|
||||
name := "ui/build/style.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
|
||||
}
|
||||
|
||||
// Asset loads and returns the asset for the given name.
|
||||
|
@ -196,8 +553,31 @@ func AssetNames() []string {
|
|||
|
||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||
var _bindata = map[string]func() (*asset, error){
|
||||
"dist/bundle.js": distBundleJs,
|
||||
"dist/index.html": distIndexHtml,
|
||||
"ui/build/24d12bd76c3a876e54c103a800a9eb49.svg": uiBuild24d12bd76c3a876e54c103a800a9eb49Svg,
|
||||
"ui/build/2ec4663c887ea215056e9952e8b94b8b.woff": uiBuild2ec4663c887ea215056e9952e8b94b8bWoff,
|
||||
"ui/build/38624467180a60d999cd749f3d580b36.ttf": uiBuild38624467180a60d999cd749f3d580b36Ttf,
|
||||
"ui/build/3f68500b267c20051088bcc0698af773.ttf": uiBuild3f68500b267c20051088bcc0698af773Ttf,
|
||||
"ui/build/448c34a56d699c29117adc64c43affeb.woff2": uiBuild448c34a56d699c29117adc64c43affebWoff2,
|
||||
"ui/build/45c73723862c6fc5eb3d6961db2d71fb.eot": uiBuild45c73723862c6fc5eb3d6961db2d71fbEot,
|
||||
"ui/build/4b5a84aaf1c9485e060c503a0ff8cadb.woff2": uiBuild4b5a84aaf1c9485e060c503a0ff8cadbWoff2,
|
||||
"ui/build/4f63a23c789567a91aafabfbb17ad9a2.woff2": uiBuild4f63a23c789567a91aafabfbb17ad9a2Woff2,
|
||||
"ui/build/76a4f23c6be74fd309e0d0fd2c27a5de.svg": uiBuild76a4f23c6be74fd309e0d0fd2c27a5deSvg,
|
||||
"ui/build/7b5fb88f12bec8143f00e21bc3222124.ttf": uiBuild7b5fb88f12bec8143f00e21bc3222124Ttf,
|
||||
"ui/build/7c87870ab40d63cfb8870c1f183f9939.ttf": uiBuild7c87870ab40d63cfb8870c1f183f9939Ttf,
|
||||
"ui/build/893fe14628bd7ac498d550e96367e1be.ttf": uiBuild893fe14628bd7ac498d550e96367e1beTtf,
|
||||
"ui/build/89889688147bd7575d6327160d64e760.svg": uiBuild89889688147bd7575d6327160d64e760Svg,
|
||||
"ui/build/ac3f799d5bbaf5196fab15ab8de8431c.ttf": uiBuildAc3f799d5bbaf5196fab15ab8de8431cTtf,
|
||||
"ui/build/app.dev.js": uiBuildAppDevJs,
|
||||
"ui/build/app.js": uiBuildAppJs,
|
||||
"ui/build/cdb1d47e7ffa00c380374f74d2937f7e.eot": uiBuildCdb1d47e7ffa00c380374f74d2937f7eEot,
|
||||
"ui/build/d329cc8b34667f114a95422aaad1b063.ttf": uiBuildD329cc8b34667f114a95422aaad1b063Ttf,
|
||||
"ui/build/dfb02f8f6d0cedc009ee5887cc68f1f3.woff": uiBuildDfb02f8f6d0cedc009ee5887cc68f1f3Woff,
|
||||
"ui/build/e18bbf611f2a2e43afc071aa2f4e1512.ttf": uiBuildE18bbf611f2a2e43afc071aa2f4e1512Ttf,
|
||||
"ui/build/f4769f9bdb7466be65088239c12046d1.eot": uiBuildF4769f9bdb7466be65088239c12046d1Eot,
|
||||
"ui/build/fa2772327f55d8198301fdb8bcfc8158.woff": uiBuildFa2772327f55d8198301fdb8bcfc8158Woff,
|
||||
"ui/build/fe13e4170719c2fc586501e777bde143.ttf": uiBuildFe13e4170719c2fc586501e777bde143Ttf,
|
||||
"ui/build/index.html": uiBuildIndexHtml,
|
||||
"ui/build/style.css": uiBuildStyleCss,
|
||||
}
|
||||
|
||||
// AssetDir returns the file names below a certain
|
||||
|
@ -240,9 +620,34 @@ type bintree struct {
|
|||
Children map[string]*bintree
|
||||
}
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"dist": &bintree{nil, map[string]*bintree{
|
||||
"bundle.js": &bintree{distBundleJs, map[string]*bintree{}},
|
||||
"index.html": &bintree{distIndexHtml, map[string]*bintree{}},
|
||||
"ui": &bintree{nil, map[string]*bintree{
|
||||
"build": &bintree{nil, map[string]*bintree{
|
||||
"24d12bd76c3a876e54c103a800a9eb49.svg": &bintree{uiBuild24d12bd76c3a876e54c103a800a9eb49Svg, map[string]*bintree{}},
|
||||
"2ec4663c887ea215056e9952e8b94b8b.woff": &bintree{uiBuild2ec4663c887ea215056e9952e8b94b8bWoff, map[string]*bintree{}},
|
||||
"38624467180a60d999cd749f3d580b36.ttf": &bintree{uiBuild38624467180a60d999cd749f3d580b36Ttf, map[string]*bintree{}},
|
||||
"3f68500b267c20051088bcc0698af773.ttf": &bintree{uiBuild3f68500b267c20051088bcc0698af773Ttf, map[string]*bintree{}},
|
||||
"448c34a56d699c29117adc64c43affeb.woff2": &bintree{uiBuild448c34a56d699c29117adc64c43affebWoff2, map[string]*bintree{}},
|
||||
"45c73723862c6fc5eb3d6961db2d71fb.eot": &bintree{uiBuild45c73723862c6fc5eb3d6961db2d71fbEot, map[string]*bintree{}},
|
||||
"4b5a84aaf1c9485e060c503a0ff8cadb.woff2": &bintree{uiBuild4b5a84aaf1c9485e060c503a0ff8cadbWoff2, map[string]*bintree{}},
|
||||
"4f63a23c789567a91aafabfbb17ad9a2.woff2": &bintree{uiBuild4f63a23c789567a91aafabfbb17ad9a2Woff2, map[string]*bintree{}},
|
||||
"76a4f23c6be74fd309e0d0fd2c27a5de.svg": &bintree{uiBuild76a4f23c6be74fd309e0d0fd2c27a5deSvg, map[string]*bintree{}},
|
||||
"7b5fb88f12bec8143f00e21bc3222124.ttf": &bintree{uiBuild7b5fb88f12bec8143f00e21bc3222124Ttf, map[string]*bintree{}},
|
||||
"7c87870ab40d63cfb8870c1f183f9939.ttf": &bintree{uiBuild7c87870ab40d63cfb8870c1f183f9939Ttf, map[string]*bintree{}},
|
||||
"893fe14628bd7ac498d550e96367e1be.ttf": &bintree{uiBuild893fe14628bd7ac498d550e96367e1beTtf, map[string]*bintree{}},
|
||||
"89889688147bd7575d6327160d64e760.svg": &bintree{uiBuild89889688147bd7575d6327160d64e760Svg, map[string]*bintree{}},
|
||||
"ac3f799d5bbaf5196fab15ab8de8431c.ttf": &bintree{uiBuildAc3f799d5bbaf5196fab15ab8de8431cTtf, map[string]*bintree{}},
|
||||
"app.dev.js": &bintree{uiBuildAppDevJs, map[string]*bintree{}},
|
||||
"app.js": &bintree{uiBuildAppJs, map[string]*bintree{}},
|
||||
"cdb1d47e7ffa00c380374f74d2937f7e.eot": &bintree{uiBuildCdb1d47e7ffa00c380374f74d2937f7eEot, map[string]*bintree{}},
|
||||
"d329cc8b34667f114a95422aaad1b063.ttf": &bintree{uiBuildD329cc8b34667f114a95422aaad1b063Ttf, map[string]*bintree{}},
|
||||
"dfb02f8f6d0cedc009ee5887cc68f1f3.woff": &bintree{uiBuildDfb02f8f6d0cedc009ee5887cc68f1f3Woff, map[string]*bintree{}},
|
||||
"e18bbf611f2a2e43afc071aa2f4e1512.ttf": &bintree{uiBuildE18bbf611f2a2e43afc071aa2f4e1512Ttf, map[string]*bintree{}},
|
||||
"f4769f9bdb7466be65088239c12046d1.eot": &bintree{uiBuildF4769f9bdb7466be65088239c12046d1Eot, map[string]*bintree{}},
|
||||
"fa2772327f55d8198301fdb8bcfc8158.woff": &bintree{uiBuildFa2772327f55d8198301fdb8bcfc8158Woff, map[string]*bintree{}},
|
||||
"fe13e4170719c2fc586501e777bde143.ttf": &bintree{uiBuildFe13e4170719c2fc586501e777bde143Ttf, map[string]*bintree{}},
|
||||
"index.html": &bintree{uiBuildIndexHtml, map[string]*bintree{}},
|
||||
"style.css": &bintree{uiBuildStyleCss, map[string]*bintree{}},
|
||||
}},
|
||||
}},
|
||||
}}
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ import (
|
|||
middleware "github.com/go-openapi/runtime/middleware"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/influxdata/mrfusion/dist"
|
||||
"github.com/influxdata/mrfusion/mock"
|
||||
"github.com/influxdata/mrfusion/restapi/operations"
|
||||
"github.com/influxdata/mrfusion/ui"
|
||||
)
|
||||
|
||||
// This file is safe to edit. Once it exists it will not be overwritten
|
||||
|
@ -152,18 +152,22 @@ func setupGlobalMiddleware(handler http.Handler) http.Handler {
|
|||
if strings.Contains(r.URL.Path, "/chronograf/v1") {
|
||||
handler.ServeHTTP(w, r)
|
||||
return
|
||||
} else if r.URL.Path == "/ui/build/" {
|
||||
octets, _ := ui.Asset("ui/build/index.html")
|
||||
} else if r.URL.Path == "/build/" {
|
||||
octets, _ := dist.Asset("ui/build/index.html")
|
||||
fmt.Fprintf(w, "%s", string(octets))
|
||||
return
|
||||
} else if strings.Index(r.URL.Path, "/ui/build/") == 0 {
|
||||
octets, err := ui.Asset(r.URL.Path[1:])
|
||||
} else if strings.Index(r.URL.Path, "/build/") == 0 {
|
||||
octets, err := dist.Asset("ui" + r.URL.Path)
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
if strings.Contains(r.URL.Path, ".css") {
|
||||
w.Header().Set("Content-Type", "text/css")
|
||||
}
|
||||
|
||||
fmt.Fprintf(w, "%s", string(octets))
|
||||
return
|
||||
}
|
||||
http.Redirect(w, r, "/ui/build/index.html", http.StatusFound)
|
||||
http.Redirect(w, r, "/build/index.html", http.StatusFound)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue