mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 19:25:56 +00:00
Merge pull request #1367 from cptran777/health-score-ux-adjustment
Change UX for metadata health score tab
This commit is contained in:
commit
236f5d330a
@ -14,9 +14,9 @@ import { IObject } from 'wherehows-web/typings/generic';
|
||||
*/
|
||||
export enum HealthDataFields {
|
||||
category = 'Category',
|
||||
severity = 'Severity',
|
||||
description = 'Description',
|
||||
score = 'Score'
|
||||
score = 'Score',
|
||||
severity = 'Priority'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -76,11 +76,11 @@ export default class DatasetsHealthScoreTable extends Component {
|
||||
headers = computed('dropdownOptions', function(this: DatasetsHealthScoreTable): Array<IHealthTableHeader> {
|
||||
const { dropdownOptions, onDropdownSelect } = getProperties(this, 'dropdownOptions', 'onDropdownSelect');
|
||||
|
||||
return ['Category', 'Description', 'Score', 'Severity'].map(header => ({
|
||||
label: header,
|
||||
return (Object.keys(HealthDataFields) as Array<keyof typeof HealthDataFields>).map(header => ({
|
||||
label: HealthDataFields[header],
|
||||
class: `dataset-health__score-table__${header.toLowerCase()}`,
|
||||
dropdownOptions: dropdownOptions[header.toLowerCase()],
|
||||
initialDropdown: { label: header, value: '' },
|
||||
initialDropdown: { label: HealthDataFields[header], value: '' },
|
||||
onDropdownSelect: onDropdownSelect.bind(this, header)
|
||||
}));
|
||||
});
|
||||
@ -145,12 +145,16 @@ export default class DatasetsHealthScoreTable extends Component {
|
||||
'currentCategoryFilter',
|
||||
'currentSeverityFilter'
|
||||
);
|
||||
|
||||
return tableData.map(healthScore => ({
|
||||
...healthScore,
|
||||
isHidden:
|
||||
(!!categoryFilter && healthScore.category !== categoryFilter) ||
|
||||
(!!severityFilter && healthScore.severity !== severityFilter),
|
||||
highlightClass: `dataset-health__score-table__row--${(healthScore.severity || 'normal').toLowerCase()}`
|
||||
highlightClass:
|
||||
healthScore.score < 100
|
||||
? `dataset-health__score-table__row--${(healthScore.severity || 'normal').toLowerCase()}`
|
||||
: 'dataset-health__score-table__row--successful'
|
||||
}));
|
||||
}
|
||||
);
|
||||
|
||||
@ -23,6 +23,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
&--successful {
|
||||
.dataset-health__score-table {
|
||||
&__score {
|
||||
color: get-color(green5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .dataset-health__score-table {
|
||||
&__category {
|
||||
color: get-color(blue5);
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
{{#if (and isActiveTab severityData)}}
|
||||
{{visualization/charts/horizontal-bar-chart
|
||||
class="severity-chart"
|
||||
title="Severity"
|
||||
title="Priority Level"
|
||||
series=severityData
|
||||
labelAppendValue="%"
|
||||
onBarSelect=(action onSeveritySelect)}}
|
||||
|
||||
@ -58,7 +58,7 @@ const datasetComplianceSuggestionFeedbackUrlByUrn = (urn: string): string =>
|
||||
* @param {string} urn
|
||||
* @return {string}
|
||||
*/
|
||||
const datasetExportPolicyByUrn = (urn: string): string => `${datasetUrlByUrn(urn)}/exportPolicy`;
|
||||
const datasetExportPolicyByUrn = (urn: string): string => `${datasetUrlByUrn(urn)}/exportpolicy`;
|
||||
|
||||
/**
|
||||
* Describes the properties on a map generated by reading the compliance policy for a dataset
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user