diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go
index 01c8f336bd..654a891f7e 100644
--- a/cmd/prometheus/main.go
+++ b/cmd/prometheus/main.go
@@ -250,9 +250,9 @@ func (c *flagConfig) setFeatureListOptions(logger log.Logger) error {
continue
case "promql-at-modifier", "promql-negative-offset":
level.Warn(logger).Log("msg", "This option for --enable-feature is now permanently enabled and therefore a no-op.", "option", o)
- case "new-ui":
- c.web.UseNewUI = true
- level.Info(logger).Log("msg", "Serving experimental new web UI.")
+ case "old-ui":
+ c.web.UseOldUI = true
+ level.Info(logger).Log("msg", "Serving previous version of the Prometheus web UI.")
default:
level.Warn(logger).Log("msg", "Unknown option for --enable-feature", "option", o)
}
@@ -495,7 +495,7 @@ func main() {
a.Flag("scrape.name-escaping-scheme", `Method for escaping legacy invalid names when sending to Prometheus that does not support UTF-8. Can be one of "values", "underscores", or "dots".`).Default(scrape.DefaultNameEscapingScheme.String()).StringVar(&cfg.nameEscapingScheme)
- a.Flag("enable-feature", "Comma separated feature names to enable. Valid options: agent, auto-gomaxprocs, auto-gomemlimit, concurrent-rule-eval, created-timestamp-zero-ingestion, delayed-compaction, exemplar-storage, expand-external-labels, extra-scrape-metrics, memory-snapshot-on-shutdown, native-histograms, new-service-discovery-manager, new-ui, no-default-scrape-port, otlp-write-receiver, promql-experimental-functions, promql-delayed-name-removal, promql-per-step-stats, remote-write-receiver (DEPRECATED), utf8-names. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details.").
+ a.Flag("enable-feature", "Comma separated feature names to enable. Valid options: agent, auto-gomaxprocs, auto-gomemlimit, concurrent-rule-eval, created-timestamp-zero-ingestion, delayed-compaction, exemplar-storage, expand-external-labels, extra-scrape-metrics, memory-snapshot-on-shutdown, native-histograms, new-service-discovery-manager, no-default-scrape-port, old-ui, otlp-write-receiver, promql-experimental-functions, promql-delayed-name-removal, promql-per-step-stats, remote-write-receiver (DEPRECATED), utf8-names. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details.").
Default("").StringsVar(&cfg.featureList)
promlogflag.AddFlags(a, &cfg.promlogConfig)
diff --git a/docs/command-line/prometheus.md b/docs/command-line/prometheus.md
index 87cf5a4310..8060067ffe 100644
--- a/docs/command-line/prometheus.md
+++ b/docs/command-line/prometheus.md
@@ -57,7 +57,7 @@ The Prometheus monitoring server
| --query.max-concurrency
| Maximum number of queries executed concurrently. Use with server mode only. | `20` |
| --query.max-samples
| Maximum number of samples a single query can load into memory. Note that queries will fail if they try to load more samples than this into memory, so this also limits the number of samples a query can return. Use with server mode only. | `50000000` |
| --scrape.name-escaping-scheme
| Method for escaping legacy invalid names when sending to Prometheus that does not support UTF-8. Can be one of "values", "underscores", or "dots". | `values` |
-| --enable-feature
... | Comma separated feature names to enable. Valid options: agent, auto-gomaxprocs, auto-gomemlimit, concurrent-rule-eval, created-timestamp-zero-ingestion, delayed-compaction, exemplar-storage, expand-external-labels, extra-scrape-metrics, memory-snapshot-on-shutdown, native-histograms, new-service-discovery-manager, new-ui, no-default-scrape-port, otlp-write-receiver, promql-experimental-functions, promql-delayed-name-removal, promql-per-step-stats, remote-write-receiver (DEPRECATED), utf8-names. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details. | |
+| --enable-feature
... | Comma separated feature names to enable. Valid options: agent, auto-gomaxprocs, auto-gomemlimit, concurrent-rule-eval, created-timestamp-zero-ingestion, delayed-compaction, exemplar-storage, expand-external-labels, extra-scrape-metrics, memory-snapshot-on-shutdown, native-histograms, new-service-discovery-manager, no-default-scrape-port, old-ui, otlp-write-receiver, promql-experimental-functions, promql-delayed-name-removal, promql-per-step-stats, remote-write-receiver (DEPRECATED), utf8-names. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details. | |
| --log.level
| Only log messages with the given severity or above. One of: [debug, info, warn, error] | `info` |
| --log.format
| Output format of log messages. One of: [logfmt, json] | `logfmt` |
diff --git a/docs/feature_flags.md b/docs/feature_flags.md
index c9289e445a..e5c0eec8a1 100644
--- a/docs/feature_flags.md
+++ b/docs/feature_flags.md
@@ -226,11 +226,11 @@ This has the potential to improve rule group evaluation latency and resource uti
The number of concurrent rule evaluations can be configured with `--rules.max-concurrent-rule-evals`, which is set to `4` by default.
-## Experimental new web UI
+## Serve old Prometheus UI
-Enables the new experimental web UI instead of the old and stable web UI. The new UI is a complete rewrite and aims to be cleaner, less cluttered, and more modern under the hood. It is not feature complete yet and is still under active development.
+Fall back to serving the old (Prometheus 2.x) web UI instead of the new UI. The new UI that was released as part of Prometheus 3.0 is a complete rewrite and aims to be cleaner, less cluttered, and more modern under the hood. However, it is not fully feature complete and battle-tested yet, so some users may still prefer using the old UI.
-`--enable-feature=new-ui`
+`--enable-feature=old-ui`
## Metadata WAL Records
diff --git a/web/ui/mantine-ui/src/pages/RulesPage.tsx b/web/ui/mantine-ui/src/pages/RulesPage.tsx
index a335228f3a..8247ef810a 100644
--- a/web/ui/mantine-ui/src/pages/RulesPage.tsx
+++ b/web/ui/mantine-ui/src/pages/RulesPage.tsx
@@ -141,7 +141,16 @@ export default function RulesPage() {
)}
- {r.name}
+
+ {r.name}
+
diff --git a/web/web.go b/web/web.go
index 426e609032..91e5de1c43 100644
--- a/web/web.go
+++ b/web/web.go
@@ -270,7 +270,7 @@ type Options struct {
UserAssetsPath string
ConsoleTemplatesPath string
ConsoleLibrariesPath string
- UseNewUI bool
+ UseOldUI bool
EnableLifecycle bool
EnableAdminAPI bool
PageTitle string
@@ -384,9 +384,9 @@ func New(logger log.Logger, o *Options) *Handler {
router = router.WithPrefix(o.RoutePrefix)
}
- homePage := "/graph"
- if o.UseNewUI {
- homePage = "/query"
+ homePage := "/query"
+ if o.UseOldUI {
+ homePage = "/graph"
}
if o.IsAgent {
homePage = "/agent"
@@ -398,15 +398,15 @@ func New(logger log.Logger, o *Options) *Handler {
http.Redirect(w, r, path.Join(o.ExternalURL.Path, homePage), http.StatusFound)
})
- if o.UseNewUI {
+ if !o.UseOldUI {
router.Get("/graph", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, path.Join(o.ExternalURL.Path, "/query?"+r.URL.RawQuery), http.StatusFound)
})
}
- reactAssetsRoot := "/static/react-app"
- if h.options.UseNewUI {
- reactAssetsRoot = "/static/mantine-ui"
+ reactAssetsRoot := "/static/mantine-ui"
+ if h.options.UseOldUI {
+ reactAssetsRoot = "/static/react-app"
}
// The console library examples at 'console_libraries/prom.lib' still depend on old asset files being served under `classic`.
@@ -448,11 +448,11 @@ func New(logger log.Logger, o *Options) *Handler {
}
// Serve the React app.
- reactRouterPaths := oldUIReactRouterPaths
- reactRouterServerPaths := oldUIReactRouterServerPaths
- if h.options.UseNewUI {
- reactRouterPaths = newUIReactRouterPaths
- reactRouterServerPaths = newUIReactRouterServerPaths
+ reactRouterPaths := newUIReactRouterPaths
+ reactRouterServerPaths := newUIReactRouterServerPaths
+ if h.options.UseOldUI {
+ reactRouterPaths = oldUIReactRouterPaths
+ reactRouterServerPaths = oldUIReactRouterServerPaths
}
for _, p := range reactRouterPaths {
@@ -480,9 +480,9 @@ func New(logger log.Logger, o *Options) *Handler {
})
}
- reactStaticAssetsDir := "/static"
- if h.options.UseNewUI {
- reactStaticAssetsDir = "/assets"
+ reactStaticAssetsDir := "/assets"
+ if h.options.UseOldUI {
+ reactStaticAssetsDir = "/static"
}
// Static files required by the React app.
router.Get(reactStaticAssetsDir+"/*filepath", func(w http.ResponseWriter, r *http.Request) {