Make show annotations checkbox match query history checkbox (#3936)

After removing the checkbox in #3913 the only remaining element that
looked like it was the new Show Annotations checkbox on the Alerts page.
Which in turn didn't look like the Enable query history checkout on the
graph page. So:

1. This takes the Enable query history button as canonical.
2. Updates the show annotations button code to match it.
3. Simplifies the JS for the checkbox.
This commit is contained in:
James Turnbull 2018-03-09 08:39:28 -05:00 committed by Julius Volz
parent 50e6aff3fd
commit 4486ef013b
4 changed files with 41 additions and 38 deletions

View File

@ -131,7 +131,7 @@ func webUiTemplates_baseHtml() (*asset, error) {
return a, nil return a, nil
} }
var _webUiTemplatesAlertsHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\x4f\x8f\xe3\x26\x14\xbf\xcf\xa7\x78\xb2\xf6\xd0\x4a\x4d\xd0\x4a\x3d\xad\x88\xab\xd1\x5e\x7a\xd8\x5d\x55\x3b\xd3\xb9\x8e\x30\xbc\xc4\xec\x30\x60\x01\x49\x26\xa2\x7c\xf7\x0a\xb0\x1d\x27\x76\xda\xa9\xd4\x43\x2c\xe0\x3d\x7e\xef\xf7\xfe\x92\x10\x04\x6e\xa5\x46\xa8\x5a\x64\xa2\x8a\xf1\x0e\x80\x2a\xa9\x5f\xc0\x9f\x3a\xdc\x54\x1e\xdf\x3c\xe1\xce\x55\x60\x51\x6d\x2a\xe7\x4f\x0a\x5d\x8b\xe8\x2b\x68\x2d\x6e\x37\x55\x08\xd0\x31\xdf\xfe\x61\x71\x2b\xdf\x20\x46\xe2\x3c\xf3\x92\xa7\x3b\x84\x29\xb4\xde\xad\xb9\x73\xbf\x1d\x36\x21\x40\xb3\x97\x4a\x3c\xa1\x75\xd2\x68\x88\xb1\xaa\x93\x31\xc7\xad\xec\x3c\x38\xcb\x6f\x83\xfd\x18\xb1\x7e\xdc\x82\xa2\xa4\x00\xd5\x77\x21\xa0\x16\x31\xde\xdd\x9d\x7d\xe3\x46\x7b\xd4\x3e\xb9\x47\x85\x3c\x00\x57\xcc\xb9\x4d\x3e\x66\x52\xa3\x5d\x6d\xd5\x5e\x8a\xc2\xa7\xfd\x58\xdf\x67\x5b\x94\xb4\x1f\xf3\xc9\xe4\xc6\x56\x2a\x8f\xd6\x65\x4d\x00\xa0\xcd\xde\x7b\xa3\xfb\x58\x95\x4d\x35\xe8\x7a\x66\x77\xe8\x1d\x34\x5e\xa7\xdf\xaa\xb3\xf2\x95\xd9\x13\xb8\xd6\x1c\x57\x4c\x6b\x93\x7c\x33\x7a\x04\x03\xa0\x72\xb8\xbb\x53\xa7\xae\x95\xdc\x68\x18\x57\xab\xbd\xe6\x2d\xf2\x17\x14\xc9\x59\x59\xc3\x43\x6b\x8e\x30\xc1\xe9\x29\x91\x42\x23\x33\x27\x42\x1e\xf2\xc2\xb3\x46\xe1\x99\x58\xda\xe4\xef\xaa\x31\x56\xa0\x45\xd1\x6f\xb9\x51\x8a\x75\x0e\x45\x4f\x8a\xfa\xc6\x88\x53\x59\x87\xf0\x21\x27\xe1\xc1\x33\x8f\x8f\xe6\xbb\x39\x7e\x4e\x78\xf0\x69\x03\xeb\xfb\x05\x41\xae\xa5\x74\xcd\x32\xbd\xc3\x5e\x47\xea\xdd\xf7\xbd\xc2\x41\x58\x50\xb9\x97\x07\x2c\x41\x2f\x68\x93\x83\x51\x91\x7a\x3b\x38\x10\x82\xd4\x02\xdf\x60\x99\xcf\x3a\x1f\xc4\x08\x59\xfa\x9c\xea\x1a\xed\x39\xc8\x40\xbd\xa8\xcf\x91\xce\xa1\xe5\x2d\x1e\xac\xd1\x2b\x61\x8e\xba\x8f\x2e\x6d\xea\x10\xd6\xdf\xd8\x2b\xc6\x48\x49\x53\xc3\x4f\x21\x28\xd4\x70\xc1\x36\x19\xc9\xdb\x9f\x29\xf1\x62\x30\x41\x89\xb7\xf5\x9c\x75\xa1\x23\xd0\x33\xa9\xdc\x15\x9f\x71\x53\xca\x6d\xba\x07\xa0\x9d\xc5\x9a\x72\x23\x30\x51\xfa\xfd\xf1\xeb\x97\x07\x2d\xbb\x0e\xfd\xa4\x59\x12\xc9\xac\x41\x49\xd2\x9e\xe2\x91\x2b\xc0\x10\xe4\xf6\xda\x8d\xa9\xfe\x7b\x6b\xa5\x35\x07\xb4\x63\xdd\x68\x81\xda\xa1\xe8\x83\x8e\x0a\x5f\x51\x7b\xf7\x9c\xc5\xd5\x95\x3f\xe7\x98\x5c\x49\x92\xac\xad\xbf\xb0\x06\x95\xa3\xc4\xb7\x4b\xd2\x9c\xdd\x5b\xc2\x52\x39\xf0\x20\x35\xbf\xa9\xf3\xc4\xd4\x7e\x41\x38\xcd\xda\x10\xa8\x52\xb9\xb7\x63\x95\x7d\x99\xdb\x10\xd7\x47\x13\x2c\x95\x9c\xfb\x05\x3e\x1c\x12\x8b\x5c\xed\xc5\xdd\xf5\x57\xd6\x5d\x61\xf7\x70\xae\x63\x7a\x88\x57\xbe\x0d\xf9\x3b\xcc\x93\xaa\x0e\xa1\xa0\xc6\x98\x5a\xa3\x20\xc7\x58\x51\x92\x6e\x2e\x51\x29\xf3\xf1\xca\x0c\x99\xd3\xce\x9d\x32\x35\x9f\x93\x5b\x52\xbc\x0a\xa1\xef\x34\xf8\x0b\xa6\x7d\x58\x9a\x30\x46\x48\xb3\x1b\x9f\xa5\x16\x92\x33\x6f\x2c\xa4\xa7\x64\xb5\xef\x3a\xb4\x9c\x39\x4c\xb4\x87\x4e\xed\x99\xde\xa2\x10\xc2\x30\x11\xfc\xfa\xcf\xc7\xcf\x49\xff\xa6\xe2\x53\x71\x7e\xae\xb1\x94\x5e\x90\x5b\x58\xdf\x9f\x27\xe8\x42\x0e\x52\xad\xe6\x47\x6f\x53\x09\xe9\x3a\xc5\x4e\x9f\xb4\xd1\x58\x5d\x36\xf5\xe2\x34\x1f\x11\x5a\xe0\x46\x25\x0f\x37\xd5\xaf\x55\x3d\xb1\xf7\x9e\x22\xfc\x3f\x08\x88\x0b\x02\xb3\x82\xa0\x42\xfd\xa7\x82\xfd\xe7\x88\x0d\x98\x7e\x52\x97\x94\x08\x3f\x37\x91\xb4\x52\xd2\x86\x8a\xa5\x44\x2c\x76\xce\x52\xb9\xe6\xb9\x36\xa3\xfd\xbe\xb4\xcf\xf1\xe6\x67\x94\xe4\xc9\x75\x39\x37\x2f\x95\x96\x47\x7e\x08\xa8\x1c\x4e\x5f\xad\x9b\x93\x1e\xe0\x9b\x29\xad\x23\xf5\x0e\x6c\x7a\x16\xa1\xfc\x63\x11\xff\x6e\x64\xa4\x42\xc9\xf8\x46\x8f\xa4\xfb\x99\x3f\xa8\xfd\x1d\x00\x00\xff\xff\xdd\xd1\xbd\xaf\xe5\x09\x00\x00") var _webUiTemplatesAlertsHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\xcd\x6e\x1b\x37\x10\xbe\xfb\x29\x06\x8b\x1c\x5a\xa0\x12\x11\xa0\xa7\x80\xda\xc2\xc8\xa5\x87\x24\x28\x62\xd7\x57\x83\x22\x47\x5e\x26\x34\xb9\x20\x29\xd9\x02\xcb\x77\x2f\x48\xee\xae\x56\xfb\xd3\xb8\x40\x2e\xc2\x92\x33\xf3\xcd\x37\xbf\x54\x08\x02\x0f\x52\x23\x54\x0d\x32\x51\xc5\x78\x03\x40\x95\xd4\xdf\xc1\x9f\x5b\xdc\x55\x1e\x5f\x3d\xe1\xce\x55\x60\x51\xed\x2a\xe7\xcf\x0a\x5d\x83\xe8\x2b\x68\x2c\x1e\x76\x55\x08\xd0\x32\xdf\xfc\x65\xf1\x20\x5f\x21\x46\xe2\x3c\xf3\x92\x27\x1b\xc2\x14\x5a\xef\xb6\xdc\xb9\x3f\x4e\xbb\x10\x60\x7f\x94\x4a\x3c\xa0\x75\xd2\x68\x88\xb1\xaa\x93\x33\xc7\xad\x6c\x3d\x38\xcb\xd7\xc1\xbe\x0d\x58\xdf\xd6\xa0\x28\x29\x40\xf5\x4d\x08\xa8\x45\x8c\x37\x37\x97\xd8\xb8\xd1\x1e\xb5\x4f\xe1\x51\x21\x4f\xc0\x15\x73\x6e\x97\xaf\x99\xd4\x68\x37\x07\x75\x94\xa2\xf0\x69\xde\xd7\xb7\xd9\x17\x25\xcd\xfb\x7c\x33\xb2\x70\x8d\x79\xd9\x30\xad\x4d\xe2\x65\xb4\xcb\x26\x00\x40\x65\xaf\xf1\xa4\xce\x6d\x23\xb9\xd1\x30\x7c\x6d\x8e\x9a\x37\xc8\xbf\xa3\x48\x34\x65\x67\x02\x40\xf7\x47\xef\x8d\xee\x32\x5d\x0e\xd5\xaa\x27\xf0\xd2\x2b\x2c\x02\xb8\xa2\x70\x37\xb9\xa1\xa4\x60\x65\xf2\x44\xc8\x53\xfe\xf0\x6c\xaf\xb0\x47\x2f\x87\xfc\xbb\xd9\x1b\x2b\xd0\xa2\xe8\x8e\xdc\x28\xc5\x5a\x87\xa2\x8b\x8d\xfa\xbd\x11\xe7\xf2\x1d\xc2\xbb\x5c\x87\x3b\xcf\x3c\xde\x9b\xaf\xe6\xe5\x63\xc2\x83\x0f\x3b\xd8\xde\x2e\x08\x72\x3b\x25\x33\xcb\xf4\x13\x76\x3a\x52\x3f\x7d\x3d\x2a\xec\x85\x05\x95\x7b\x79\xc2\x92\xf7\x82\x36\xba\x18\x14\xa9\xb7\x7d\x00\x21\x48\x2d\xf0\x15\x96\xf9\x6c\xf3\x45\x8c\x90\xa5\x8f\xa9\xb5\xd1\x56\x43\xe2\x81\x7a\x51\x5f\x4a\x96\x6b\xc4\x1b\x3c\x59\xa3\x37\xc2\xbc\xe8\x52\x26\xa0\xfb\x3a\x84\xed\x17\xf6\x8c\x31\x52\xb2\xaf\xe1\x97\x10\x14\x6a\xb8\x62\x9b\x9c\xe4\xe3\xaf\x94\x78\xd1\xbb\xa0\xc4\xdb\x7a\xce\xba\xd0\x11\xe8\x99\x54\x6e\xc2\x67\x38\x94\x8e\x1b\x9f\x01\x68\x6b\xb1\xa6\xdc\x08\x4c\x94\xfe\xbc\xff\xfc\xe9\x4e\xcb\xb6\x45\x3f\x9a\x97\x44\x32\x6b\x50\x92\xb4\xc7\x78\x64\x02\x18\x82\x3c\x4c\xc3\x18\xeb\xbf\xb5\x57\x1a\x73\x42\x3b\xf4\x8d\x16\xa8\x1d\x8a\x2e\xe9\xa8\xf0\x19\xb5\x77\x8f\x59\x5c\x4d\xe2\xb9\xe4\x64\x22\x49\xb2\xa6\xfe\xc4\xf6\xa8\x1c\x25\xbe\x59\x92\xe6\xea\xae\x09\x4b\xe7\xc0\x9d\xd4\x7c\x55\xe7\x81\xa9\xe3\x82\x70\x5c\xb5\x3e\x51\xa5\x73\xd7\x73\x95\x63\x99\xfb\x10\xd3\xab\x11\x96\x4a\xc1\xfd\x06\xef\x4e\x89\x45\xee\xf6\x12\xee\xf6\x33\x6b\x27\xd8\x1d\x9c\x6b\x99\xee\xf3\x95\xad\x21\xff\x6e\x5a\x2b\x9f\x99\x3d\x57\x75\x08\x05\x35\xc6\x34\x1a\x05\x39\xc6\x8a\x92\x64\xb9\x44\xa5\xac\xc8\x89\x1b\x32\xa7\x9d\x27\x65\xec\x3e\x17\xb7\x94\x78\x13\x42\x37\x69\xf0\x0f\x8c\xe7\xb0\x0c\x61\x8c\x90\xd6\x37\x3e\x4a\x2d\x24\x67\xde\x58\x48\xaf\xc9\xe6\xd8\xb6\x68\x39\x73\x98\x68\xf7\x93\xda\x31\x5d\xa3\x10\x42\xbf\x11\xfc\xf6\xef\xfb\x8f\x49\x7f\x55\xf1\xa1\x04\x3f\xd7\x58\x2a\x2f\xc8\x03\x6c\x6f\x2f\xbb\x73\xa1\x06\xa9\x57\xf3\xbb\xb7\xab\x84\x74\xad\x62\xe7\x0f\xda\x68\xac\xae\x87\x7a\xe1\x51\x18\x21\x34\xc0\x8d\x4a\x11\xee\xaa\xdf\xab\xfa\x76\xbc\xab\x7f\xdc\x84\x3f\x83\x80\xb8\x22\x30\x6b\x08\x2a\xd4\xff\x6a\xd8\xff\xce\x58\x8f\xe9\x47\x7d\x49\x89\xf0\x73\x17\x49\x2b\x15\xad\xef\x58\x4a\xc4\xe2\xe4\x2c\xb5\x6b\xde\x6b\x33\xda\x6f\x2b\xfb\x1c\x6f\x7e\x47\x49\xde\x5c\xd7\x7b\xf3\x5a\x69\x79\xe5\x87\x80\xca\xe1\xf8\xd5\x5a\xdd\xf4\x00\x5f\x4c\x19\x1d\xa9\x9f\xc0\xa6\x67\x11\xca\x9f\x16\xf1\x63\x27\x03\x15\x4a\x86\x37\x7a\x20\xdd\xed\xfc\x5e\xed\xdf\x00\x00\x00\xff\xff\x1b\x6e\x06\x91\xe8\x09\x00\x00")
func webUiTemplatesAlertsHtmlBytes() ([]byte, error) { func webUiTemplatesAlertsHtmlBytes() ([]byte, error) {
return bindataRead( return bindataRead(
@ -146,7 +146,7 @@ func webUiTemplatesAlertsHtml() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "web/ui/templates/alerts.html", size: 2533, mode: os.FileMode(420), modTime: time.Unix(1520598177, 0)} info := bindataFileInfo{name: "web/ui/templates/alerts.html", size: 2536, mode: os.FileMode(420), modTime: time.Unix(1520602638, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@ -246,7 +246,7 @@ func webUiTemplatesServiceDiscoveryHtml() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "web/ui/templates/service-discovery.html", size: 2547, mode: os.FileMode(420), modTime: time.Unix(1520598182, 0)} info := bindataFileInfo{name: "web/ui/templates/service-discovery.html", size: 2547, mode: os.FileMode(420), modTime: time.Unix(1520602638, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@ -291,7 +291,7 @@ func webUiTemplatesTargetsHtml() (*asset, error) {
return a, nil return a, nil
} }
var _webUiStaticCssAlertsCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x8e\xd1\x6a\xc3\x30\x0c\x45\xdf\xf3\x15\x82\x3e\x27\x98\xb6\x6c\x5d\xf2\x31\xc3\xb5\xe4\x45\xd4\x93\x8a\xac\x50\xb6\xb1\x7f\x1f\x99\x9b\x87\xc1\x06\xc3\x6f\xf7\x1e\xeb\x9e\x21\x16\x32\x7f\x9e\x29\x22\x19\x7c\x74\x00\x69\xb1\xaa\x36\xc2\x55\x59\x9c\x6c\xea\x3e\xbb\xee\x4e\x21\x79\xe4\x52\xbf\x31\xe4\x7a\x2d\xf1\x6d\x04\x51\xa1\x06\x65\x2e\x4e\x56\xe1\xbc\xb8\xab\x0c\x75\xd6\x5b\x1f\x45\xd4\xa3\xb3\x4a\xfb\x06\x70\x8e\xe9\xf2\x62\xba\x08\xf6\x49\xcb\xba\x74\x9b\xd9\x69\x6a\xa5\x1a\x92\x6d\xc5\x2e\xe2\xfa\x7e\x54\x16\x91\x97\x3a\x42\x68\xe9\x46\x1e\x0e\x87\x16\x64\x15\xef\x2b\xbf\xd3\x08\x61\x38\xd1\xeb\xbf\xd4\x06\xae\x7d\x9a\x29\x5d\x08\xef\x96\xdb\xdd\x9c\xf3\xf4\x87\xf6\x6e\x7f\x7a\x08\x4f\xe1\x57\xf1\x7d\x38\xe2\xe3\x71\xdd\xfe\x0a\x00\x00\xff\xff\xed\xcc\x2c\x5d\x61\x01\x00\x00") var _webUiStaticCssAlertsCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8f\xd1\x4a\x03\x41\x0c\x45\xdf\xe7\x2b\x02\x3e\xcf\x52\x7d\x90\x3a\xfd\x18\xc9\xce\xc4\x6e\xe8\x34\x19\x32\xd9\x8a\x8a\xff\x2e\xdd\x5d\x11\xc1\xfa\x7a\x39\x37\xf7\x64\xc0\x4a\xe6\xcf\x13\x61\x21\x83\x8f\x00\x90\x67\xeb\x6a\x09\x9a\xb2\x38\xd9\x21\x7c\x86\xb0\x51\x85\x1c\xb9\xf6\x05\x2b\xdc\x5b\xc5\xb7\x04\xa2\x42\x0b\x54\xf8\x32\xf4\x49\x5f\x23\x8a\xa8\xa3\xb3\xca\x8a\xbe\xa8\x78\xec\xfc\x4e\x09\x76\xc3\x9e\xce\x87\x00\xd0\xb0\x14\x96\x63\x74\x6d\x09\xee\x7f\x67\xa3\xba\xeb\x79\x8b\x6f\x1c\x4e\x93\x5e\xfe\x11\xfe\xd3\x65\x9c\xdd\x55\x96\xce\x88\xf9\x74\x34\x9d\xa5\xc4\xac\xf5\xda\x76\x43\xe9\x0d\x8d\xc4\xaf\x2e\xa3\x5a\x21\xfb\xfe\x0e\x40\x67\xaf\x2c\xf4\x13\x6c\xb2\x09\x76\x37\x07\x07\xee\x31\x4f\x94\x4f\x54\x56\xd1\x75\xe9\xee\x61\xff\xb8\x7b\x5a\x6b\x5f\x01\x00\x00\xff\xff\x02\xa7\x24\xdc\x7f\x01\x00\x00")
func webUiStaticCssAlertsCssBytes() ([]byte, error) { func webUiStaticCssAlertsCssBytes() ([]byte, error) {
return bindataRead( return bindataRead(
@ -306,7 +306,7 @@ func webUiStaticCssAlertsCss() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "web/ui/static/css/alerts.css", size: 353, mode: os.FileMode(420), modTime: time.Unix(1520598177, 0)} info := bindataFileInfo{name: "web/ui/static/css/alerts.css", size: 383, mode: os.FileMode(420), modTime: time.Unix(1520602638, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@ -451,7 +451,7 @@ func webUiStaticImgFaviconIco() (*asset, error) {
return a, nil return a, nil
} }
var _webUiStaticJsAlertsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x94\xb1\x6e\xdb\x30\x10\x86\x77\x3d\xc5\x55\xf0\x40\x0e\x22\xba\x1b\x9e\x3a\xf5\x29\x0a\x86\x3c\x8b\x87\x30\x47\x81\xa4\x9d\x04\x85\xde\xbd\x90\x4c\x59\x54\xa2\xa6\xae\x06\x2d\xfc\xef\x78\xff\xf7\x9f\x74\xbe\xb0\xc9\x14\x18\x88\x29\x0b\x09\xbf\x1b\x80\x83\x68\x95\xf6\x18\xf3\x2f\x87\xda\x62\x6c\xa5\x32\x9e\xcc\xb3\x58\xc4\x45\x07\x70\xd5\x11\xf0\x6d\xd0\x6c\x31\xfe\x34\x81\xe1\x04\x07\x91\x1d\x25\xa9\xce\xc4\x56\xb4\xa4\xc8\x04\xee\x8c\xc3\x6b\x0c\xdc\xd9\xf0\xca\xad\x3c\xce\xb5\x74\x06\x51\xd7\x2a\x8f\xdc\x67\x07\xdf\x4e\x27\xf8\xbe\x5c\x00\x9b\xf6\x2a\xe2\x4b\xb8\xe2\x0f\xaf\x53\x12\xed\x4e\x67\xa5\xad\xdd\x3b\xbd\x0c\xcb\xad\x23\xa0\x4f\x78\xef\x3e\x19\x30\xc1\x7b\x3d\xa4\xc7\x1c\xac\x9d\x60\x5b\xf8\xc5\x6c\x53\xcd\xdf\x26\xab\x89\x8c\xf3\x7b\xb9\x9e\xf1\x2d\x0b\xa9\x72\xe8\x7b\x8f\x62\x96\x8c\xf2\xd8\x94\x7c\xce\xe4\x33\xc6\x04\x4f\x97\x9c\x03\xab\xe4\xc2\x6b\xa7\x99\x43\xd6\x53\x40\xe9\x73\x64\xb8\x20\x35\x81\x53\x2e\x75\xb3\x5b\x54\x59\xc7\x1e\x73\x99\xe2\x76\x4e\xe6\xe3\xa9\x32\x8e\xbc\x8d\xc8\xa2\xa5\xf6\x36\xc8\x2d\xc4\x49\xaa\x9c\x4e\xc5\x5e\xef\xdf\x07\x37\x7b\xbc\xb0\x71\x68\x9e\xd1\xb6\x72\xcd\x93\x3e\xb1\xda\x2d\x28\xea\xe9\xa9\xd0\xad\xd2\x59\x08\x4f\x99\xbb\x21\xd2\x8b\x8e\xef\x6b\x2c\x05\x49\x05\x3c\x75\xf7\xbe\x65\xee\x7a\xc9\xb7\xd8\x26\x92\xe2\xde\x6b\x57\xb5\x7e\x16\xb5\xb8\x6c\xd6\x97\x44\xe6\x31\x1e\xa5\xb1\x63\xf1\x5f\x54\x2a\x80\x1f\x68\x6c\xb7\xf3\x7f\x80\x38\xb2\xf8\x30\x90\x5a\x3c\x96\x8d\x1d\x9b\xe6\x20\xa6\xdf\x8b\x3c\x36\x7f\x02\x00\x00\xff\xff\x68\x59\xca\x5d\x6f\x04\x00\x00") var _webUiStaticJsAlertsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x54\x4d\xca\xdb\x30\x10\xdd\xfb\x14\x53\x13\xb0\xb4\xb0\xe8\x3e\x64\x55\xba\xe8\x29\x8a\x90\x26\x96\xf8\xd4\x91\x91\x14\x27\xa5\xf8\xee\xc5\xff\x36\xb1\x43\xb2\xf1\x46\x6f\xde\xbc\x9f\xc1\xd7\x1b\xa9\x64\x3d\x81\x25\x9b\x18\x87\x7f\x19\xc0\x89\xe5\x42\x3a\x0c\xe9\xb7\x41\xa9\x31\xe4\x5c\x28\x67\xd5\x17\x9b\xc0\x23\x0e\xa0\x91\x01\xf0\x51\x4b\xd2\x18\x7e\x29\x4f\x70\x81\x13\x4b\xc6\x46\x2e\xae\x96\x34\xcb\xad\xb0\xca\x53\xa9\x0c\x36\xc1\x53\xa9\xfd\x9d\x72\x7e\xee\x67\xed\x15\xd8\x7a\x56\x38\xa4\x2a\x19\xf8\x76\xb9\xc0\xf7\x69\x01\x6c\xe8\x45\xc0\x3f\xbe\xc1\x1f\x4e\xc6\xc8\xf2\x1d\x66\x21\xb5\xde\x7b\xbd\xd5\xd3\xd6\x16\xd0\x45\x9c\xd9\x3b\x03\xca\x3b\x27\xeb\xf8\x9e\x83\x85\x09\xb6\x83\x2f\xb4\x75\x33\x47\xca\xd6\x89\xb4\xfd\x77\x5a\x4f\xf8\x48\x8c\x8b\xe4\xab\xca\x21\xeb\x21\x2d\x3f\x67\x43\x3f\xda\x36\x22\x1a\x7f\x2f\x25\x91\x4f\xb2\x2b\x25\x1e\xd7\xa4\x3c\xc5\x04\x49\x86\x0a\xd3\x4f\xd7\x5b\x2c\xf6\x18\x8a\x51\xc8\x80\xb7\x73\x1c\xe3\x20\x17\xca\x58\xa7\x03\x12\x2b\x6c\x31\x68\x19\x7a\xec\xa0\xc2\xc8\x38\x38\x2c\x2a\xf7\xb7\x36\xbd\xcd\x1b\x29\x83\xea\x0b\x75\xc1\x97\x4a\xd7\x17\xb6\xd5\xdf\x09\x62\x73\xbe\x07\xb8\xe5\x2a\x9f\xe1\x07\x52\x37\xe5\xec\xcb\x5b\x0a\x5a\xbd\xf7\xaf\xc5\x6a\xc3\xc4\xbf\x42\xdb\x58\xce\x24\x9b\x1b\x7b\x19\xcc\xc8\xfc\x4e\x28\xc6\x6a\xfc\x20\x94\x67\xf8\x87\xa1\x8c\xd2\x76\x03\x59\x05\xb6\x13\xca\x86\x70\x27\x97\xf1\x84\xdb\x2c\x3b\xb1\xee\x7f\xc3\xcf\xd9\xff\x00\x00\x00\xff\xff\x96\xfe\x01\x29\x80\x04\x00\x00")
func webUiStaticJsAlertsJsBytes() ([]byte, error) { func webUiStaticJsAlertsJsBytes() ([]byte, error) {
return bindataRead( return bindataRead(
@ -466,7 +466,7 @@ func webUiStaticJsAlertsJs() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "web/ui/static/js/alerts.js", size: 1135, mode: os.FileMode(420), modTime: time.Unix(1520598177, 0)} info := bindataFileInfo{name: "web/ui/static/js/alerts.js", size: 1152, mode: os.FileMode(420), modTime: time.Unix(1520602638, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }

View File

@ -6,16 +6,24 @@
display: none; display: none;
} }
.filters button.show-annotations { div.show-annotations {
background-color: white; font-size: 0.8em;
border-color: #adadad; padding-top: 1em;
border-radius: 0; padding-bottom: 1em;
color: #333;
font-size: 0.8em;
} }
.filters button.show-annotations.is-checked { div.show-annotations:hover {
color: #fff; cursor: pointer;
background-color: #286090;
border-color: #204d74;
} }
div.show-annotations button {
background-color: transparent;
border: none;
outline: none;
padding: 0;
}
div.show-annotations.is-checked {
color: #286090;
}

View File

@ -10,24 +10,20 @@ function init() {
$(this).next().toggle(); $(this).next().toggle();
}); });
$(".filters button.show-annotations").click(function(e) { $("div.show-annotations").click(function() {
const button = $(e.target); const targetEl = $('div.show-annotations');
const icon = $(e.target).children("i"); const icon = $(targetEl).children('i');
if (icon.hasClass("glyphicon-unchecked")) { if (icon.hasClass('glyphicon-unchecked')) {
icon.removeClass("glyphicon-unchecked") $(".alert_annotations").show();
.addClass("glyphicon-check btn-primary"); $(".alert_annotations_header").show();
button.addClass("is-checked"); $(targetEl).children('i').removeClass('glyphicon-unchecked').addClass('glyphicon-check');
targetEl.addClass('is-checked');
$(".alert_annotations").show(); } else if (icon.hasClass('glyphicon-check')) {
$(".alert_annotations_header").show(); $(".alert_annotations").hide();
} else if (icon.hasClass("glyphicon-check")) { $(".alert_annotations_header").hide();
icon.removeClass("glyphicon-check btn-primary") $(targetEl).children('i').removeClass('glyphicon-check').addClass('glyphicon-unchecked');
.addClass("glyphicon-unchecked"); targetEl.removeClass('is-checked');
button.removeClass("is-checked");
$(".alert_annotations").hide();
$(".alert_annotations_header").hide();
} }
}); });
} }

View File

@ -6,10 +6,9 @@
{{define "content"}} {{define "content"}}
<div class="container-fluid"> <div class="container-fluid">
<h1>Alerts</h1> <h1>Alerts</h1>
<div class="filters"> <div class="show-annotations">
<button type="button" class="targets btn btn-primary show-annotations"> <i class="glyphicon glyphicon-unchecked"></i>
<i class="glyphicon glyphicon-unchecked"></i> Show annotations <button type="button" class="show-annotations" title="show annotations">Show annotations</button>
</button>
</div> </div>
<table class="table table-bordered table-collapsed"> <table class="table table-bordered table-collapsed">
<tbody> <tbody>