Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: react: Add runtime and build info page #2832

Merged
merged 7 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add entry in changelog
Signed-off-by: Prem Kumar <[email protected]>
  • Loading branch information
onprem committed Jul 8, 2020
commit 8d82c54bcf4fa44256cffe92fa64cea9fcaa1624
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel
- [#2800](https://github.com/thanos-io/thanos/pull/2800) Query: Fix handling of `--web.external-prefix` and `--web.route-prefix`

### Changed
- [#2832](https://github.com/thanos-io/thanos/pull/2832) ui: React: Add runtime and build info page

## [v0.14.0](https://github.com/thanos-io/thanos/releases) - IN PROGRESS

Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ func runQuery(
CWD = "<error retrieving current working directory>"
level.Warn(logger).Log("msg", "failed to retrieve current working directory", "err", err)
}

birth := time.Now()

var runtimeInfo v1.RuntimeInfoFn = func (logger log.Logger) v1.RuntimeInfo {
var runtimeInfo v1.RuntimeInfoFn = func(logger log.Logger) v1.RuntimeInfo {
status := v1.RuntimeInfo{
StartTime: birth,
CWD: CWD,
Expand Down
9 changes: 0 additions & 9 deletions pkg/ui/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ type Query struct {
now func() model.Time
}

type thanosVersion struct {
Version string `json:"version"`
Revision string `json:"revision"`
Branch string `json:"branch"`
BuildUser string `json:"buildUser"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
}

func NewQueryUI(logger log.Logger, reg prometheus.Registerer, storeSet *query.StoreSet, externalPrefix, prefixHeader string, runtimeInfo func(log.Logger) v1.RuntimeInfo, buildInfo v1.ThanosVersion) *Query {
return &Query{
BaseUI: NewBaseUI(logger, "query_menu.html", queryTmplFuncs(), externalPrefix, prefixHeader, component.Query),
Expand Down