From 3b279983e6227cac7e7facb89c9dc7633d1d4141 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 22 Feb 2016 17:01:58 -0500 Subject: [PATCH 01/21] Tried to reduce the opacity of the header bottom-border some to make it seem less intense. Want to get some feedback. Also added a box-shadow to the tags to smooth out the edges (something we've done at raintank) --- public/sass/components/_tags.scss | 1 + public/sass/layout/_page.scss | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/sass/components/_tags.scss b/public/sass/components/_tags.scss index 605713b7552..821e372e659 100644 --- a/public/sass/components/_tags.scss +++ b/public/sass/components/_tags.scss @@ -25,6 +25,7 @@ padding: 2px 6px; border-width: 1px; border-style: solid; + box-shadow: 0 0 1px rgba($white,.2); .icon-tag { position: relative; top: 1px; diff --git a/public/sass/layout/_page.scss b/public/sass/layout/_page.scss index ad7c8fc9841..962e9a77e90 100644 --- a/public/sass/layout/_page.scss +++ b/public/sass/layout/_page.scss @@ -33,7 +33,7 @@ justify-content: flex-end; align-items: flex-end; flex-wrap: wrap-reverse; - border-image: linear-gradient(to right, rgba(255,213,0,1) 0%, rgba(255,68,0,1) 99%, rgba(255,68,0,1) 100%); + border-image: linear-gradient(to right, rgba(255,213,0,0.5) 0%, rgba(255,68,0,0.5) 99%, rgba(255,68,0,0.5) 100%); border-image-slice: 1; border-top: 0; border-right: 0; From 650616110737d450d97018100d8b648f6fcfafac Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Tue, 23 Feb 2016 00:55:34 -0800 Subject: [PATCH 02/21] Added keyboard shortcut to export dashboard --- public/app/features/dashboard/dashnav/dashnav.ts | 1 + public/app/features/dashboard/keybindings.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts index 39b6f34da8e..6618ba0933d 100644 --- a/public/app/features/dashboard/dashnav/dashnav.ts +++ b/public/app/features/dashboard/dashnav/dashnav.ts @@ -12,6 +12,7 @@ export class DashNavCtrl { $scope.init = function() { $scope.onAppEvent('save-dashboard', $scope.saveDashboard); $scope.onAppEvent('delete-dashboard', $scope.deleteDashboard); + $scope.onAppEvent('export-dashboard', $scope.snapshot); $scope.showSettingsMenu = $scope.dashboardMeta.canEdit || $scope.contextSrv.isEditor; diff --git a/public/app/features/dashboard/keybindings.js b/public/app/features/dashboard/keybindings.js index c85226d1266..162dc8bad35 100644 --- a/public/app/features/dashboard/keybindings.js +++ b/public/app/features/dashboard/keybindings.js @@ -60,6 +60,10 @@ function(angular, $) { scope.appEvent('zoom-out', evt); }, { inputDisabled: true }); + keyboardManager.bind('ctrl+e', function(evt) { + scope.appEvent('export-dashboard', evt); + }, { inputDisabled: true }); + keyboardManager.bind('esc', function() { var popups = $('.popover.in'); if (popups.length > 0) { From 17c7ce9b408f5925b61241d1cc67dbccb83906bd Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Tue, 23 Feb 2016 00:57:39 -0800 Subject: [PATCH 03/21] Added export option in Help modal --- public/app/partials/help_modal.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/partials/help_modal.html b/public/app/partials/help_modal.html index 4fc29d1065d..c62a7e3ef16 100644 --- a/public/app/partials/help_modal.html +++ b/public/app/partials/help_modal.html @@ -32,6 +32,10 @@ CTRL+S Save dashboard + + CTRL+E + Export dashboard + CTRL+H Hide row controls From 85041d297c7c9cb5cd2a949a1ed8553f18112247 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 23 Feb 2016 10:17:26 +0100 Subject: [PATCH 04/21] ux(import): minor fixes --- .../app/features/dashboard/partials/graphiteImport.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/app/features/dashboard/partials/graphiteImport.html b/public/app/features/dashboard/partials/graphiteImport.html index d004db27c02..d23d506d17f 100644 --- a/public/app/features/dashboard/partials/graphiteImport.html +++ b/public/app/features/dashboard/partials/graphiteImport.html @@ -1,21 +1,21 @@
-

Load dashboard from Graphite-Web

+

Load dashboard from Graphite-Web

Data source
-
+
-
- +
From fc5e1d97afb11393dd3bcebdaece7ad7adda4272 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 23 Feb 2016 10:25:58 +0100 Subject: [PATCH 05/21] ux(dashboard_links): start migration to gf-form --- public/app/features/dashlinks/editor.html | 140 ++++++++++------------ public/sass/components/_gf-form.scss | 15 ++- 2 files changed, 75 insertions(+), 80 deletions(-) diff --git a/public/app/features/dashlinks/editor.html b/public/app/features/dashlinks/editor.html index 9f44d72206c..43934238be5 100644 --- a/public/app/features/dashlinks/editor.html +++ b/public/app/features/dashlinks/editor.html @@ -1,90 +1,82 @@
-
Links and Dash Navigation
+
Links and Dash Navigation
-
-
-
    -
  • - - -
  • -
  • - -
  • -
+
+
+
+
+ + + +
+
-
    -
  • +
    +
    -
  • +
-
  • Type
  • -
  • - -
  • +
    + Type +
    + +
    +
    -
  • With tags
  • -
  • - - -
  • -
  • +
    + With tags + +
    + +
    + Title + +
    + +
    -
  • -
  • - Title -
  • -
  • - -
  • -
  • Url
  • -
  • - -
  • -
  • +
  • + +
    +
  • Url
  • + - - -
    -
    -
    -
      -
    • +
    +
    + +
    +
    - -
  • Title
  • -
  • - -
  • -
  • Tooltip
  • -
  • - -
  • -
  • Icon
  • -
  • - -
  • - -
    -
    -
    -
      -
    • +
    +
    + Title + +
    + +
    + Tooltip + +
    + +
    + Icon +
    + +
    +
    +
    + +
    +
    - -
  • +
  • +
    - -
  • -
  • - -
    +
    +
    -
    -
    - -
    + diff --git a/public/sass/components/_gf-form.scss b/public/sass/components/_gf-form.scss index cd6e7be510a..7ada3623cc6 100644 --- a/public/sass/components/_gf-form.scss +++ b/public/sass/components/_gf-form.scss @@ -9,12 +9,6 @@ $gf-form-label-margin: 0.25rem; align-items: center; text-align: left; - .checkbox-label { - display: inline; - cursor: pointer; - padding: 8px 7px 8px 4px; - } - .cr1 { margin-left: 8px; } @@ -58,6 +52,15 @@ $gf-form-label-margin: 0.25rem; .gf-form-checkbox { flex-shrink: 0; + padding: $input-padding-y $input-padding-x; + line-height: $input-line-height; + + .checkbox-label { + display: inline; + cursor: pointer; + padding: $input-padding-y $input-padding-x; + line-height: $input-line-height; + } } .gf-form-input { From bbc079e57b7cc10cd3731d6225c04fbbf19ebd88 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 23 Feb 2016 12:41:15 +0100 Subject: [PATCH 06/21] ux(snapshots): migrates to gf-form --- .../features/snapshot/partials/snapshots.html | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/public/app/features/snapshot/partials/snapshots.html b/public/app/features/snapshot/partials/snapshots.html index 90b65058e21..99aac73bce6 100644 --- a/public/app/features/snapshot/partials/snapshots.html +++ b/public/app/features/snapshot/partials/snapshots.html @@ -2,39 +2,39 @@
    -
    - + + + + + + + + + + + + + + + + + + +
    NameSnapshot url
    + {{snapshot.name}} + + dashboard/snapshot/{{snapshot.key}} + + + + View + + + + + +
    +
    From 75454b02c0f55aabb4d3a84209bea1521b5bc5fa Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 23 Feb 2016 13:04:08 +0100 Subject: [PATCH 07/21] fix(dataproxy): remove partially used cache closes #4044 --- pkg/api/dataproxy.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/api/dataproxy.go b/pkg/api/dataproxy.go index 4d4556c40cb..6e6b4394e2d 100644 --- a/pkg/api/dataproxy.go +++ b/pkg/api/dataproxy.go @@ -64,20 +64,12 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string, targetUrl *url.URL) *ht return &httputil.ReverseProxy{Director: director} } -var dsMap map[int64]*m.DataSource = make(map[int64]*m.DataSource) - func getDatasource(id int64, orgId int64) (*m.DataSource, error) { - // ds, exists := dsMap[id] - // if exists && ds.OrgId == orgId { - // return ds, nil - // } - query := m.GetDataSourceByIdQuery{Id: id, OrgId: orgId} if err := bus.Dispatch(&query); err != nil { return nil, err } - dsMap[id] = &query.Result return &query.Result, nil } From c189c2016438d7077ca4bc6b4b371bc346d1f966 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 23 Feb 2016 14:49:10 +0100 Subject: [PATCH 08/21] ux(modal): tight-form -> gf-form --- .../dashboard/partials/shareModal.html | 155 +++++++----------- public/sass/components/_modals.scss | 8 + 2 files changed, 70 insertions(+), 93 deletions(-) diff --git a/public/app/features/dashboard/partials/shareModal.html b/public/app/features/dashboard/partials/shareModal.html index 77ed80015e3..db09f81a20b 100644 --- a/public/app/features/dashboard/partials/shareModal.html +++ b/public/app/features/dashboard/partials/shareModal.html @@ -35,53 +35,30 @@
    -
    -
    - - - +
    +
    + +
    +
    +
    +
    +
    -