mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-27 02:25:58 +00:00
adds representation for dataset purge policy when viewing compliance in readonly mode
This commit is contained in:
parent
0439ff49db
commit
a3356fde6d
@ -11,10 +11,6 @@ import {
|
|||||||
import noop from 'wherehows-web/utils/noop';
|
import noop from 'wherehows-web/utils/noop';
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
tagName: 'ul',
|
|
||||||
|
|
||||||
classNames: ['purge-policy-list'],
|
|
||||||
|
|
||||||
exemptPolicy,
|
exemptPolicy,
|
||||||
|
|
||||||
purgePolicyProps,
|
purgePolicyProps,
|
||||||
|
@ -98,18 +98,20 @@
|
|||||||
{{partial "datasets/dataset-compliance/dataset-classification"}}
|
{{partial "datasets/dataset-compliance/dataset-classification"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (or isReadOnly (eq editStepIndex 0))}}
|
{{#if (or isReadOnly (eq editStepIndex 1))}}
|
||||||
{{partial "datasets/dataset-compliance/dataset-compliance-entities"}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if (eq editStepIndex 1)}}
|
|
||||||
{{purge-policy
|
{{purge-policy
|
||||||
|
isEditable=(not isReadOnly)
|
||||||
platform=platform
|
platform=platform
|
||||||
purgeNote=complianceInfo.compliancePurgeNote
|
purgeNote=complianceInfo.compliancePurgeNote
|
||||||
purgePolicy=(readonly complianceInfo.complianceType)
|
purgePolicy=(readonly complianceInfo.complianceType)
|
||||||
onPolicyChange=(action "onDatasetPurgePolicyChange")
|
onPolicyChange=(action "onDatasetPurgePolicyChange")
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (or isReadOnly (eq editStepIndex 0))}}
|
||||||
|
{{partial "datasets/dataset-compliance/dataset-compliance-entities"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{yield}}
|
{{yield}}
|
||||||
|
@ -1,32 +1,62 @@
|
|||||||
{{#each-in purgePolicyProps as |purgeType prop|}}
|
<section class="metadata-prompt">
|
||||||
<li
|
<header class="metadata-prompt__header">
|
||||||
class="purge-policy-list__item {{unless (contains (uppercase platform) prop.platforms) 'purge-policy-list__item--disabled'}}">
|
<p>
|
||||||
|
Compliance Purge Policy
|
||||||
|
</p>
|
||||||
|
</header>
|
||||||
|
</section>
|
||||||
|
|
||||||
{{#radio-button-composer
|
<ul class="purge-policy-list">
|
||||||
name="dataset-purge-policy"
|
{{#if isEditable}}
|
||||||
value=(if (contains (uppercase platform) prop.platforms) purgeType null)
|
|
||||||
disabled=(if (contains (uppercase platform) prop.platforms) false true)
|
|
||||||
groupValue=(readonly purgePolicy)
|
|
||||||
changed=(action "onChange")
|
|
||||||
}}
|
|
||||||
{{prop.displayAs}}
|
|
||||||
{{/radio-button-composer}}
|
|
||||||
|
|
||||||
{{#unless (contains (uppercase platform) prop.platforms)}}
|
{{#each-in purgePolicyProps as |purgeType prop|}}
|
||||||
<p class="purge-policy-list__availability">
|
<li
|
||||||
Purge policy not available for <span class="purge-policy-list__platform--unavailable">{{lowercase platform}}</span>
|
class="purge-policy-list__item {{unless (contains (uppercase platform) prop.platforms)
|
||||||
</p>
|
'purge-policy-list__item--disabled'}}">
|
||||||
{{/unless}}
|
|
||||||
|
|
||||||
<p>{{prop.desc}}</p>
|
{{#radio-button-composer
|
||||||
|
name="dataset-purge-policy"
|
||||||
|
value=(if (contains (uppercase platform) prop.platforms) purgeType null)
|
||||||
|
disabled=(if (contains (uppercase platform) prop.platforms) false true)
|
||||||
|
groupValue=(readonly purgePolicy)
|
||||||
|
changed=(action "onChange")
|
||||||
|
}}
|
||||||
|
{{prop.displayAs}}
|
||||||
|
{{/radio-button-composer}}
|
||||||
|
|
||||||
{{#if (and requestExemptionReason (eq purgeType exemptPolicy))}}
|
{{#unless (contains (uppercase platform) prop.platforms)}}
|
||||||
|
<p class="purge-policy-list__availability">
|
||||||
|
Purge policy not available for <span class="purge-policy-list__platform--unavailable">
|
||||||
|
{{lowercase platform}}</span>
|
||||||
|
</p>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{medium-content-editable
|
<p>{{prop.desc}}</p>
|
||||||
value=purgeNote
|
|
||||||
options=editorOptions
|
{{#if (and requestExemptionReason (eq purgeType exemptPolicy))}}
|
||||||
class="comment-new__content"}}
|
|
||||||
|
{{medium-content-editable
|
||||||
|
value=purgeNote
|
||||||
|
options=editorOptions
|
||||||
|
class="comment-new__content"}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
</li>
|
||||||
|
{{/each-in}}
|
||||||
|
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
{{#if purgeType}}
|
||||||
|
<li class="purge-policy-list__item">
|
||||||
|
<strong>
|
||||||
|
{{get (get purgePolicyProps purgeType) "displayAs"}}
|
||||||
|
</strong>
|
||||||
|
</li>
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
<p>This dataset does not have a current compliance purge policy.</p>
|
||||||
|
<sub>To update, click edit and follow the steps</sub>
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
{{/if}}
|
||||||
{{/each-in}}
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user