diff --git a/wherehows-web/app/components/datasets/containers/health-score-gauge.ts b/wherehows-web/app/components/datasets/containers/health-score-gauge.ts index 8e8cfafa51..08d7e5feb2 100644 --- a/wherehows-web/app/components/datasets/containers/health-score-gauge.ts +++ b/wherehows-web/app/components/datasets/containers/health-score-gauge.ts @@ -4,8 +4,6 @@ import { IDatasetHealth } from 'wherehows-web/typings/api/datasets/health'; import { readDatasetHealthByUrn } from 'wherehows-web/utils/api/datasets/health'; import { get, set } from '@ember/object'; -// import { once } from '@ember/runloop'; - export default class HealthScoreGauge extends Component { /** * The urn identifier for the dataset @@ -17,12 +15,14 @@ export default class HealthScoreGauge extends Component { * Defines the tag to be used in the rendered html element for this component * @type {string} */ - tagName: ''; + tagName = ''; + + elementId = undefined; /** * The health score to be passed to the container */ - healthScore: number; + healthScore: number = 0; didInsertElement() { get(this, 'getHealthScoreTask').perform(); diff --git a/wherehows-web/app/components/visualization/charts/score-gauge.ts b/wherehows-web/app/components/visualization/charts/score-gauge.ts index f7ccf4744d..bacce33c38 100644 --- a/wherehows-web/app/components/visualization/charts/score-gauge.ts +++ b/wherehows-web/app/components/visualization/charts/score-gauge.ts @@ -56,7 +56,7 @@ export default class VisualizationChartsScoreGauge extends Component { * @type {number} * @default 0 */ - score: number = this.score || 0; + score: number; /** * Represents the maximum value a score can be. Helps us to calculate a percentage score diff --git a/wherehows-web/app/services/dataset-meta.ts b/wherehows-web/app/services/dataset-meta.ts deleted file mode 100644 index 6c79b5a315..0000000000 --- a/wherehows-web/app/services/dataset-meta.ts +++ /dev/null @@ -1,20 +0,0 @@ -import Service from '@ember/service'; -import { IObject } from 'wherehows-web/typings/generic'; -import { get } from '@ember/object'; - -export default class DatasetMeta extends Service { - healthScore: number; - - healthScores: IObject = {}; - - setHealthScoreForUrn(urn: string, score: number) { - get(this, 'healthScores')[urn] = score; - } -} - -// DO NOT DELETE: this is how TypeScript knows how to look up your services. -declare module '@ember/service' { - interface Registry { - 'dataset-meta': DatasetMeta; - } -} 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 c10b475ba0..4833ba635d 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,4 +1,8 @@ -{{visualization/charts/score-gauge - class="dataset-health-score" - score=healthScore - title="Health Score:"}} \ No newline at end of file +{{#if getHealthScoreTask.isIdle}} + {{visualization/charts/score-gauge + class="dataset-health-score" + score=healthScore + title="Health Score:"}} +{{else}} + {{pendulum-ellipsis-animation}} +{{/if}}