From 29be571afd0a3a6c40909afc4371e0af8546d12f Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 27 Jul 2016 09:31:01 +0200 Subject: [PATCH] Add button to check all groups + a bit of style polish --- .../src/less/healthcheck.less | 51 +++++++------ .../developer/healthcheck.controller.js | 20 ++--- .../dashboard/developer/healthcheck.html | 76 +++++++++++-------- 3 files changed, 83 insertions(+), 64 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/healthcheck.less b/src/Umbraco.Web.UI.Client/src/less/healthcheck.less index a5f2d454f1..8e4fb55d15 100644 --- a/src/Umbraco.Web.UI.Client/src/less/healthcheck.less +++ b/src/Umbraco.Web.UI.Client/src/less/healthcheck.less @@ -1,12 +1,20 @@ -/* Vars */ - @red-orange: #FF3F34; - @sunrise: #F5D226; - @emerald: #50C878; - .umb-healthcheck { display: flex; flex-wrap: wrap; + margin-left: -10px; + margin-right: -10px; +} + +.umb-healthcheck-help-text { + line-height: 1.6em; + margin-bottom: 30px; +} + +.umb-healthcheck-action-bar { + display: flex; + justify-content: flex-end; + margin-bottom: 20px; } @@ -42,7 +50,6 @@ /* Title */ .umb-healthcheck-title { - margin-bottom: 15px; font-size: 14px; font-weight: bold; } @@ -50,28 +57,26 @@ /* Messages */ .umb-healthcheck-messages { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; + margin-top: 15px; } .umb-healthcheck-message { position: relative; background: #fff; border-radius: 50px; - display: flex; - align-items: center; - flex: 1 1 auto; - padding: 5px 10px; + display: inline-flex; + align-items: center; + padding-left: 8px; + padding-right: 8px; margin-bottom: 5px; color: #000; font-weight: bold; + font-size: 13px; } .umb-healthcheck-message i { - font-size: 20px; - margin-right: 5px; + font-size: 15px; + margin-right: 3px; } .umb-healthcheck-details-link { @@ -99,11 +104,11 @@ font-size: 14px; font-weight: bold; - height: 38px; + height: 30px; line-height: 1; max-width: 100%; - padding: 0 18px; + padding: 0 15px; color: #484848; background-color: #e0e0e0; @@ -235,7 +240,7 @@ } .umb-healthcheck-group__details-checks { - border: 2px solid @grayLight; + border: 1px solid @grayLight; border-top: none; border-radius: 0 0 3px 3px; } @@ -252,13 +257,13 @@ font-size: 14px; color: @black; font-weight: bold; + margin-bottom: 2px; } .umb-healthcheck-group__details-check-description { font-size: 12px; color: @grayMed; - line-height: 1.6rem; - //margin-top: 10px; + line-height: 1.6em; } .umb-healthcheck-group__details-status { @@ -328,6 +333,6 @@ } .umb-healthcheck-group__details-status-action-description { - margin-top: 10px; - font-size: 13px; + margin-top: 5px; + font-size: 11px; } diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.controller.js index e335ddd365..3ca2bee2f1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.controller.js @@ -16,6 +16,7 @@ vm.getStatus = getStatus; vm.executeAction = executeAction; + vm.checkAllGroups = checkAllGroups; vm.checkAllInGroup = checkAllInGroup; vm.openGroup = openGroup; vm.setViewState = setViewState; @@ -23,16 +24,7 @@ // Get a (grouped) list of all health checks healthCheckResource.getAllChecks().then( function(response) { - - // set number of checks which has been executed - for (var i = 0; i < response.length; i++) { - var group = response[i]; - group.checkCounter = 0; - checkAllInGroup(group, group.checks); - } - vm.groups = response; - } ); @@ -86,6 +78,16 @@ }); } + function checkAllGroups(groups) { + // set number of checks which has been executed + for (var i = 0; i < groups.length; i++) { + var group = groups[i]; + console.log(group); + checkAllInGroup(group, group.checks); + } + vm.groups = groups; + } + function checkAllInGroup(group, checks) { group.checkCounter = 0; diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.html index 706381337c..2214d48993 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/healthcheck.html @@ -1,43 +1,55 @@
-

Health Check

-

The health checker evaluates various areas of your site for best practice settings, configuration, potential problems, etc. You can easily fix problems by pressing a button.
- You can add your own health checks, have a look at the documentation for more information about custom health checks.

-
+
-
-
-
{{group.name}}
+

Health Check

+
+

The health checker evaluates various areas of your site for best practice settings, configuration, potential problems, etc. You can easily fix problems by pressing a button. + You can add your own health checks, have a look at the documentation for more information about custom health checks.

+
-
- -
+
+ +
-
+
-
- - {{ group.totalSuccess }} +
+
+ +
{{group.name}}
+ +
+
-
- - {{ group.totalWarning }} -
+
-
- - {{ group.totalError }} -
+
+ + {{ group.totalSuccess }} +
+ +
+ + {{ group.totalWarning }} +
+ +
+ + {{ group.totalError }} +
+ +
+ + {{ group.totalInfo }} +
-
- - {{ group.totalInfo }}
-
+
@@ -46,7 +58,7 @@ - ← Take me back + ← Back to overview @@ -55,7 +67,7 @@
{{ vm.selectedGroup.name }}
- +
@@ -85,11 +97,11 @@
- - Set new value: +
+
- - +
+