From ed779911edd0779c1a954decd428d25b53237017 Mon Sep 17 00:00:00 2001 From: cptran777 Date: Mon, 17 Sep 2018 17:21:26 -0700 Subject: [PATCH 1/2] Add a tooltip for health score and remove more info from tooltip messages --- wherehows-frontend/app/controllers/Application.java | 3 +++ .../components/visualization/charts/_score-gauge.scss | 1 + .../datasets/containers/health-score-gauge.hbs | 10 ++++++++-- wherehows-web/app/templates/components/more-info.hbs | 5 ++--- .../components/visualization/charts/score-gauge.hbs | 6 +++++- wherehows-web/app/templates/datasets/dataset.hbs | 4 +++- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/wherehows-frontend/app/controllers/Application.java b/wherehows-frontend/app/controllers/Application.java index c8efc243b2..2efe15b1a1 100644 --- a/wherehows-frontend/app/controllers/Application.java +++ b/wherehows-frontend/app/controllers/Application.java @@ -93,6 +93,8 @@ public class Application extends Controller { Play.application().configuration().getString("links.wiki.complianceOwner", ""); private static final String WHZ_WIKI_LINKS__EXPORT_POLICY = Play.application().configuration().getString("links.wiki.exportPolicy", ""); + private static final String WHZ_WIKI_LINKS__METADATA_HEALTH = + Play.application().configuration().getString("links.wiki.metadataHealth", ""); private static final String WHZ_LINKS__JIT_ACL_CONTACT = Play.application().configuration().getString("links.jitAcl.contact", ""); @@ -266,6 +268,7 @@ public class Application extends Controller { wikiLinks.put("jitAcl", WHZ_WIKI_LINKS__JIT_ACL_FAQ); wikiLinks.put("metadataCustomRegex", WHZ_WIKI_LINKS__METADATA_CUSTOM_REGEX); wikiLinks.put("exportPolicy", WHZ_WIKI_LINKS__EXPORT_POLICY); + wikiLinks.put("metadataHealth", WHZ_WIKI_LINKS__METADATA_HEALTH); return wikiLinks; } diff --git a/wherehows-web/app/styles/components/visualization/charts/_score-gauge.scss b/wherehows-web/app/styles/components/visualization/charts/_score-gauge.scss index 74c0a25b5f..4f23313154 100644 --- a/wherehows-web/app/styles/components/visualization/charts/_score-gauge.scss +++ b/wherehows-web/app/styles/components/visualization/charts/_score-gauge.scss @@ -14,6 +14,7 @@ $score-gauge-dimension: 128px; font-size: 16px; font-weight: 600; margin: 0; + color: get-color(black); } &-value { diff --git a/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs b/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs index 4833ba635d..80e1a53194 100644 --- a/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs +++ b/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs @@ -1,8 +1,14 @@ {{#if getHealthScoreTask.isIdle}} - {{visualization/charts/score-gauge + {{#visualization/charts/score-gauge class="dataset-health-score" score=healthScore - title="Health Score:"}} + customTitleTemplate=true}} + Health Score: + {{more-info + link=@wikiLinks.metadataHealth + tooltip="Click for more information on Metadata Health Score" + }} + {{/visualization/charts/score-gauge}} {{else}} {{pendulum-ellipsis-animation}} {{/if}} diff --git a/wherehows-web/app/templates/components/more-info.hbs b/wherehows-web/app/templates/components/more-info.hbs index c2a843abc9..8c77b64a65 100644 --- a/wherehows-web/app/templates/components/more-info.hbs +++ b/wherehows-web/app/templates/components/more-info.hbs @@ -2,12 +2,11 @@ {{#if tooltip}} - More Info + {{else}} - More Info + {{/if}} - diff --git a/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs b/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs index 91fc410dcd..1247951243 100644 --- a/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs +++ b/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs @@ -1,7 +1,11 @@ {{high-charts chartOptions=(readonly chartOptions) content=(readonly chartData)}}
- {{title}} + {{#if customTitleTemplate}} + {{yield}} + {{else}} + {{title}} + {{/if}}
{{#if (eq scoreDisplay "percent")}} diff --git a/wherehows-web/app/templates/datasets/dataset.hbs b/wherehows-web/app/templates/datasets/dataset.hbs index b872a2a158..4b712a9b7f 100644 --- a/wherehows-web/app/templates/datasets/dataset.hbs +++ b/wherehows-web/app/templates/datasets/dataset.hbs @@ -62,7 +62,9 @@ avatarEntityProps=avatarEntityProps class="dataset-owner-list"}} - {{datasets/containers/health-score-gauge urn=encodedUrn}} + {{#link-to "datasets.dataset.health" encodedUrn}} + {{datasets/containers/health-score-gauge urn=encodedUrn wikiLinks=wikiLinks}} + {{/link-to}} {{/if}}
From dbbcb921771767a9825f65d51a5828b2b625e149 Mon Sep 17 00:00:00 2001 From: cptran777 Date: Tue, 18 Sep 2018 12:53:07 -0700 Subject: [PATCH 2/2] health score enhancements code cleanup --- .../components/datasets/containers/health-score-gauge.hbs | 3 +-- .../templates/components/visualization/charts/score-gauge.hbs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs b/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs index 80e1a53194..6080efb877 100644 --- a/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs +++ b/wherehows-web/app/templates/components/datasets/containers/health-score-gauge.hbs @@ -1,8 +1,7 @@ {{#if getHealthScoreTask.isIdle}} {{#visualization/charts/score-gauge class="dataset-health-score" - score=healthScore - customTitleTemplate=true}} + score=healthScore}} Health Score: {{more-info link=@wikiLinks.metadataHealth diff --git a/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs b/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs index 1247951243..60cc9899eb 100644 --- a/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs +++ b/wherehows-web/app/templates/components/visualization/charts/score-gauge.hbs @@ -1,7 +1,7 @@ {{high-charts chartOptions=(readonly chartOptions) content=(readonly chartData)}}
- {{#if customTitleTemplate}} + {{#if hasBlock}} {{yield}} {{else}} {{title}}