diff --git a/wherehows-web/app/components/purge-policy.ts b/wherehows-web/app/components/purge-policy.ts index de22a3f348..f7283335d3 100644 --- a/wherehows-web/app/components/purge-policy.ts +++ b/wherehows-web/app/components/purge-policy.ts @@ -5,14 +5,29 @@ import { baseCommentEditorOptions, exemptPolicy, isExempt, + missingPolicyText, PurgePolicy, purgePolicyProps } from 'wherehows-web/constants'; import noop from 'wherehows-web/utils/noop'; export default Component.extend({ + /** + * Reference to the purge exempt policy + * @type {string} + */ exemptPolicy, + /** + * Reference to the informational text if the dataset does not have a saved purge policy + * @type {string} + */ + missingPolicyText, + + /** + * Reference to client options for each purge policy + * @type {PurgePolicyProperties} + */ purgePolicyProps, /** diff --git a/wherehows-web/app/constants/dataset-purge-policy.ts b/wherehows-web/app/constants/dataset-purge-policy.ts index fb205474e6..1284b9a10f 100644 --- a/wherehows-web/app/constants/dataset-purge-policy.ts +++ b/wherehows-web/app/constants/dataset-purge-policy.ts @@ -35,7 +35,13 @@ const purgePolicyProps: PurgePolicyProperties = { displayAs: 'Auto Purge' }, MANUAL_PURGE: { - platforms: [DatasetPlatform.MySql, DatasetPlatform.Espresso, DatasetPlatform.Teradata, DatasetPlatform.Oracle, DatasetPlatform.HDFS], + platforms: [ + DatasetPlatform.MySql, + DatasetPlatform.Espresso, + DatasetPlatform.Teradata, + DatasetPlatform.Oracle, + DatasetPlatform.HDFS + ], desc: 'Choose this option only if you or your team have implemented a custom mechanism to purge this dataset.', displayAs: 'Manual Purge' }, @@ -69,4 +75,10 @@ const exemptPolicy = PurgePolicy.PurgeExempt; */ const isExempt = (policy: PurgePolicy) => policy === PurgePolicy.PurgeExempt; -export { PurgePolicy, purgePolicyProps, isExempt, exemptPolicy }; +/** + * User informational text for datasets without a purge policy + * @type {string} + */ +const missingPolicyText = 'This dataset does not have a current compliance purge policy.'; + +export { PurgePolicy, purgePolicyProps, isExempt, exemptPolicy, missingPolicyText }; diff --git a/wherehows-web/app/styles/components/dataset-property/_all.scss b/wherehows-web/app/styles/components/dataset-property/_all.scss index 9922be07cc..cbb4608995 100644 --- a/wherehows-web/app/styles/components/dataset-property/_all.scss +++ b/wherehows-web/app/styles/components/dataset-property/_all.scss @@ -1 +1,2 @@ @import 'deprecated-dataset'; +@import 'removed-dataset'; diff --git a/wherehows-web/app/styles/components/dataset-property/_removed-dataset.scss b/wherehows-web/app/styles/components/dataset-property/_removed-dataset.scss new file mode 100644 index 0000000000..2e5cc60c5e --- /dev/null +++ b/wherehows-web/app/styles/components/dataset-property/_removed-dataset.scss @@ -0,0 +1,5 @@ +.removed-dataset { + @include pill(set-color(red, maroonflush), set-color(white, base)); + margin-top: item-spacing(3); + line-height: item-spacing(5); +} diff --git a/wherehows-web/app/templates/components/purge-policy.hbs b/wherehows-web/app/templates/components/purge-policy.hbs index 79fc8f3cc5..fddd78e9eb 100644 --- a/wherehows-web/app/templates/components/purge-policy.hbs +++ b/wherehows-web/app/templates/components/purge-policy.hbs @@ -54,7 +54,7 @@ {{else}} -
This dataset does not have a current compliance purge policy.
+{{missingPolicyText}}
To update, click edit and follow the steps {{/if}} diff --git a/wherehows-web/app/templates/datasets/dataset.hbs b/wherehows-web/app/templates/datasets/dataset.hbs index e48d8f1c82..8a5c46b942 100644 --- a/wherehows-web/app/templates/datasets/dataset.hbs +++ b/wherehows-web/app/templates/datasets/dataset.hbs @@ -11,6 +11,23 @@