mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-13 01:38:35 +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 {
|
export enum HealthDataFields {
|
||||||
category = 'Category',
|
category = 'Category',
|
||||||
severity = 'Severity',
|
|
||||||
description = 'Description',
|
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> {
|
headers = computed('dropdownOptions', function(this: DatasetsHealthScoreTable): Array<IHealthTableHeader> {
|
||||||
const { dropdownOptions, onDropdownSelect } = getProperties(this, 'dropdownOptions', 'onDropdownSelect');
|
const { dropdownOptions, onDropdownSelect } = getProperties(this, 'dropdownOptions', 'onDropdownSelect');
|
||||||
|
|
||||||
return ['Category', 'Description', 'Score', 'Severity'].map(header => ({
|
return (Object.keys(HealthDataFields) as Array<keyof typeof HealthDataFields>).map(header => ({
|
||||||
label: header,
|
label: HealthDataFields[header],
|
||||||
class: `dataset-health__score-table__${header.toLowerCase()}`,
|
class: `dataset-health__score-table__${header.toLowerCase()}`,
|
||||||
dropdownOptions: dropdownOptions[header.toLowerCase()],
|
dropdownOptions: dropdownOptions[header.toLowerCase()],
|
||||||
initialDropdown: { label: header, value: '' },
|
initialDropdown: { label: HealthDataFields[header], value: '' },
|
||||||
onDropdownSelect: onDropdownSelect.bind(this, header)
|
onDropdownSelect: onDropdownSelect.bind(this, header)
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@ -145,12 +145,16 @@ export default class DatasetsHealthScoreTable extends Component {
|
|||||||
'currentCategoryFilter',
|
'currentCategoryFilter',
|
||||||
'currentSeverityFilter'
|
'currentSeverityFilter'
|
||||||
);
|
);
|
||||||
|
|
||||||
return tableData.map(healthScore => ({
|
return tableData.map(healthScore => ({
|
||||||
...healthScore,
|
...healthScore,
|
||||||
isHidden:
|
isHidden:
|
||||||
(!!categoryFilter && healthScore.category !== categoryFilter) ||
|
(!!categoryFilter && healthScore.category !== categoryFilter) ||
|
||||||
(!!severityFilter && healthScore.severity !== severityFilter),
|
(!!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 {
|
& .dataset-health__score-table {
|
||||||
&__category {
|
&__category {
|
||||||
color: get-color(blue5);
|
color: get-color(blue5);
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
{{#if (and isActiveTab severityData)}}
|
{{#if (and isActiveTab severityData)}}
|
||||||
{{visualization/charts/horizontal-bar-chart
|
{{visualization/charts/horizontal-bar-chart
|
||||||
class="severity-chart"
|
class="severity-chart"
|
||||||
title="Severity"
|
title="Priority Level"
|
||||||
series=severityData
|
series=severityData
|
||||||
labelAppendValue="%"
|
labelAppendValue="%"
|
||||||
onBarSelect=(action onSeveritySelect)}}
|
onBarSelect=(action onSeveritySelect)}}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ const datasetComplianceSuggestionFeedbackUrlByUrn = (urn: string): string =>
|
|||||||
* @param {string} urn
|
* @param {string} urn
|
||||||
* @return {string}
|
* @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
|
* Describes the properties on a map generated by reading the compliance policy for a dataset
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user