From e7697012b1231dea5afd1e857ac6a12e92a0c487 Mon Sep 17 00:00:00 2001 From: Ran Byron Date: Wed, 17 Apr 2019 10:09:08 +0300 Subject: [PATCH 1/4] Dashboard save fail indication --- client/app/pages/dashboards/dashboard.html | 33 +++++++++++++++------- client/app/pages/dashboards/dashboard.js | 13 +++++++-- client/app/pages/dashboards/dashboard.less | 4 +++ 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/client/app/pages/dashboards/dashboard.html b/client/app/pages/dashboards/dashboard.html index cc987db29b..34f3d0202c 100644 --- a/client/app/pages/dashboards/dashboard.html +++ b/client/app/pages/dashboards/dashboard.html @@ -15,16 +15,29 @@

-
- Saving - Saved - - +
+ + + Saving + + + + Saving Failed + + + + + Saved + +
diff --git a/client/app/pages/dashboards/dashboard.js b/client/app/pages/dashboards/dashboard.js index a0841dabd6..3a159f1906 100644 --- a/client/app/pages/dashboards/dashboard.js +++ b/client/app/pages/dashboards/dashboard.js @@ -78,6 +78,7 @@ function DashboardCtrl( }) .finally(() => { this.saveInProgress = false; + this.showSaveButtonProgress = false; }); }; @@ -86,6 +87,8 @@ function DashboardCtrl( return _.debounce(() => this.saveDashboardLayout(), 2000)(); }; + this.saveDelay = false; + this.showSaveButtonProgress = false; this.layoutEditing = false; this.isFullscreen = false; this.refreshRate = null; From 201d4f9838e34a03ca9dae032429285b4fe413f6 Mon Sep 17 00:00:00 2001 From: Ran Byron Date: Fri, 19 Apr 2019 10:47:04 +0300 Subject: [PATCH 3/4] Change edit state when save completes --- client/app/pages/dashboards/dashboard.html | 4 ++-- client/app/pages/dashboards/dashboard.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/app/pages/dashboards/dashboard.html b/client/app/pages/dashboards/dashboard.html index 6c91a8e631..46f3912e7c 100644 --- a/client/app/pages/dashboards/dashboard.html +++ b/client/app/pages/dashboards/dashboard.html @@ -19,8 +19,8 @@

Saving - diff --git a/client/app/pages/dashboards/dashboard.js b/client/app/pages/dashboards/dashboard.js index 3a159f1906..98dbacfad8 100644 --- a/client/app/pages/dashboards/dashboard.js +++ b/client/app/pages/dashboards/dashboard.js @@ -70,6 +70,9 @@ function DashboardCtrl( .all(_.map(changedWidgets, widget => widget.save())) .then(() => { this.isLayoutDirty = false; + if (this.editBtnClickedWhileSaving) { + this.layoutEditing = false; + } }) .catch(() => { // in the off-chance that a widget got deleted mid-saving it's position, an error will occur @@ -78,7 +81,7 @@ function DashboardCtrl( }) .finally(() => { this.saveInProgress = false; - this.showSaveButtonProgress = false; + this.editBtnClickedWhileSaving = false; }); }; @@ -88,7 +91,7 @@ function DashboardCtrl( }; this.saveDelay = false; - this.showSaveButtonProgress = false; + this.editBtnClickedWhileSaving = false; this.layoutEditing = false; this.isFullscreen = false; this.refreshRate = null; From a9b6bcaa3a8793d45afb2ba0819590cce3359226 Mon Sep 17 00:00:00 2001 From: Ran Byron Date: Fri, 19 Apr 2019 14:18:07 +0300 Subject: [PATCH 4/4] Removed unneeded css class --- client/app/assets/less/redash/redash-newstyle.less | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/app/assets/less/redash/redash-newstyle.less b/client/app/assets/less/redash/redash-newstyle.less index 8808113960..28a0389568 100644 --- a/client/app/assets/less/redash/redash-newstyle.less +++ b/client/app/assets/less/redash/redash-newstyle.less @@ -937,8 +937,4 @@ text.slicetext { .markdown strong { font-weight: bold; -} - -.disabled-silent { - pointer-events: none; } \ No newline at end of file