mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
Sort labels
This commit is contained in:
@@ -2,20 +2,20 @@
|
||||
<div id="newSilenceAlert" class="alert alert-danger hidden" role="alert"></div>
|
||||
<form id="newSilenceForm">
|
||||
<label class="control-label">Labels to match</label>
|
||||
<% _.each(labels, function(label_values, label_key) { %>
|
||||
<% _.each(Alerts.SortMapByKey(labels), function(label) { %>
|
||||
<div>
|
||||
<label>
|
||||
<select class="selectpicker silence-label-picker"
|
||||
data-label-key="<%= label_key %>"
|
||||
data-label-key="<%= label.key %>"
|
||||
data-style="silence-label-select"
|
||||
<% if (Object.keys(label_values).length > 10) { %>data-live-search="true"<% } %>
|
||||
<% if (Object.keys(label_values).length > 1) { %>data-actions-box="true"<% } %>
|
||||
<% if (Object.keys(label.value).length > 10) { %>data-live-search="true"<% } %>
|
||||
<% if (Object.keys(label.value).length > 1) { %>data-actions-box="true"<% } %>
|
||||
multiple>
|
||||
<% _.each(label_values, function(label, label_val) { %>
|
||||
<option <% if (label.selected) { %>selected="selected"<% } %>
|
||||
value="<%= label.value %>"
|
||||
data-content="<span class='<%= label.attrs.class %>' style='<%= label.attrs.style %>'><%- label.attrs.text %></span>">
|
||||
<%- label.attrs.text %>
|
||||
<% _.each(Alerts.SortMapByKey(label.value), function(label_val) { %>
|
||||
<option <% if (label_val.value.selected) { %>selected="selected"<% } %>
|
||||
value="<%= label_val.key %>"
|
||||
data-content="<span class='<%= label_val.value.attrs.class %>' style='<%= label_val.value.attrs.style %>'><%- label_val.value.attrs.text %></span>">
|
||||
<%- label_val.value.attrs.text %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
@@ -255,7 +255,7 @@ func templatesModalHtml() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesSilenceHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x57\x4d\x6f\xdb\x38\x13\xbe\xfb\x57\x10\x7c\x61\x24\x01\x22\xeb\x5d\x60\xb1\x87\x40\x16\xd0\x36\x5d\xb4\x8b\x6d\x7b\xc8\x29\xa7\x62\x4c\x8e\x2d\x36\x14\xa9\x25\x29\x27\xc6\xa2\xff\x7d\x41\x52\xb2\x3e\x2c\xb5\xae\x7b\xd8\xc3\xea\x90\x88\xe4\x7c\x3e\xcf\xcc\x98\xca\x2c\x33\xa2\x72\xc4\x1d\x2a\x5c\x53\xa8\x2a\x29\x18\x38\xa1\x55\xfa\xc5\x6a\x45\x89\xe0\x6b\x6a\x85\x44\xc5\x30\xd9\x6a\x53\xd2\x7c\x91\x71\xb1\x0f\xfb\x0a\x9f\x1f\xe2\xd1\x2b\x89\xc6\x51\xc2\x24\x58\xbb\xa6\xe0\x57\x24\xfc\x4d\x38\xa8\x1d\x1a\x52\x08\xce\x51\x51\x62\xb4\xc4\x46\x80\xe6\x59\xca\xc5\x3e\x5f\x64\xde\xee\xc8\xe0\xef\xd1\x15\x21\x99\x84\x0d\xca\xd6\x32\xd3\xca\x19\x2d\x93\xb0\x49\xf3\x3f\xfd\x3f\x4b\x9c\x26\x25\x38\x56\x64\x69\xd8\x0f\x6a\x4b\xf2\x79\x85\xc0\x8a\xeb\xb0\x65\x6f\xc9\xb6\x56\xcc\xe7\x15\x37\x3e\xef\x41\xd6\x68\x6f\x49\x5c\x3d\xe1\xe1\x86\xfc\x4d\x96\x5e\x95\x90\x2c\x84\x45\xc2\x93\x1d\x4d\x36\x6b\x8b\x12\x99\x6b\x03\x8a\xab\x4a\xb0\x27\x34\xa4\xc5\x29\xa8\x24\x71\x93\x1e\x35\xdb\x87\x83\x83\x46\xe4\x09\x0f\x6b\x9a\x2d\xd7\x5d\x14\x64\x99\xcf\x68\x58\x77\xf0\xd0\x0d\x7d\x44\xf7\xa7\x1a\xd9\x92\x88\x2d\xb9\xfe\xb4\xf9\x82\xcc\xad\x9e\xf0\x60\x07\x69\xdf\xac\x24\xaa\x9d\x2b\x48\x4e\x7e\xf9\x7f\x4c\x3c\x46\x25\xf6\x98\x58\x04\xc3\x8a\x35\x75\xa6\x46\x9a\x2d\xc9\xd7\x16\x96\x0b\x1d\xf4\xec\x43\x60\xc0\x26\x1b\xfd\xf2\x1d\xfb\x65\x2d\x9d\xa8\x24\xf6\x4f\x46\x9c\x1e\x29\x1c\x32\xdb\x52\xba\x07\xd9\xa3\xb4\x67\x45\x57\x5e\xb8\xcd\x20\x08\xaf\x22\x8e\xc8\xa3\x46\xbb\x6a\xe9\x45\x3e\x1b\x67\x7c\x42\x24\x3d\x26\x57\x61\x63\x92\xcb\x1e\xa3\xbe\x98\x51\xb9\x35\xcd\x6c\x05\xaa\xa9\xa8\xab\xce\x08\x38\x67\xec\x2a\x6c\x93\x65\x7e\x45\x62\x05\x9c\x08\x84\x6d\x2f\x90\x67\xcb\x64\x70\xe2\xf0\xc5\x91\x65\x9e\xa5\xde\x7e\x4e\xa7\x58\x9c\x54\x18\x23\x96\x46\xc8\x46\x5c\x7c\xbd\xe9\x8b\x66\x69\xc4\xaa\xe9\xa0\x5e\x27\xa6\x4d\x37\x1d\x55\xfc\x7b\x61\xba\x0e\xaa\xc0\x80\xd3\x86\xc6\x13\x3f\x5c\x9a\x23\xa3\x9f\x69\xd7\x91\xdd\x0c\x90\x89\x2d\x93\xdf\xe8\xb0\x45\x67\x46\xc4\x83\x03\xe3\x2c\x01\xd7\x0b\x69\x6c\x51\xa8\xaa\x76\xc9\xce\xe8\xba\xf2\xcc\x20\xed\xb7\x7b\x47\x4d\x5f\x2e\x01\xce\xb5\x1a\x40\x9a\x89\x56\x6e\x0b\x64\x0b\x09\x03\x89\x8a\x83\xf1\x73\x4e\x0c\x80\xf2\x6c\x74\xeb\x60\xb5\x99\xbf\xde\xbb\x13\x25\x9e\xd4\x4d\x6b\x59\x9b\x32\x69\x32\x24\xad\xf0\xdc\xa4\x09\xa3\x3b\xa4\xff\xea\x74\x44\xf4\x4a\xb6\xd4\x25\x2a\x77\x7d\xb3\xf2\xd6\xc1\x5d\xd3\xc7\xc7\xc7\xc7\xe4\xc3\x87\xe4\xfe\x9e\xbc\x7b\x77\x57\x96\x77\xd6\xd2\x9b\xa9\x6a\x56\x50\xe2\x37\x7c\x18\xfc\xab\x16\x06\xf9\x11\xf3\xf4\x38\x58\xfb\xaf\x17\x73\xfb\x56\xf1\xff\x2e\xb3\xa8\xf8\xb9\xbc\x02\xe7\xd7\xbf\xde\x92\xab\x42\xd7\xc6\x5e\x5d\xcc\xf3\x8c\xc7\x73\x58\x6e\x5e\xce\xee\xfc\x80\x46\xa0\x63\x62\x00\xf4\xc8\xea\xea\xe4\x5c\x36\xc7\x5c\xa2\xda\xa3\xd4\x15\x0e\xb8\x1c\x32\x39\xe0\x11\x4b\x10\x72\x84\xc1\x04\x85\x23\x09\x4f\x18\x33\x08\x0e\xf9\xeb\xc3\xe8\xac\x92\xc0\xb0\xd0\x92\xa3\x59\xd3\xb7\x13\xe6\x23\xfa\x73\xea\x43\xf8\xa7\x10\xff\x57\x70\x65\xba\xf4\xd5\x77\x2e\xac\xfe\x97\xe7\x32\x54\x1b\x3f\xdf\xc0\xf4\xcd\xa4\x48\x83\xea\xe4\xd9\xf7\x31\x9d\xaf\x62\x68\x0f\x7c\x4a\x49\x59\xfb\xdb\x43\xfc\xbd\x77\x7a\xb7\x93\xc1\xa7\x94\x50\x59\xa4\xa4\x30\xb8\x5d\xd3\xff\x35\x77\xba\x3f\x1e\x3e\x7d\xa4\x04\x8c\x80\x04\x5f\x2a\x50\xdc\xdf\x40\xb6\x20\xbd\x64\xd8\x6d\x50\xb0\xc7\x5b\x60\xd0\xe8\xf0\x1c\x31\x50\xe0\xde\x68\x95\x18\xb1\x2b\x46\x3c\xcc\x48\x72\xfd\xac\x8e\x82\x59\x0a\xf9\xe2\x64\x3a\x37\x81\xf7\xbe\x0a\x7a\x31\x64\xd5\x44\xee\x2d\x86\x55\x2b\x63\x70\xac\xfe\x5a\xea\x8d\xf7\x5b\x19\x9c\x2f\xdd\x60\x92\xa1\x72\x68\x5a\x9b\x9b\xda\x39\xad\xfa\xd6\x1e\xea\x4d\x29\x1c\x6d\x8a\xca\x36\xab\xc6\xc2\xc6\x29\xb2\x71\x2a\xb1\x35\x63\x68\x2d\xcd\xdf\x84\x96\xca\xd2\x68\xa7\xe7\x3a\x4b\x7d\xd5\xf9\xff\xf1\xeb\x28\x5f\x2c\x7e\xf4\x3b\xa9\xf3\xb2\xe8\x67\xd1\x8a\x18\xb4\xb5\x74\x89\x60\x5a\x91\x5e\x66\xf1\xbd\x53\x9d\xe4\x8a\x3d\x25\x4c\x18\x26\xdb\x99\xd5\x06\x5d\xcd\x41\xd5\x7c\x53\x91\xf7\xf7\x77\xc3\x86\x1e\x7a\xf3\xb7\xc1\x26\xbe\xf7\xf7\xdd\xbd\x71\x11\xb8\xfb\x19\x28\xb6\xe0\x40\x5e\x02\x44\xfc\x78\x9c\xc4\x01\x5f\x98\x84\x32\xb8\xfd\x41\x34\x3e\xe2\x73\x9b\x26\x09\x5f\x9e\x06\x15\x47\x23\xd4\x8e\x6c\x41\x48\xe4\xab\x26\xe3\x59\x0b\x1e\x28\x34\x46\x1b\x7f\x9b\xfd\x69\x74\x82\x25\x8f\xce\xd9\x19\x0e\xdd\x5f\xee\x59\x6a\xe0\x42\xed\x2e\x61\xa6\xeb\xed\x71\xd8\x06\xb7\x06\x6d\xe1\x5f\x6d\x25\xd4\x88\x95\x63\xb4\xff\x04\x00\x00\xff\xff\x10\x35\x25\x8e\x78\x10\x00\x00")
|
||||
var _templatesSilenceHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x57\x4d\x8f\xdb\x36\x10\xbd\xfb\x57\x10\x2c\x8c\xb5\x81\xc8\x6e\x81\xa2\x87\x40\x16\x90\x64\x53\x24\x6d\x37\x39\xec\x69\x4f\xc1\x98\x1c\x5b\xcc\x52\xa4\x4a\x52\xde\x35\x8a\xfc\xf7\x82\x1f\xb2\x25\xad\xb5\xeb\x38\x87\x1e\xaa\xc3\x5a\x14\x67\xde\xcc\xbc\x47\xce\x92\xb9\x65\x46\xd4\x8e\xb8\x7d\x8d\x2b\x0a\x75\x2d\x05\x03\x27\xb4\x5a\x7e\xb5\x5a\x51\x22\xf8\x8a\x5a\x21\x51\x31\xcc\x36\xda\x54\xb4\x98\xe4\x5c\xec\xc2\x77\x85\x0f\xb7\x71\xea\x8d\x44\xe3\x28\x61\x12\xac\x5d\x51\xf0\x23\x12\xfe\x66\x1c\xd4\x16\x0d\x29\x05\xe7\xa8\x28\x31\x5a\x62\x32\xa0\x45\xbe\xe4\x62\x57\x4c\x72\x8f\x3b\x00\xfc\x3d\x86\x22\x24\x97\xb0\x46\xd9\x22\x33\xad\x9c\xd1\x32\x0b\x1f\x69\xf1\x97\xff\xb1\xc4\x69\x52\x81\x63\x65\xbe\x0c\xdf\x83\xdb\x94\x7c\x59\x20\xb0\x72\x16\x52\xb3\x8b\x5b\x6d\xdc\x0d\xd4\x6f\xf7\x7f\xe2\x7e\x16\xcc\xec\xfc\x15\xd9\x34\x8a\xf9\x62\xe3\x97\x39\xf9\x87\x4c\xbd\x37\x21\x79\xc8\x8c\x84\x27\x3f\xa0\xa6\xb1\x45\x89\xcc\xb5\x39\xc5\x51\x2d\xd8\x3d\x1a\xd2\x52\x15\x5c\xb2\xf8\x91\x1e\x3c\xdb\x87\x83\x83\x64\x72\x8f\xfb\x15\xcd\xa7\x2b\x12\x86\x8b\x7b\xdc\x93\x69\x31\xe2\x61\xdd\xde\xb3\xd7\x8f\x11\xc3\x3f\xf5\xc8\xa7\x44\x6c\xc8\xec\xf3\xfa\x2b\x32\xe7\x71\x6d\x2c\x72\xb1\x03\xd9\xe0\x7c\x21\x51\x6d\x5d\x49\x0a\xf2\xcb\xcf\xb1\xee\x98\x94\xd8\x61\x66\x11\x0c\x2b\x57\xd4\x99\x06\x69\x3e\x25\xdf\x5a\x56\x2e\xc3\xef\xc0\x43\x60\xdb\x66\x6b\xfd\xf8\x02\x7c\xd5\x48\x27\x6a\x89\xdd\x99\x33\x44\x4d\xd1\x87\xca\x7e\xd9\x41\x57\xdd\x0e\xa4\xae\xbd\x55\x5b\xcd\xc1\x38\xe2\x2c\x22\xb9\xc8\xa3\x6f\x3b\x6a\x35\x47\x3e\x9a\x7e\x7c\x02\x48\x47\xde\x80\x3c\x26\x71\x47\x68\xbf\xcc\x51\xb9\x15\xcd\x6d\x0d\x2a\x2d\xb4\xab\x3e\x4c\x4c\x10\x9c\x33\x76\x11\x0c\xc8\xb4\xb8\x22\x71\x89\x3c\x63\x1a\x0c\xbc\x69\x91\x4f\xb3\x11\x1b\x87\x8f\x8e\x4c\x8b\x7c\xe9\xa3\x17\xf4\x94\xf6\x2f\xb8\x0e\x59\x5e\x46\x9a\x07\x62\x7e\x9b\x77\x4d\xf3\x65\x64\x35\x6d\xc0\xce\x5e\x5e\xa6\xcd\x78\x70\xf1\xef\xa5\x39\x6e\xc0\x1a\x0c\x38\x6d\x68\x9c\xf1\xed\x29\x4d\x19\xfd\x40\x8f\x1b\xfa\xd8\x45\x64\x66\xab\xec\x37\xda\xdf\xe1\x23\x4d\xe6\xd6\x81\x71\x96\x80\xeb\xa4\x34\x44\x14\xaa\x6e\x5c\xb6\x35\xba\xa9\xbd\x82\x48\xbb\xdd\xe2\x28\x61\xd7\x2e\x03\xce\xb5\xea\x91\x9b\x8b\xd6\x6e\x03\x64\x03\x19\x03\x89\x8a\x83\xf1\x9d\x52\xf4\x88\xf2\xba\x1c\xc7\x01\x35\x75\x70\x1f\xdd\x89\x0a\x9f\xac\xaf\x16\x59\x9b\x2a\x4b\x15\x92\xd6\x78\xac\x51\x85\xe6\x1f\xca\x7f\xf3\xb4\xc3\x74\x16\x77\xa5\x2b\x54\x6e\x36\x5f\x78\x74\x70\x33\x7a\x77\x77\x77\x97\xdd\xdc\x64\xd7\xd7\xe4\xc3\x87\xd7\x55\xf5\xda\x5a\x3a\x3f\xb5\xea\x15\x54\xf8\x4c\x0c\x83\x7f\x37\xc2\x20\x3f\x70\xbe\x3c\xf4\xe5\xee\xeb\xc5\xda\xbe\x57\xfc\xff\xab\x2c\x2a\x7e\xae\xae\xc0\xf9\xec\xd7\x57\xe4\xaa\xd4\x8d\xb1\x57\x17\xeb\x3c\x12\xf1\x1c\x95\xd3\xcb\xd9\x3b\x3f\xb0\x11\xe4\x38\xd1\x00\x3a\x62\x1d\xd7\xc9\xb9\x6a\x0e\xb5\x44\xb5\x43\xa9\x6b\xec\x69\xd9\x57\xb2\xa7\x23\x56\x20\xe4\x80\x83\x13\x12\x0e\x2c\xbc\x60\xcc\x20\x38\xe4\x6f\xf7\x83\xb9\x5a\x02\xc3\x52\x4b\x8e\x66\x45\xdf\x9f\x80\x8f\xec\x8f\xb9\xf7\xe9\x3f\xc5\xf8\x7f\xc2\x2b\xd3\x95\x5f\x7d\xe7\xd2\xea\xff\xf3\x5c\xc6\x6a\x8a\xf3\x0c\xa7\xef\x4e\x9a\x24\x56\x4f\xce\xbd\xcc\xe9\xf8\x2a\x86\x76\xc2\x97\x94\x55\x8d\x3f\x67\xc4\x73\x81\xd3\xdb\xad\x0c\x31\xa5\x84\xda\x22\x25\xa5\xc1\xcd\x8a\xfe\x94\x8e\x84\x7f\xdc\x7e\xfe\x44\x09\x18\x01\x19\x3e\xd6\xa0\xb8\x3f\xab\x6c\x40\x7a\xcb\xf0\x35\xb1\x60\x0f\x87\xc8\xe0\x71\xe4\x73\xa0\x40\x89\x3b\xa3\x55\x66\xc4\xb6\x1c\xe8\x30\x62\xc9\xf5\x83\x3a\x18\xe6\x4b\x28\x26\x4f\xba\x73\x4a\xbc\x73\xaf\xe8\xe4\x90\xd7\x27\x6a\x6f\x39\xac\x5b\x1b\x83\x43\xf7\xb7\x52\xaf\x7d\xdc\xda\xe0\xf8\xd2\x0d\x90\x0c\x95\x43\xd3\x62\xae\x1b\xe7\xb4\xea\xa2\xdd\x36\xeb\x4a\x38\x9a\x16\x95\x4d\xa3\x84\xb0\x76\x8a\xac\x9d\xca\x6c\xc3\x18\x5a\x4b\x8b\x77\x61\x4b\xe5\xcb\x88\xd3\x09\x9d\x2f\xfd\xaa\xf3\xbf\xf1\x7e\x55\x4c\x26\xdf\x7b\xd3\x3a\x46\x99\x74\xab\x68\x4d\x0c\xda\x46\xba\x4c\x30\xad\x48\xa7\xb2\xf8\x7e\x74\x3d\xa9\x15\xbb\xcf\x98\x30\x4c\xb6\x3d\xab\x4d\xba\x1e\xa3\x2a\xdd\xca\xc8\xc7\xeb\xd7\xfd\x0d\xdd\x8f\xe6\xcf\x85\x29\xbf\x8f\xd7\xc7\x13\xe4\x24\x68\xf7\x23\x54\x6c\xc0\x81\xbc\x84\x88\x78\xfd\x3c\xc9\x03\x3e\x32\x09\x55\x08\xfb\x9d\x6c\x7c\xc2\x87\xb6\x4c\x12\xee\xae\x06\x15\x47\x23\xd4\x96\x6c\x40\x48\xe4\x8b\x54\xf1\x28\x82\x27\x0a\x8d\xd1\xc6\x9f\x66\x7f\x98\x9d\x80\xe4\xd9\x39\xbb\xc2\x7e\xf8\xcb\x23\x4b\x0d\x5c\xa8\xed\x25\xca\x1c\xf7\xf6\x30\x6d\x83\x1b\x83\xb6\xf4\xaf\xb6\x16\x6a\xa0\xca\x21\xdb\x7f\x03\x00\x00\xff\xff\xc5\x10\x37\x05\xba\x10\x00\x00")
|
||||
|
||||
func templatesSilenceHtmlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
|
||||
Reference in New Issue
Block a user