-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: Use native go:embed instead of go-bindata (#6900)
* UI: Use native go:embed instead of go-bindata With this commit we migrate from the no longer actively maintained go-bindata project, to go:embed, for embedding the UI app into the go binary. Signed-off-by: Jacob Baungard Hansen <[email protected]> * UI: Remove static react app from .dockerignore Otherwise we cannot build in e2e tests for example. Signed-off-by: Jacob Baungard Hansen <[email protected]> --------- Signed-off-by: Jacob Baungard Hansen <[email protected]>
- Loading branch information
1 parent
d0198f7
commit 7895e27
Showing
22 changed files
with
174 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,4 @@ website/public/ | |
website/docs-pre-processed/ | ||
!website/data | ||
|
||
# React build assets | ||
pkg/ui/static/react | ||
|
||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
The `ui` package contains static files and templates used in the web UI. For | ||
easier distribution they are statically compiled into the Thanos binary | ||
using the go-bindata tool (c.f. Makefile). | ||
easier distribution they are included in the Thanos binary using go:embed. | ||
|
||
During development it is more convenient to always use the files on disk to | ||
directly see changes without recompiling. | ||
Set the environment variable `DEBUG=1` and compile Thanos for this to work. | ||
This is for development purposes only. | ||
|
||
After making changes to any file, run `make assets` before committing to update | ||
the generated inline version of the file. | ||
After making changes to any file, run `make react-app` before committing to update | ||
the generated static files and templates. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"files": { | ||
"main.css": "./static/css/main.5a4981c4.css", | ||
"main.js": "./static/js/main.a00a7e6c.js", | ||
"static/media/codicon.ttf": "./static/media/codicon.b3726f0165bf67ac6849.ttf", | ||
"index.html": "./index.html", | ||
"static/media/index.cjs": "./static/media/index.cd351d7c31d0d3fccf96.cjs", | ||
"main.5a4981c4.css.map": "./static/css/main.5a4981c4.css.map", | ||
"main.a00a7e6c.js.map": "./static/js/main.a00a7e6c.js.map" | ||
}, | ||
"entrypoints": [ | ||
"static/css/main.5a4981c4.css", | ||
"static/js/main.a00a7e6c.js" | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><script>const GLOBAL_PATH_PREFIX="{{ pathPrefix }}"</script><script>const THANOS_COMPONENT="{{ .Component }}",THANOS_QUERY_URL="{{ .queryURL }}"</script><link rel="manifest" href="./manifest.json"/><title>Thanos | Highly available Prometheus setup</title><script defer="defer" src="./static/js/main.a00a7e6c.js"></script><link href="./static/css/main.5a4981c4.css" rel="stylesheet"></head><body class="bootstrap"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "Thanos", | ||
"name": "Thanos web interface", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
111 changes: 111 additions & 0 deletions
111
pkg/ui/static/react/static/js/main.a00a7e6c.js.LICENSE.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
object-assign | ||
(c) Sindre Sorhus | ||
@license MIT | ||
*/ | ||
|
||
/*! | ||
* Sizzle CSS Selector Engine v2.3.6 | ||
* https://sizzlejs.com/ | ||
* | ||
* Copyright JS Foundation and other contributors | ||
* Released under the MIT license | ||
* https://js.foundation/ | ||
* | ||
* Date: 2021-02-16 | ||
*/ | ||
|
||
/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
|
||
/*! | ||
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com | ||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) | ||
*/ | ||
|
||
/*! | ||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object> | ||
* | ||
* Copyright (c) 2014-2017, Jon Schlinkert. | ||
* Released under the MIT License. | ||
*/ | ||
|
||
/*! | ||
* jQuery JavaScript Library v3.6.0 | ||
* https://jquery.com/ | ||
* | ||
* Includes Sizzle.js | ||
* https://sizzlejs.com/ | ||
* | ||
* Copyright OpenJS Foundation and other contributors | ||
* Released under the MIT license | ||
* https://jquery.org/license | ||
* | ||
* Date: 2021-03-02T17:08Z | ||
*/ | ||
|
||
/*!@preserve | ||
* Tempus Dominus Bootstrap4 v5.39.0 (https://tempusdominus.github.io/bootstrap-4/) | ||
* Copyright 2016-2020 Jonathan Peterson and contributors | ||
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) | ||
*/ | ||
|
||
/** @license React v0.19.1 | ||
* scheduler.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v16.13.1 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v16.14.0 | ||
* react-dom.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v16.14.0 | ||
* react-jsx-runtime.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v16.14.0 | ||
* react.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
//! Copyright (c) JS Foundation and other contributors | ||
|
||
//! github.com/moment/moment-timezone | ||
|
||
//! license : MIT | ||
|
||
//! moment-timezone.js | ||
|
||
//! moment.js | ||
|
||
//! version : 0.5.34 |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
1 change: 1 addition & 0 deletions
1
pkg/ui/static/react/static/media/index.cd351d7c31d0d3fccf96.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",customAlphabet=(t,e=21)=>(a=e)=>{let l="",o=a;for(;o--;)l+=t[Math.random()*t.length|0];return l},nanoid=(t=21)=>{let e="",a=t;for(;a--;)e+=urlAlphabet[64*Math.random()|0];return e};module.exports={nanoid:nanoid,customAlphabet:customAlphabet}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters