From 7e2f653bc7131d09b91d620caa2fed8aa30809dd Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Sat, 10 Oct 2015 14:17:07 -0400 Subject: [PATCH 1/8] added alerting tab stub and styles --- public/app/features/panel/partials/panel.html | 5 + public/app/panels/graph/alerting.html | 233 ++++++++++++++++++ public/app/panels/graph/module.js | 1 + public/img/CopyQuery.png | Bin 0 -> 144 bytes public/img/critical.svg | 15 ++ public/img/envelope.png | Bin 0 -> 187 bytes public/img/online.svg | 12 + public/img/warn-tiny.svg | 16 ++ public/img/warn.svg | 22 ++ public/less/alerting.less | 42 ++++ public/less/gfbox.less | 7 + public/less/grafana.less | 1 + public/less/overrides.less | 9 + public/less/tightform.less | 6 + 14 files changed, 369 insertions(+) create mode 100644 public/app/panels/graph/alerting.html create mode 100644 public/img/CopyQuery.png create mode 100644 public/img/critical.svg create mode 100644 public/img/envelope.png create mode 100644 public/img/online.svg create mode 100644 public/img/warn-tiny.svg create mode 100644 public/img/warn.svg create mode 100644 public/less/alerting.less diff --git a/public/app/features/panel/partials/panel.html b/public/app/features/panel/partials/panel.html index a7fef0f5d67..65f482161f8 100644 --- a/public/app/features/panel/partials/panel.html +++ b/public/app/features/panel/partials/panel.html @@ -35,6 +35,11 @@ + +
+ There are unsaved changes. + +
diff --git a/public/app/panels/graph/alerting.html b/public/app/panels/graph/alerting.html new file mode 100644 index 00000000000..7230c6ef488 --- /dev/null +++ b/public/app/panels/graph/alerting.html @@ -0,0 +1,233 @@ +
+ Last updated by Grafana October 4, 2015 12:15:04 by $username +
+
General Alerting Options
+
+
    +
  • + Alert Title +
  • +
  • + +
  • +
  • + Alerting Backend +
  • +
  • + +
  • +
  • + + + +
  • +
+
+
+
+
+
+
Choose your query:
+

Select an exising query to alert on:

+
+
+
    +
  • +
  • None
  • +
+
+
+
+
+
+
+
    +
  • +
  • A
  • +
  • apps
  • +
  • +
  • fakesite
  • +
  • counters
  • +
  • requests
  • +
  • count
  • +
  • scaleToSeconds(1)
  • +
  • aliasByNode(2)
  • +
  • +
+
+
+
+
+
+
    +
  • +
  • B
  • +
  • Metric: us-west-2 AWS/EC2 CPUUtilization Stats: Minimum Maximum Dimensions InstanceIS = i-b0e8a447 Alias {{stat}} Period 60
  • +
  • +
+
+
+
+
+
+
    +
  • +
  • C
  • +
  • Query: avg(counters_logins) by(server) Legend Format: {{app}} - {{server}} Step: 1s Resolution: 1/2
  • +
  • +
+
+
+
+
+
+
    +
  • +
  • D
  • +
  • SELECT mean(value) FROM logins.count WHERE hostname = /$Hostname$/ GROUP BY time($internal) hostname
  • +
  • +
+
+
+
+
+
+
    +
  • +
  • E
  • +
  • Metric: apps.backend.backend_01.counters.requests.count Alias: Bristow Aggregator: Sum Downsample: 1m Aggregator Sum Tags host = test
  • +
  • +
+
+
+
+
+
+

Or write a new custom alerting query:

+
+
+
    +
  • +
  • + + + +
  • +
  • + select metric +
  • +
  • + +
  • +
+
+
+
+
+
+
+
Define Your States
+
+
    +
  • + by +
  • +
  • + +
  • +
  • + the values in the query over the last +
  • +
  • + +
  • +
+
+
+
+
+
+
+
+
    +
  • + Warn +
  • +
  • + +
  • +
  • + +
  • +
  • + .notify +
  • +
  • + +
  • +
  • + + + +
  • +
+
+
+
+
    +
  • + Critical +
  • +
  • + +
  • +
  • + +
  • +
  • + .notify +
  • +
  • + +
  • +
  • + + + +
  • +
+
+
+
+
+
+
+
What to Say Variables | Preview
+
+
    +
  • + Summary +
  • +
  • + +
  • +
+
+
+
+
    +
  • + Description +
  • +
  • + +
  • +
+
+
+
+
diff --git a/public/app/panels/graph/module.js b/public/app/panels/graph/module.js index 5cdeab799de..a1e56f8c5eb 100644 --- a/public/app/panels/graph/module.js +++ b/public/app/panels/graph/module.js @@ -34,6 +34,7 @@ function (angular, $, _, kbn, moment, TimeSeries, PanelMeta) { $scope.panelMeta.addEditorTab('Axes & Grid', 'app/panels/graph/axisEditor.html'); $scope.panelMeta.addEditorTab('Display Styles', 'app/panels/graph/styleEditor.html'); $scope.panelMeta.addEditorTab('Time range', 'app/features/panel/partials/panelTime.html'); + $scope.panelMeta.addEditorTab('Alerting', 'app/panels/graph/alerting.html'); $scope.panelMeta.addExtendedMenuItem('Export CSV', '', 'exportCsv()'); $scope.panelMeta.addExtendedMenuItem('Toggle legend', '', 'toggleLegend()'); diff --git a/public/img/CopyQuery.png b/public/img/CopyQuery.png new file mode 100644 index 0000000000000000000000000000000000000000..b9829c23b2ff6146760e6c5f5264a713aceb7e99 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^d_XL~!2%?E=C*AFQsJI1jv*C{$u>XU+bc6mCH%=h z&$5jFPx*lfES-Y-l^f + + + + + + + diff --git a/public/img/envelope.png b/public/img/envelope.png new file mode 100644 index 0000000000000000000000000000000000000000..59ef8a38aba65a69c72ab8a97b1f3421e35d8cac GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh0wlLOK8*rWO`a}}Ar*{sFC1NX$Uvsyqkh?Y zwi2b3NhwY2ITLh(Vprr`DCRAH{+*PM@abWfebchTzZ`Iu^9tMWYgE%|E;Ht-+X6|`CL7_(nktyYo+`**QehTO=4 lFAt}D-Cvh6m;2rg2C+2#McIiyOhDH#c)I$ztaD0e0s!QaM^gX* literal 0 HcmV?d00001 diff --git a/public/img/online.svg b/public/img/online.svg new file mode 100644 index 00000000000..279fbec3a90 --- /dev/null +++ b/public/img/online.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/public/img/warn-tiny.svg b/public/img/warn-tiny.svg new file mode 100644 index 00000000000..e8e91f4452c --- /dev/null +++ b/public/img/warn-tiny.svg @@ -0,0 +1,16 @@ + + + + + + + diff --git a/public/img/warn.svg b/public/img/warn.svg new file mode 100644 index 00000000000..8caee82c3f5 --- /dev/null +++ b/public/img/warn.svg @@ -0,0 +1,22 @@ + + + + + + + diff --git a/public/less/alerting.less b/public/less/alerting.less new file mode 100644 index 00000000000..9054584e23e --- /dev/null +++ b/public/less/alerting.less @@ -0,0 +1,42 @@ +.copy-query { + display: block; + width: 30px; + height: 36px; + margin: 0; + padding: 0; + border: 0; + background: transparent url(/img/CopyQuery.png) 50% 50% no-repeat; + cursor: pointer; +} + +.alert-state { + display: inline-block; + padding-left: 30px; + background: 0 50% no-repeat; + background-size: 20px auto; +} + +.alert-state-online { + background-image: url('/img/online.svg'); +} + +.alert-state-warning { + background-image: url('/img/warn-tiny.svg'); +} + +.alert-state-critical { + background-image: url('/img/critical.svg'); +} + +.alert-notify-emails { + width: 400px; + border-right: 1px solid @black; +} + +.alert-notify-emails .bootstrap-tagsinput { + width: 394px; // offset for 8px left padding and border width +} + +.alert-notify-emails .bootstrap-tagsinput input { + border: 0; +} diff --git a/public/less/gfbox.less b/public/less/gfbox.less index eb386f740d7..48d0b6a7ca8 100644 --- a/public/less/gfbox.less +++ b/public/less/gfbox.less @@ -25,6 +25,13 @@ } } +.gf-box-header-save-btn { + padding: 7px 0; + float: right; + color: @grayLight; + font-style: italic; +} + .gf-box-body { padding: 20px; min-height: 150px; diff --git a/public/less/grafana.less b/public/less/grafana.less index 6e23faa214d..0d4e5f44dc0 100644 --- a/public/less/grafana.less +++ b/public/less/grafana.less @@ -18,6 +18,7 @@ @import "fonts.less"; @import "tabs.less"; @import "timepicker.less"; +@import "alerting.less"; .row-control-inner { padding:0px; diff --git a/public/less/overrides.less b/public/less/overrides.less index fb6544cd99c..229627c0896 100644 --- a/public/less/overrides.less +++ b/public/less/overrides.less @@ -560,6 +560,15 @@ div.flot-text { background-color: darken(@purple, 10%); } +.label-tag-email { + padding-left: 25px; + background: @black url(/img/envelope.png) 5px 50% no-repeat !important; + border-color: @black !important; + font-size: 12px; + font-weight: normal; + border-radius: 5px; +} + // inspector .inspector-request-table { diff --git a/public/less/tightform.less b/public/less/tightform.less index 494497653ed..f65a991613a 100644 --- a/public/less/tightform.less +++ b/public/less/tightform.less @@ -156,6 +156,12 @@ input[type=checkbox].tight-form-checkbox { margin: 0; } +.tight-form-textarea { + height: 200px; + margin: 0; + box-sizing: border-box; +} + select.tight-form-input { border: none; border-right: 1px solid @grafanaTargetSegmentBorder; From 23404decead89577dad4b23471aa1bf6645dc263 Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Sun, 11 Oct 2015 16:59:40 -0400 Subject: [PATCH 2/8] added global alerts list stub and styles --- public/app/core/routes/all.js | 3 + .../dashboard/partials/globalAlerts.html | 282 ++++++++++++++++++ public/app/panels/graph/alerting.html | 119 ++++---- public/less/filter-list.less | 167 +++++++++++ public/less/gfbox.less | 4 + public/less/grafana.less | 1 + public/less/variables.dark.less | 6 + public/less/variables.light.less | 6 + 8 files changed, 522 insertions(+), 66 deletions(-) create mode 100644 public/app/features/dashboard/partials/globalAlerts.html create mode 100644 public/less/filter-list.less diff --git a/public/app/core/routes/all.js b/public/app/core/routes/all.js index a7e36a0e228..7a912621ba5 100644 --- a/public/app/core/routes/all.js +++ b/public/app/core/routes/all.js @@ -131,6 +131,9 @@ define([ templateUrl: 'app/partials/reset_password.html', controller : 'ResetPasswordCtrl', }) + .when('/global-alerts', { + templateUrl: 'app/features/dashboard/partials/globalAlerts.html', + }) .otherwise({ templateUrl: 'app/partials/error.html', controller: 'ErrorCtrl' diff --git a/public/app/features/dashboard/partials/globalAlerts.html b/public/app/features/dashboard/partials/globalAlerts.html new file mode 100644 index 00000000000..d66c7e98d8c --- /dev/null +++ b/public/app/features/dashboard/partials/globalAlerts.html @@ -0,0 +1,282 @@ + + + + +
+
+

Global alerts

+ +
+
+
    +
  • Filters:
  • +
  • Alert State
  • +
  • +
  • Dashboards
  • +
  • +
  • + + + +
  • +
+
+
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + 2 selected, showing 6 of 6 total +
  • +
+
    +
  • + +
    +
    Alert query configure alerting
    +
    +
      +
    • A
    • +
    • apps
    • +
    • +
    • fakesite
    • +
    • counters
    • +
    • requests
    • +
    • count
    • +
    • scaleToSeconds(1)
    • +
    • aliasByNode(2)
    • +
    +
    +
    +
    +
  • +
  • + +
    +
    Alert query configure alerting
    +
    +
      +
    • A
    • +
    • apps
    • +
    • +
    • fakesite
    • +
    • counters
    • +
    • requests
    • +
    • count
    • +
    • scaleToSeconds(1)
    • +
    • aliasByNode(2)
    • +
    +
    +
    +
    +
  • +
  • + +
    +
    Alert query configure alerting
    +
    +
      +
    • A
    • +
    • apps
    • +
    • +
    • fakesite
    • +
    • counters
    • +
    • requests
    • +
    • count
    • +
    • scaleToSeconds(1)
    • +
    • aliasByNode(2)
    • +
    +
    +
    +
    +
  • +
  • + +
    +
    Alert query configure alerting
    +
    +
      +
    • A
    • +
    • apps
    • +
    • +
    • fakesite
    • +
    • counters
    • +
    • requests
    • +
    • count
    • +
    • scaleToSeconds(1)
    • +
    • aliasByNode(2)
    • +
    +
    +
    +
    +
  • +
  • + +
    +
    Alert query configure alerting
    +
    +
      +
    • A
    • +
    • apps
    • +
    • +
    • fakesite
    • +
    • counters
    • +
    • requests
    • +
    • count
    • +
    • scaleToSeconds(1)
    • +
    • aliasByNode(2)
    • +
    +
    +
    +
    +
  • +
+
+
diff --git a/public/app/panels/graph/alerting.html b/public/app/panels/graph/alerting.html index 7230c6ef488..9e08fc4f6cb 100644 --- a/public/app/panels/graph/alerting.html +++ b/public/app/panels/graph/alerting.html @@ -31,77 +31,64 @@
Choose your query:

Select an exising query to alert on:

-
-
-
    -
  • -
  • None
  • -
-
-
+
+
    +
  • +
  • None
  • +
+
-
-
-
-
    -
  • -
  • A
  • -
  • apps
  • -
  • -
  • fakesite
  • -
  • counters
  • -
  • requests
  • -
  • count
  • -
  • scaleToSeconds(1)
  • -
  • aliasByNode(2)
  • -
  • -
-
-
+
+
    +
  • +
  • A
  • +
  • apps
  • +
  • +
  • fakesite
  • +
  • counters
  • +
  • requests
  • +
  • count
  • +
  • scaleToSeconds(1)
  • +
  • aliasByNode(2)
  • +
  • +
+
-
-
-
    -
  • -
  • B
  • -
  • Metric: us-west-2 AWS/EC2 CPUUtilization Stats: Minimum Maximum Dimensions InstanceIS = i-b0e8a447 Alias {{stat}} Period 60
  • -
  • -
-
-
+
+
    +
  • +
  • B
  • +
  • Metric: us-west-2 AWS/EC2 CPUUtilization Stats: Minimum Maximum Dimensions InstanceIS = i-b0e8a447 Alias {{stat}} Period 60
  • +
  • +
+
-
-
-
    -
  • -
  • C
  • -
  • Query: avg(counters_logins) by(server) Legend Format: {{app}} - {{server}} Step: 1s Resolution: 1/2
  • -
  • -
-
-
+
+
    +
  • +
  • C
  • +
  • Query: avg(counters_logins) by(server) Legend Format: {{app}} - {{server}} Step: 1s Resolution: 1/2
  • +
  • +
+
-
-
-
    -
  • -
  • D
  • -
  • SELECT mean(value) FROM logins.count WHERE hostname = /$Hostname$/ GROUP BY time($internal) hostname
  • -
  • -
-
-
+
+
    +
  • +
  • D
  • +
  • SELECT mean(value) FROM logins.count WHERE hostname = /$Hostname$/ GROUP BY time($internal) hostname
  • +
  • +
+
-
-
-
    -
  • -
  • E
  • -
  • Metric: apps.backend.backend_01.counters.requests.count Alias: Bristow Aggregator: Sum Downsample: 1m Aggregator Sum Tags host = test
  • -
  • -
-
-
+
+
    +
  • +
  • E
  • +
  • Metric: apps.backend.backend_01.counters.requests.count Alias: Bristow Aggregator: Sum Downsample: 1m Aggregator Sum Tags host = test
  • +
  • +
+
diff --git a/public/less/filter-list.less b/public/less/filter-list.less new file mode 100644 index 00000000000..50da5864db0 --- /dev/null +++ b/public/less/filter-list.less @@ -0,0 +1,167 @@ +// ========================================================================== +// FILTER LIST +// ========================================================================== + + + +// List +// -------------------------------------------------------------------------- + +.filter-list { + max-width: 1000px; + margin: 0; + padding: 0; + list-style: none; +} + +.filter-list > li { + padding: 10px; + margin-bottom: 2px; + background: @grafanaPanelBackground; + + &:last-child { + margin: 0; + } +} + + + +// Card +// -------------------------------------------------------------------------- + +.filter-list-card { + display: table; + width: 100%; + margin: 0; + padding: 0; + list-style: none; +} + +.filter-list-card > li { + display: table-cell; + vertical-align: top; +} + +.filter-list-card-select { + width: 23px; + padding-right: 5px; +} + +.filter-list-card-title { + display: block; + font-size: 16px; + font-weight: normal; +} + +.filter-list-card-status { + color: #777; + font-size: 12px; +} + +.filter-list-card-state { + display: inline-block; + padding: 5px 0 0 28px; + background: 0 bottom no-repeat; + background-size: 24px auto; + font-size: 14px; + text-transform: uppercase; + + &.online { + background-image: url('/img/online.svg'); + color: @online; + } + + &.warn { + background-image: url('/img/warn-tiny.svg'); + color: @warn; + } + + &.critical { + background-image: url('/img/critical.svg'); + color: @critical; + } +} + +.filter-list-card-controls { + float: right; +} + +.filter-list-card-links, +.filter-list-card-config, +.filter-list-card-expand { + display: inline-block; + vertical-align: middle; +} + +.filter-list-card-link { + display: block; + color: #777; + text-align: right; + + > a { + color: #777; + } +} + +.filter-list-card-config { + padding: 8px 8px 8px 16px; + color: #777; + font-size: 25px; + + > a { + color: #777; + } +} + +.filter-list-card-expand { + width: 20px; + padding: 8px 0 8px 8px; + color: #aaa; + font-size: 30px; + text-align: center; + cursor: pointer; +} + +.filter-list-card-details { + padding: 20px 0 0 30px; +} + +.filter-list-card-details-heading { + font-weight: normal; + + > a { + float: right; + color: @blue; + font-size: 12px; + } +} + + + +// Filters +// -------------------------------------------------------------------------- + +.filter-list-filters { + display: inline-block; + margin-bottom: 40px; +} + + + +// Actions +// -------------------------------------------------------------------------- + +.filter-list-actions { + margin: 0 0 10px; + padding: 0; + list-style: none; +} + +.filter-list-actions > li { + display: inline-block; + margin-right: 10px; +} + +.filter-list-actions-selected { + text-transform: uppercase; +} diff --git a/public/less/gfbox.less b/public/less/gfbox.less index 48d0b6a7ca8..d173ace1787 100644 --- a/public/less/gfbox.less +++ b/public/less/gfbox.less @@ -80,6 +80,10 @@ max-width: 653px; } +.page-wide { + max-width: none; +} + .admin-page { max-width: 800px; margin-left: 10px; diff --git a/public/less/grafana.less b/public/less/grafana.less index 0d4e5f44dc0..aa58f749b82 100644 --- a/public/less/grafana.less +++ b/public/less/grafana.less @@ -19,6 +19,7 @@ @import "tabs.less"; @import "timepicker.less"; @import "alerting.less"; +@import "filter-list.less"; .row-control-inner { padding:0px; diff --git a/public/less/variables.dark.less b/public/less/variables.dark.less index 3324c3f4b86..af8f3cdec75 100644 --- a/public/less/variables.dark.less +++ b/public/less/variables.dark.less @@ -25,6 +25,12 @@ @purple: #9933CC; @variable: #32D1DF; +// Status colors +// ------------------------- +@online: #10a345; +@warn: #ffc03c; +@critical: #ed2e18; + // grafana Variables // ------------------------- @grafanaPanelBackground: @grayDarker; diff --git a/public/less/variables.light.less b/public/less/variables.light.less index 27dcf8575f4..67a8dfd7257 100644 --- a/public/less/variables.light.less +++ b/public/less/variables.light.less @@ -31,6 +31,12 @@ @purple: #9954BB; @variable: #2AB2E4; +// Status colors +// ------------------------- +@online: #10a345; +@warn: #ffc03c; +@critical: #ed2e18; + // grafana Variables // ------------------------- @grafanaPanelBackground: @grayLighter; From aa9093bcf6693d884a0ff332f04de27d8f66459c Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Tue, 27 Oct 2015 23:26:11 -0500 Subject: [PATCH 3/8] updated-list-views: added filter-table less component, updating styles for data sources table --- .../features/org/partials/datasources.html | 76 ++++++++++--------- public/less/filter-table.less | 48 ++++++++++++ public/less/grafana.less | 1 + 3 files changed, 90 insertions(+), 35 deletions(-) create mode 100644 public/less/filter-table.less diff --git a/public/app/features/org/partials/datasources.html b/public/app/features/org/partials/datasources.html index a2e62673e70..b1b37a572a9 100644 --- a/public/app/features/org/partials/datasources.html +++ b/public/app/features/org/partials/datasources.html @@ -5,47 +5,53 @@ -
-
+
+

Data sources

No datasources defined
- - - - - - - - - - - - - - - +
NameUrl
-   - {{ds.name}} - - {{ds.url}} - - - default - - - - - Edit - - - - - -
+ + + + + + + + + + + + + + + + + +
NameUrl
+ +   + {{ds.name}} + + + {{ds.url}} + + + default + + + + + Edit + + + + + +
diff --git a/public/less/filter-table.less b/public/less/filter-table.less new file mode 100644 index 00000000000..7b9f7a47b10 --- /dev/null +++ b/public/less/filter-table.less @@ -0,0 +1,48 @@ +// ========================================================================== +// FILTER TABLE +// ========================================================================== + + + +// Table +// -------------------------------------------------------------------------- + +.filter-table * { + box-sizing: border-box; +} + +.filter-table { + width: 100%; + table-layout: fixed; + border-collapse: collapse; +} + +.filter-table tr { + background: @grafanaPanelBackground; + border-bottom: 2px solid @bodyBackground; +} + +.filter-table th { + padding: 10px 15px 10px 0; + text-align: left; + + &:first-child { + padding-left: 15px; + } +} + +.filter-table td { + padding: 15px 15px 15px 0; + + &:first-child { + padding-left: 15px; + } +} + +.filter-table .ellipsis { + display: block; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/public/less/grafana.less b/public/less/grafana.less index aa58f749b82..3ee21297dd0 100644 --- a/public/less/grafana.less +++ b/public/less/grafana.less @@ -20,6 +20,7 @@ @import "timepicker.less"; @import "alerting.less"; @import "filter-list.less"; +@import "filter-table.less"; .row-control-inner { padding:0px; From e63ff167a79a2365a6e43ff93c6594497ea2b7d2 Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Thu, 29 Oct 2015 21:09:21 -0500 Subject: [PATCH 4/8] updated-list-views: added filter controls, updated tables on API Keys and Data Sources --- .../dashboard/partials/globalAlerts.html | 6 +- .../features/org/partials/datasources.html | 56 +++++++++++- .../app/features/org/partials/orgApiKeys.html | 87 +++++++++++++++---- public/less/filter-controls.less | 33 +++++++ public/less/filter-list.less | 31 ------- public/less/gfbox.less | 2 +- public/less/grafana.less | 1 + 7 files changed, 161 insertions(+), 55 deletions(-) create mode 100644 public/less/filter-controls.less diff --git a/public/app/features/dashboard/partials/globalAlerts.html b/public/app/features/dashboard/partials/globalAlerts.html index d66c7e98d8c..a849f50ffdd 100644 --- a/public/app/features/dashboard/partials/globalAlerts.html +++ b/public/app/features/dashboard/partials/globalAlerts.html @@ -8,7 +8,7 @@

Global alerts

-
+
  • Filters:
  • @@ -25,7 +25,7 @@
-
    +
    • - 2 selected, showing 6 of 6 total + 2 selected, showing 6 of 6 total
      diff --git a/public/app/features/org/partials/datasources.html b/public/app/features/org/partials/datasources.html index b1b37a572a9..6cf40deccde 100644 --- a/public/app/features/org/partials/datasources.html +++ b/public/app/features/org/partials/datasources.html @@ -9,6 +9,51 @@

      Data sources

      +
      +
      +
        +
      • Filters:
      • +
      • Name
      • +
      • +
      • URL
      • +
      • +
      • + + + +
      • +
      +
      +
      +
      + +
        +
      • + +
      • +
      • + +
      • +
      • + 0 selected, showing 2 of 2 total +
      • +
      +
      No datasources defined
      @@ -16,15 +61,20 @@ - - + + + - + + - - + + @@ -76,10 +76,7 @@
      NameUrlNameUrl
      + + +   diff --git a/public/app/features/org/partials/orgApiKeys.html b/public/app/features/org/partials/orgApiKeys.html index 9db700ab437..c24b5c53ec1 100644 --- a/public/app/features/org/partials/orgApiKeys.html +++ b/public/app/features/org/partials/orgApiKeys.html @@ -4,9 +4,8 @@ -
      +
      -

      API Keys

      @@ -32,21 +31,75 @@ - - - - - - - - - - - +
      +
      +
        +
      • Filters:
      • +
      • Name
      • +
      • +
      • Role
      • +
      • +
      • + + + +
      • +
      +
      +
      +
      + +
        +
      • + +
      • +
      • + +
      • +
      • + 0 selected, showing 2 of 2 total +
      • +
      + +
      NameRole
      {{t.name}}{{t.role}} - - - -
      + + + + + + + + + + + + + + + +
      NameRole
      + + + {{t.name}}{{t.role}} + + + +
      diff --git a/public/less/filter-controls.less b/public/less/filter-controls.less new file mode 100644 index 00000000000..f1489431a7d --- /dev/null +++ b/public/less/filter-controls.less @@ -0,0 +1,33 @@ +// ========================================================================== +// FILTER CONTROLS +// ========================================================================== + + + +// Filters +// -------------------------------------------------------------------------- + +.filter-controls-filters { + display: inline-block; + margin-bottom: 40px; +} + + + +// Actions +// -------------------------------------------------------------------------- + +.filter-controls-actions { + margin: 0 0 10px; + padding: 0; + list-style: none; +} + +.filter-controls-actions > li { + display: inline-block; + margin-right: 10px; +} + +.filter-controls-actions-selected { + text-transform: uppercase; +} diff --git a/public/less/filter-list.less b/public/less/filter-list.less index 50da5864db0..181aedf4d3c 100644 --- a/public/less/filter-list.less +++ b/public/less/filter-list.less @@ -8,7 +8,6 @@ // -------------------------------------------------------------------------- .filter-list { - max-width: 1000px; margin: 0; padding: 0; list-style: none; @@ -135,33 +134,3 @@ font-size: 12px; } } - - - -// Filters -// -------------------------------------------------------------------------- - -.filter-list-filters { - display: inline-block; - margin-bottom: 40px; -} - - - -// Actions -// -------------------------------------------------------------------------- - -.filter-list-actions { - margin: 0 0 10px; - padding: 0; - list-style: none; -} - -.filter-list-actions > li { - display: inline-block; - margin-right: 10px; -} - -.filter-list-actions-selected { - text-transform: uppercase; -} diff --git a/public/less/gfbox.less b/public/less/gfbox.less index d173ace1787..46967d143c5 100644 --- a/public/less/gfbox.less +++ b/public/less/gfbox.less @@ -81,7 +81,7 @@ } .page-wide { - max-width: none; + max-width: 1000px; } .admin-page { diff --git a/public/less/grafana.less b/public/less/grafana.less index 3ee21297dd0..268b516f397 100644 --- a/public/less/grafana.less +++ b/public/less/grafana.less @@ -19,6 +19,7 @@ @import "tabs.less"; @import "timepicker.less"; @import "alerting.less"; +@import "filter-controls.less"; @import "filter-list.less"; @import "filter-table.less"; From 58dc282ca0fb4240ef67023bb948ccc7a3d8f8e5 Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Tue, 3 Nov 2015 08:24:10 -0600 Subject: [PATCH 5/8] updated-list-views: updating table layout for org users --- .../features/org/partials/datasources.html | 9 +-- .../app/features/org/partials/orgUsers.html | 68 ++++++++++++++++--- public/less/filter-controls.less | 4 ++ public/less/filter-table.less | 3 +- 4 files changed, 67 insertions(+), 17 deletions(-) diff --git a/public/app/features/org/partials/datasources.html b/public/app/features/org/partials/datasources.html index 6cf40deccde..3897b3ecd3d 100644 --- a/public/app/features/org/partials/datasources.html +++ b/public/app/features/org/partials/datasources.html @@ -62,8 +62,8 @@
      NameUrlNameUrl - -   - {{ds.name}} - +   {{ds.name}} {{ds.url}} diff --git a/public/app/features/org/partials/orgUsers.html b/public/app/features/org/partials/orgUsers.html index 355131c2dbb..3cb560bd560 100644 --- a/public/app/features/org/partials/orgUsers.html +++ b/public/app/features/org/partials/orgUsers.html @@ -4,7 +4,7 @@ -
      +

      Organization users

      @@ -18,21 +18,69 @@ - - - - - - - + +
      +
      +
        +
      • Filters:
      • +
      • Login
      • +
      • +
      • Role
      • +
      • +
      • + + + +
      • +
      +
      +
      +
      + +
        +
      • + +
      • +
      • + +
      • +
      • + 0 selected, showing 1 of 1 total +
      • +
      + +
      LoginEmailRole
      + + + + + + + + - + - -
      LoginEmailRole
      {{user.login}}{{user.email}}{{user.email}} + diff --git a/public/less/filter-controls.less b/public/less/filter-controls.less index f1489431a7d..287bebe3757 100644 --- a/public/less/filter-controls.less +++ b/public/less/filter-controls.less @@ -12,6 +12,10 @@ margin-bottom: 40px; } +.tab-pane > .filter-controls-filters { + margin-top: 20px; +} + // Actions diff --git a/public/less/filter-table.less b/public/less/filter-table.less index 7b9f7a47b10..765fab5662f 100644 --- a/public/less/filter-table.less +++ b/public/less/filter-table.less @@ -13,7 +13,7 @@ .filter-table { width: 100%; - table-layout: fixed; + // table-layout: fixed; border-collapse: collapse; } @@ -23,6 +23,7 @@ } .filter-table th { + width: auto; padding: 10px 15px 10px 0; text-align: left; From 09ff0429867a75c39a74d086cfc7121e0f17cf9a Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Thu, 19 Nov 2015 21:02:38 -0600 Subject: [PATCH 6/8] updated-list-views: added new table layout to additional pages --- public/app/features/admin/partials/orgs.html | 95 ++++++++++--- public/app/features/admin/partials/users.html | 110 +++++++++++---- .../app/features/org/partials/orgApiKeys.html | 4 +- .../app/features/org/partials/orgUsers.html | 127 ++++++++++++++---- .../features/profile/partials/profile.html | 39 +++--- public/less/filter-table.less | 10 +- 6 files changed, 289 insertions(+), 96 deletions(-) diff --git a/public/app/features/admin/partials/orgs.html b/public/app/features/admin/partials/orgs.html index fe87073eb6c..14a9ad931a2 100644 --- a/public/app/features/admin/partials/orgs.html +++ b/public/app/features/admin/partials/orgs.html @@ -4,31 +4,84 @@ -
      -
      +
      +

      Organizations

      - - - - - - - - - - +
      +
      +
        +
      • Filters:
      • +
      • Id
      • +
      • +
      • Name
      • +
      • +
      • + + + +
      • +
      +
      +
      +
      + +
        +
      • + +
      • +
      • + +
      • +
      • + 0 selected, showing 1 of 1 total +
      • +
      + +
      IdName
      {{org.name}} - - - Edit - -    - - - -
      + + + + + + + + + + + + + +
      IdName
      + + + {{org.name}} + + + Edit + +    + + + +
      diff --git a/public/app/features/admin/partials/users.html b/public/app/features/admin/partials/users.html index 6f8365e75dd..7273be6079f 100644 --- a/public/app/features/admin/partials/users.html +++ b/public/app/features/admin/partials/users.html @@ -5,38 +5,92 @@ -
      -
      +
      +

      Users

      - - - - - - - - - - - - - - - - - +
      +
      +
        +
      • Filters:
      • +
      • Id
      • +
      • +
      • Name
      • +
      • +
      • + + + +
      • +
      +
      +
      +
      + +
        +
      • + +
      • +
      • + +
      • +
      • + 0 selected, showing 1 of 1 total +
      • +
      + +
      IdNameLoginEmailGrafana Admin
      {{user.id}}{{user.name}}{{user.login}}{{user.email}}{{user.isAdmin}} - - - Edit - -    - - - -
      + + + + + + + + + + + + + + + + + + + + + +
      IdNameLoginEmailGrafana Admin
      + + + {{user.id}}{{user.name}}{{user.login}}{{user.email}}{{user.isAdmin}} + + + Edit + +    + + + +
      diff --git a/public/app/features/org/partials/orgApiKeys.html b/public/app/features/org/partials/orgApiKeys.html index c24b5c53ec1..cb1c13f64a1 100644 --- a/public/app/features/org/partials/orgApiKeys.html +++ b/public/app/features/org/partials/orgApiKeys.html @@ -5,7 +5,7 @@
      -
      +

      API Keys

      @@ -93,7 +93,7 @@
      {{t.name}} {{t.role}} + diff --git a/public/app/features/org/partials/orgUsers.html b/public/app/features/org/partials/orgUsers.html index 3cb560bd560..dc0ad562b4f 100644 --- a/public/app/features/org/partials/orgUsers.html +++ b/public/app/features/org/partials/orgUsers.html @@ -5,7 +5,7 @@
      -
      +

      Organization users

      @@ -67,6 +67,7 @@ + @@ -74,6 +75,10 @@ +
      Login Email Role
      + + + {{user.login}} {{user.email}} @@ -89,36 +94,100 @@
      -
      - {{invite.email}} - {{invite.name}} - - -   - - - - - -
      - {{invite.url}}
      - -   - - - Invited: {{invite.createdOn | date: 'shortDate'}} by {{invite.invitedBy}} - -
      -
      + +
      +
      +
        +
      • Filters:
      • +
      • Email
      • +
      • +
      • Name
      • +
      • +
      • + + + +
      • +
      +
      +
      +
      + +
        +
      • + +
      • +
      • + +
      • +
      • + 0 selected, showing 1 of 1 total +
      • +
      + + + + + + + + + + + + + + + + + + + + + + +
      EmailName
      + + + {{invite.email}}{{invite.name}} + +   + + + + +
      + {{invite.url}}

      + +   + + + Invited: {{invite.createdOn | date: 'shortDate'}} by {{invite.invitedBy}} + +
      -
      diff --git a/public/app/features/profile/partials/profile.html b/public/app/features/profile/partials/profile.html index d246b4d3914..56eddad92be 100644 --- a/public/app/features/profile/partials/profile.html +++ b/public/app/features/profile/partials/profile.html @@ -5,8 +5,8 @@ -
      -
      +
      +

      Profile

      @@ -62,19 +62,28 @@

      Organizations

      - - - - - - +
      Name: {{org.name}}Role: {{org.role}} - - Current - - - Select - -
      + + + + + + + + + + + + + +
      NameRole
      Name: {{org.name}}Role: {{org.role}} + + Current + + + Select + +
      diff --git a/public/less/filter-table.less b/public/less/filter-table.less index 765fab5662f..99b7a3463d8 100644 --- a/public/less/filter-table.less +++ b/public/less/filter-table.less @@ -13,8 +13,8 @@ .filter-table { width: 100%; - // table-layout: fixed; border-collapse: collapse; + table-layout: fixed; } .filter-table tr { @@ -47,3 +47,11 @@ overflow: hidden; text-overflow: ellipsis; } + +.filter-table .expanded { + border-color: @grafanaPanelBackground; +} + +.filter-table .expanded > td { + padding-bottom: 0; +} From c9bd45ba136e90cbedc8d8e0f3593f7f177838cb Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Thu, 3 Dec 2015 20:20:54 -0600 Subject: [PATCH 7/8] removed filters and actions for now --- public/app/features/admin/partials/orgs.html | 55 +-------- public/app/features/admin/partials/users.html | 50 --------- .../features/org/partials/datasources.html | 11 +- .../app/features/org/partials/orgApiKeys.html | 50 --------- .../app/features/org/partials/orgUsers.html | 104 +----------------- public/less/filter-table.less | 2 +- 6 files changed, 9 insertions(+), 263 deletions(-) diff --git a/public/app/features/admin/partials/orgs.html b/public/app/features/admin/partials/orgs.html index 14a9ad931a2..e03849a2338 100644 --- a/public/app/features/admin/partials/orgs.html +++ b/public/app/features/admin/partials/orgs.html @@ -9,68 +9,19 @@

      Organizations

      - -
      -
      -
        -
      • Filters:
      • -
      • Id
      • -
      • -
      • Name
      • -
      • -
      • - - - -
      • -
      -
      -
      -
      - -
        -
      • - -
      • -
      • - -
      • -
      • - 0 selected, showing 1 of 1 total -
      • -
      - - + - + -
      Id Name
      - - - {{org.id}} {{org.name}} + Edit diff --git a/public/app/features/admin/partials/users.html b/public/app/features/admin/partials/users.html index 7273be6079f..c7839b755e0 100644 --- a/public/app/features/admin/partials/users.html +++ b/public/app/features/admin/partials/users.html @@ -11,55 +11,9 @@ Users - - -
        -
      • - -
      • -
      • - -
      • -
      • - 0 selected, showing 1 of 1 total -
      • -
      - - @@ -70,10 +24,6 @@ - diff --git a/public/app/features/org/partials/datasources.html b/public/app/features/org/partials/datasources.html index 3897b3ecd3d..4a857845a0a 100644 --- a/public/app/features/org/partials/datasources.html +++ b/public/app/features/org/partials/datasources.html @@ -9,14 +9,15 @@
      Id Name Login
      - - - {{user.id}} {{user.name}} {{user.login}}
      - @@ -71,10 +72,6 @@ - diff --git a/public/app/features/org/partials/orgApiKeys.html b/public/app/features/org/partials/orgApiKeys.html index cb1c13f64a1..cf1bedd7877 100644 --- a/public/app/features/org/partials/orgApiKeys.html +++ b/public/app/features/org/partials/orgApiKeys.html @@ -31,55 +31,9 @@ - - -
        -
      • - -
      • -
      • - -
      • -
      • - 0 selected, showing 2 of 2 total -
      • -
      -
      Name Url
      - - -   {{ds.name}}
      - @@ -87,10 +41,6 @@ -
      Name Role
      - - - {{t.name}} {{t.role}} diff --git a/public/app/features/org/partials/orgUsers.html b/public/app/features/org/partials/orgUsers.html index dc0ad562b4f..ea193694e19 100644 --- a/public/app/features/org/partials/orgUsers.html +++ b/public/app/features/org/partials/orgUsers.html @@ -18,56 +18,9 @@ - -
      -
      -
        -
      • Filters:
      • -
      • Login
      • -
      • -
      • Role
      • -
      • -
      • - - - -
      • -
      -
      -
      -
      - -
        -
      • - -
      • -
      • - -
      • -
      • - 0 selected, showing 1 of 1 total -
      • -
      - - @@ -75,10 +28,6 @@ -
      Login Email Role
      - - - {{user.login}} {{user.email}} @@ -94,56 +43,9 @@
      - -
      -
      -
        -
      • Filters:
      • -
      • Email
      • -
      • -
      • Name
      • -
      • -
      • - - - -
      • -
      -
      -
      -
      - -
        -
      • - -
      • -
      • - -
      • -
      • - 0 selected, showing 1 of 1 total -
      • -
      - - @@ -151,14 +53,10 @@ - - - + +
      Email Name
      - - - {{invite.email}} {{invite.name}} -   diff --git a/public/less/filter-table.less b/public/less/filter-table.less index 99b7a3463d8..6729b425e51 100644 --- a/public/less/filter-table.less +++ b/public/less/filter-table.less @@ -14,7 +14,7 @@ .filter-table { width: 100%; border-collapse: collapse; - table-layout: fixed; + // table-layout: fixed; } .filter-table tr { From 030f902ca525ddf51a7883ba0d8ee6191c192f90 Mon Sep 17 00:00:00 2001 From: Nick Christus Date: Mon, 7 Dec 2015 16:26:18 -0600 Subject: [PATCH 8/8] removed redundant labels --- public/app/features/profile/partials/profile.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/profile/partials/profile.html b/public/app/features/profile/partials/profile.html index 56eddad92be..63506b58bd0 100644 --- a/public/app/features/profile/partials/profile.html +++ b/public/app/features/profile/partials/profile.html @@ -72,8 +72,8 @@
      Name: {{org.name}}Role: {{org.role}}{{org.name}}{{org.role}} Current