mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Allow setting the Prometheus instance document title through a flag. (#4841)
* web: added ability to set page title through flag. Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com> * Reformatted variable names and Flag description for readability. Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com> * assets_vfsdata.go Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com> * Flag name changed from web.ui-title to web.page-title Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com> * make assets Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
This commit is contained in:
parent
87abb279e4
commit
a9050c45f6
|
@ -150,6 +150,9 @@ func main() {
|
|||
a.Flag("web.console.libraries", "Path to the console library directory.").
|
||||
Default("console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
|
||||
|
||||
a.Flag("web.page-title", "Document title of Prometheus instance.").
|
||||
Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
|
||||
|
||||
a.Flag("storage.tsdb.path", "Base path for metrics storage.").
|
||||
Default("data/").StringVar(&cfg.localStoragePath)
|
||||
|
||||
|
|
|
@ -361,9 +361,9 @@ var Assets = func() http.FileSystem {
|
|||
"/templates/_base.html": &vfsgen۰CompressedFileInfo{
|
||||
name: "_base.html",
|
||||
modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC),
|
||||
uncompressedSize: 3042,
|
||||
uncompressedSize: 3002,
|
||||
|
||||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x56\x6d\x6f\xdb\x36\x10\xfe\xde\x5f\x71\x63\x8b\xb5\x05\x26\x13\x43\xbf\x0c\xad\xa4\xa1\x4d\xd2\x35\x40\xb1\x1a\x89\x57\x6c\x18\x86\x80\x16\x4f\x12\x53\x8a\x54\xc9\x93\x1a\xc3\xf0\x7f\x1f\x68\xbd\x4c\x56\xe2\x64\xeb\x86\x7d\x12\x79\x7a\xf8\xdc\xc3\x7b\x21\x19\x7f\x73\xfa\xe1\x64\xf5\xdb\xf2\x0c\x4a\xaa\x74\xfa\x28\x0e\x1f\xd0\xc2\x14\x09\x43\xc3\xd2\x47\x00\x71\x89\x42\x86\x01\x40\x5c\x21\x09\x28\x89\xea\x08\x3f\x37\xaa\x4d\xd8\x89\x35\x84\x86\xa2\xd5\xa6\x46\x06\x59\x37\x4b\x18\xe1\x0d\xf1\x40\xf5\x0a\xb2\x52\x38\x8f\x94\x34\x94\x47\x3f\xb0\x29\x8f\x11\x15\x26\xcc\xd9\xb5\x25\x3f\x59\x6b\xac\x32\x12\x6f\xbe\x33\x36\xb7\x5a\xdb\x2f\xc3\x1a\x52\xa4\x31\x5d\x3a\x5b\x21\x95\xd8\x78\x58\xa9\x0a\xe1\x12\x9d\x42\x0f\x27\x56\x6b\xcc\x48\x59\x03\xc2\x48\x58\x3a\x9b\xa1\xf7\xca\x14\x01\xd0\xa2\x8b\x79\xb7\xbc\xa3\xd2\xca\x7c\x02\x87\x3a\x61\xbe\xb4\x8e\xb2\x86\x40\x65\xd6\x30\x28\x1d\xe6\x09\xdb\x6e\xa1\x16\x54\x2e\x1d\xe6\xea\x06\x76\x3b\xee\x49\x90\xca\xb8\xaa\x0a\x9e\x8b\x36\x40\x17\x2a\xb3\x3f\xb6\xc9\x76\x0b\xeb\x46\x69\xf9\x11\x9d\x0f\xbe\x77\xbb\x41\xad\xcf\x9c\xaa\x09\xbc\xcb\x8e\xf3\xb5\x68\xa4\x75\xfc\xda\xf3\xeb\xcf\x0d\xba\xcd\xa2\x52\x66\x71\xed\x8f\xf0\xc6\xbc\xe3\xfc\xe7\x0e\xd6\xd6\x92\x27\x27\xea\xe8\xc5\xe2\xc5\xe2\xfb\xe0\x70\x34\xfd\x5d\x9f\x93\xc0\xd1\xa6\xc6\x3e\xc5\x99\xf7\xac\x0f\x24\x6d\x34\xfa\x12\x91\x1e\x8a\xe2\x11\x51\x99\x9f\xab\xca\xfc\x31\x59\xff\x9d\x98\xe0\xb5\x1e\x4b\xea\x3e\x97\xd3\xa8\x77\x02\x00\x5a\xe1\x60\xf9\x7a\xf5\xee\x6a\x79\x71\xf6\xf6\xfc\x57\x48\xe0\x96\x23\xf6\x6a\x82\x7d\xf3\xcb\xf9\xfb\xd3\xab\x8f\x67\x17\x97\xe7\x1f\x7e\xee\xd1\x73\x4f\x03\xfe\xc9\xb3\xbc\x31\x5d\x45\x3f\x7b\x0e\xdb\xde\x1a\xec\x4f\x7f\x97\x82\x44\x44\xb6\x28\x74\xd8\xbb\xb5\x9a\x54\xcd\xfe\x78\xfa\x7c\xd1\x8f\x9f\x3d\xef\xe1\xbb\x6e\x30\x4b\xe3\x76\x4b\x58\xd5\x5a\x10\x02\x0b\xcd\xcd\x60\xb1\xdb\x85\x4e\xe7\x5d\xab\x87\xe1\xda\xca\x4d\x1f\x67\x23\x5a\xc8\xb4\xf0\x3e\x61\x46\xb4\x6b\xe1\xa0\xfb\x44\xca\xb4\xe8\x3c\x0e\xd3\x5c\xdd\xa0\x8c\xc8\xd6\x6c\x88\x4f\x2c\xd5\xb8\x34\xf4\xb7\x50\x06\x5d\x94\xeb\x46\xc9\x11\x73\x88\xea\xa9\x82\x0e\x74\x13\x4c\x50\xd4\x10\x59\xd3\x27\xbc\x9b\xb0\xd9\xb2\x2e\x24\x90\x59\xad\x45\xed\x51\x32\x38\x88\xd4\x60\x1f\xcc\xc2\x15\x48\x09\x7b\xdc\xad\x66\x20\x9c\x12\x11\xde\xd4\xc2\x48\x94\x09\xcb\x85\x0e\xd8\xbd\x35\xa8\x77\x56\x8f\xae\x0e\xa4\x85\xba\xa8\x85\x19\xc4\x78\x17\x59\xa3\x37\x2c\x5d\x75\x72\x8c\x68\x55\x21\x42\x26\x63\x1e\x70\xf7\x2c\x0d\x47\x4b\xb4\xa7\xff\xbf\xa0\x31\xef\x42\x79\x60\x13\xb3\xb8\xae\x9d\x30\xf2\x68\x2b\xb1\xc9\xa1\x1c\x73\x31\x49\x2c\x97\xaa\x9d\xe5\x59\xc9\x31\x84\x33\x27\x43\x76\xc6\xf4\x1d\xa6\xbf\xd1\x13\xfc\x50\x72\x93\xa1\xc6\x9c\x66\x59\xd9\x6e\x9f\x64\xd6\x78\xab\xd1\xc3\xcb\x04\x86\xf1\x52\x50\xb9\xaf\xf7\x29\x52\xe5\x30\x82\x67\x3f\x63\xad\xd2\x58\x8c\xbb\x9f\xc0\x58\x7a\xd2\x8f\xc3\xbe\x63\xae\xd5\x5c\x00\xa0\x91\x70\x3f\xdf\x2c\x9a\x42\xa3\x23\xcf\xd2\xd7\xfb\xef\xdd\xbc\xf7\x33\x14\x4e\xd4\x25\x4b\x7f\x0a\x9f\xa3\xeb\x87\x60\x4a\x67\x6b\x69\xbf\x98\x59\xe8\xf6\x45\xd0\xf1\x3f\x66\x73\x6c\xdf\x50\xb3\xee\x1a\x99\xc0\x59\x3d\x69\xd1\x7d\xff\x94\xc2\xd7\xb6\x6e\xea\x84\x91\x6b\xf0\x48\xab\xa5\x97\x24\xa8\xf1\x87\xc5\x9b\x09\x87\x34\x56\xee\x41\x7d\xdd\xaa\x8c\x51\x60\x85\xa6\xb9\xb5\xa3\x87\xe2\xe6\xf7\xde\x59\x7a\xd1\x18\x0a\x4f\x8b\x6f\x45\x55\xbf\x82\x37\xe1\x7c\x86\x73\x93\x5b\x57\xf5\x4d\x7c\x57\x48\x1f\xa6\xcf\xb5\x28\x7c\xa8\x98\xaa\x12\x46\x46\xef\x95\x41\x78\x1b\x6c\x5f\x4b\x98\x59\x93\xab\x62\x5f\x83\xb9\x2a\x1a\xf7\xaf\xd4\xb9\x46\xe3\x7e\xef\x47\x8b\xf9\x61\x8e\xee\x40\xf5\x2c\x5d\x75\x83\xaf\xe5\xf1\xe8\x5a\x95\x61\x24\x95\xcf\x6c\x8b\x6e\xc3\xd2\xcb\xce\x04\xa7\x83\xe9\x18\x77\xcc\x1b\x3d\x2b\xf6\x3b\xdb\xe7\x58\xb5\x87\xc7\xad\x7f\xc9\xa7\x8f\x02\x65\xb9\xb4\xd9\xf4\x9d\xc0\xc3\xdd\xe9\x89\x17\x48\xa4\x4c\x71\xe5\x49\x38\x42\xc9\x19\x0c\x77\xca\xd5\x5a\x0b\xf3\x89\xa5\xef\x50\xd7\xb7\x6a\x76\xae\xe8\x50\xf3\xc1\xa9\x39\x99\xc4\xdc\x88\xf6\x8e\x1b\xbc\x7f\x38\xff\x75\x89\x77\x57\x77\xcc\xbb\x17\xfd\x9f\x01\x00\x00\xff\xff\x3b\x91\xde\xec\xe2\x0b\x00\x00"),
|
||||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x56\x6d\x6f\xdb\x36\x10\xfe\xde\x5f\xc1\xb1\xc5\xda\x02\x93\x89\xa1\x5f\x86\x56\xd2\xd0\x26\xe9\x1a\xa0\x58\x8d\xc4\x2b\x36\x0c\x43\x70\x16\x4f\x12\x53\x8a\x54\xc9\x93\x1a\xc3\xf0\x7f\x1f\x68\xbd\x4c\x56\xe2\x64\xeb\x86\x7d\x12\x79\x7a\xf8\xdc\xc3\x7b\x21\x19\x7f\x73\xfa\xe1\x64\xf5\xdb\xf2\x8c\x95\x54\xe9\xf4\x51\x1c\x3e\x4c\x83\x29\x12\x8e\x86\xa7\x8f\x18\x8b\x4b\x04\x19\x06\x8c\xc5\x15\x12\xb0\x92\xa8\x8e\xf0\x73\xa3\xda\x84\x9f\x58\x43\x68\x28\x5a\x6d\x6a\xe4\x2c\xeb\x66\x09\x27\xbc\x21\x11\xa8\x5e\xb1\xac\x04\xe7\x91\x92\x86\xf2\xe8\x07\x3e\xe5\x31\x50\x61\xc2\x9d\x5d\x5b\xf2\x93\xb5\xc6\x2a\x23\xf1\xe6\x3b\x63\x73\xab\xb5\xfd\x32\xac\x21\x45\x1a\xd3\xed\x96\xd5\x50\xe0\x2a\x4c\xd8\x6e\x17\x8b\xce\xdc\x41\xb4\x32\x9f\x98\x43\x9d\x70\x5f\x5a\x47\x59\x43\x4c\x65\xd6\x70\x56\x3a\xcc\x13\xbe\x5f\x4b\xe5\xd2\x61\xae\x6e\xd8\x6e\x27\x3c\x01\xa9\x4c\xa8\xaa\x10\x39\xb4\x01\xba\x50\x99\xfd\xb1\x4d\xb6\x5b\xb6\x6e\x94\x96\x1f\xd1\x79\x65\x0d\xdb\xed\x06\x15\x3e\x73\xaa\x26\xe6\x5d\x76\x9c\xaf\x45\x23\xad\x13\xd7\x5e\x5c\x7f\x6e\xd0\x6d\x16\x95\x32\x8b\x6b\x7f\x84\x37\x16\x1d\xe7\x3f\x77\xb0\xb6\x96\x3c\x39\xa8\xa3\x17\x8b\x17\x8b\xef\x83\xc3\xd1\xf4\x77\x7d\x4e\x02\x47\x9b\x1a\xfb\xd4\x65\xde\xf3\x3e\x90\xb4\xd1\xe8\x4b\x44\x7a\x28\x8a\x47\x44\x65\x7e\xae\x2a\xf3\xc7\x64\xfd\x77\x62\x82\xd7\xda\xd9\x0a\xa9\xc4\xc6\xdf\xe7\x72\x1a\xf5\x4e\x00\x63\x2d\x38\xb6\x7c\xbd\x7a\x77\xb5\xbc\x38\x7b\x7b\xfe\x2b\x4b\xd8\x2d\x47\xfc\xd5\x04\xfb\xe6\x97\xf3\xf7\xa7\x57\x1f\xcf\x2e\x2e\xcf\x3f\xfc\xdc\xa3\xe7\x9e\x06\xfc\x93\x67\x79\x63\x32\x0a\xd6\x67\xcf\xd9\xb6\xb7\x06\xfb\xd3\xdf\x25\x10\x44\x64\x8b\x42\x87\xbd\x5b\xab\x49\xd5\xfc\x8f\xa7\xcf\x17\xfd\xf8\xd9\xf3\x1e\xbe\xeb\x06\xb3\x34\x6e\xb7\x84\x55\xad\x81\x90\xf1\xd0\xb4\x9c\x2d\x76\xbb\xd0\xc1\xa2\x6b\xe1\x30\x5c\x5b\xb9\xe9\xe3\x6c\xa0\x65\x99\x06\xef\x13\x6e\xa0\x5d\x83\x63\xdd\x27\x52\xa6\x45\xe7\x71\x98\xe6\xea\x06\x65\x44\xb6\xe6\x43\x7c\x62\xa9\xc6\xa5\xa1\x6f\x41\x19\x74\x51\xae\x1b\x25\x47\xcc\x21\xaa\xa7\x0a\x3a\xd0\x4d\x30\x41\x51\x43\x64\x4d\x9f\xf0\x6e\xc2\x67\xcb\xba\x90\xb0\xcc\x6a\x0d\xb5\x47\xc9\xd9\x41\xa4\x06\xfb\x60\x06\x57\x20\x25\xfc\x71\xb7\x9a\x33\x70\x0a\x22\xbc\xa9\xc1\x48\x94\x09\xcf\x41\x07\xec\xde\x1a\xd4\x3b\xab\x47\x57\x07\xd2\x42\x5d\xd4\x60\x06\x31\xde\x45\xd6\xe8\x0d\x4f\x57\x9d\x1c\x03\xad\x2a\x20\x64\x32\x16\x01\x77\xcf\xd2\x70\xb4\x44\x7b\xfa\xff\x0b\x1a\x8b\x2e\x94\x07\x36\x98\xc5\x75\xed\xc0\xc8\xa3\xad\xc4\xd3\xe5\xd8\x41\xb1\x80\x49\x62\x85\x54\xed\x2c\xcf\x4a\x8e\x21\x9c\x39\x19\xb2\x33\xa6\xef\x30\xfd\x8d\x9e\xe0\x87\x92\x9b\x0c\x35\xe6\x34\xcb\xca\x76\xfb\x24\xb3\xc6\x5b\x8d\x9e\xbd\x4c\xd8\x30\x5e\x02\x95\xfb\x7a\x9f\x22\x55\xce\x46\xf0\xec\x67\xac\x55\x1a\xc3\xb8\xfb\x09\x8c\xa7\x27\xfd\x38\xec\x3b\x16\x5a\xcd\x05\x30\x34\x92\xdd\xcf\x37\x8b\x26\x68\x74\xe4\x79\xfa\x7a\xff\xbd\x9b\xf7\x7e\x86\xc2\x41\x5d\xf2\xf4\xa7\xf0\x39\xba\x7e\x08\xa6\x74\xb6\x96\xf6\x8b\x99\x85\x6e\x5f\x04\x1d\xff\x63\x3e\xc7\xf6\x0d\x35\xeb\xae\x91\x89\x39\xab\x27\x2d\xba\xef\x9f\x12\x7c\x6d\xeb\xa6\x4e\x38\xb9\x06\x8f\xb4\x5a\x7a\x49\x40\x8d\x3f\x2c\xde\x0c\x1c\xd2\x58\xb9\x07\xf5\x75\xab\x32\x46\x81\x15\x9a\xe6\xd6\x8e\x1e\x8a\x9b\xdf\x7b\xe7\xe9\x45\x63\x48\x55\xc8\xbe\x85\xaa\x7e\xc5\xde\x84\xf3\x99\x9d\x9b\xdc\xba\xaa\x6f\xe2\xbb\x42\xfa\x30\x7d\xae\xa1\xf0\xa1\x62\xaa\x0a\x8c\x8c\xde\x2b\x83\xec\x6d\xb0\x7d\x2d\x61\x66\x4d\xae\x8a\x7d\x0d\xe6\xaa\x68\xdc\xbf\x52\xe7\x1a\x8d\xfb\xbd\x1f\x2d\xe6\x87\x39\xba\x03\xd5\xf3\x74\xd5\x0d\xbe\x96\xc7\xa3\x6b\x55\x86\x91\x54\x3e\xb3\x2d\xba\x0d\x4f\x2f\x3b\x13\x3b\x1d\x4c\xc7\xb8\x63\xd1\xe8\x59\xb1\xdf\xd9\x3e\xc7\xaa\x3d\x3c\x5a\xfd\x4b\x31\x7d\x14\x28\x2b\xa4\xcd\xa6\xef\x04\x11\xee\x4e\x4f\xa2\x40\x22\x65\x8a\x2b\x4f\xe0\x08\xa5\xe0\x6c\xb8\x53\xae\xd6\x1a\xcc\x27\x9e\xbe\x43\x5d\xdf\xaa\xd9\xb9\xa2\x43\xcd\x07\xa7\xe6\x64\x12\x0b\x03\xed\x1d\x37\x78\xff\x20\xfe\xeb\x12\xef\xae\xee\x58\x74\x2f\xf5\x3f\x03\x00\x00\xff\xff\xfd\x88\x62\xeb\xba\x0b\x00\x00"),
|
||||
},
|
||||
"/templates/alerts.html": &vfsgen۰CompressedFileInfo{
|
||||
name: "alerts.html",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title>Prometheus Time Series Collection and Processing Server</title>
|
||||
<title>{{ pageTitle }}</title>
|
||||
<link rel="shortcut icon" href="{{ pathPrefix }}/static/img/favicon.ico?v={{ buildVersion }}">
|
||||
<script src="{{ pathPrefix }}/static/vendor/js/jquery.min.js?v={{ buildVersion }}"></script>
|
||||
<script src="{{ pathPrefix }}/static/vendor/bootstrap-3.3.1/js/bootstrap.min.js?v={{ buildVersion }}"></script>
|
||||
|
|
|
@ -186,6 +186,7 @@ type Options struct {
|
|||
ConsoleLibrariesPath string
|
||||
EnableLifecycle bool
|
||||
EnableAdminAPI bool
|
||||
PageTitle string
|
||||
RemoteReadSampleLimit int
|
||||
RemoteReadConcurrencyLimit int
|
||||
}
|
||||
|
@ -751,6 +752,7 @@ func tmplFuncs(consolesPath string, opts *Options) template_text.FuncMap {
|
|||
},
|
||||
"consolesPath": func() string { return consolesPath },
|
||||
"pathPrefix": func() string { return opts.ExternalURL.Path },
|
||||
"pageTitle": func() string { return opts.PageTitle },
|
||||
"buildVersion": func() string { return opts.Version.Revision },
|
||||
"stripLabels": func(lset map[string]string, labels ...string) map[string]string {
|
||||
for _, ln := range labels {
|
||||
|
|
Loading…
Reference in a new issue