mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-03 14:23:03 +00:00
mark all as no
This commit is contained in:
parent
b5b2b2b8ba
commit
ef1c1df63b
@ -323,7 +323,7 @@ export default Component.extend({
|
|||||||
datasetClassification: computed(`${datasetClassificationKey}.{${datasetClassifiersKeys.join(',')}}`, function() {
|
datasetClassification: computed(`${datasetClassificationKey}.{${datasetClassifiersKeys.join(',')}}`, function() {
|
||||||
const sourceDatasetClassification = get(this, datasetClassificationKey) || {};
|
const sourceDatasetClassification = get(this, datasetClassificationKey) || {};
|
||||||
|
|
||||||
return Object.keys(datasetClassifiers).sort().reduce((classifiers, classifier) => {
|
return datasetClassifiersKeys.sort().reduce((classifiers, classifier) => {
|
||||||
return [
|
return [
|
||||||
...classifiers,
|
...classifiers,
|
||||||
{
|
{
|
||||||
@ -615,7 +615,41 @@ export default Component.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a reference to the current dataset classification object
|
||||||
|
*/
|
||||||
|
getDatasetClassificationRef() {
|
||||||
|
let sourceDatasetClassification = getWithDefault(this, datasetClassificationKey, {});
|
||||||
|
|
||||||
|
// For datasets initially without a datasetClassification, the default value is null
|
||||||
|
if (sourceDatasetClassification === null) {
|
||||||
|
sourceDatasetClassification = set(this, datasetClassificationKey, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
return sourceDatasetClassification;
|
||||||
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
/**
|
||||||
|
* Sets each datasetClassification value as false
|
||||||
|
*/
|
||||||
|
markDatasetAsNotContainingMemberData() {
|
||||||
|
const willMarkAllAsNo = confirm(
|
||||||
|
'Are you sure that any this dataset does not contain any of the listed types of member data'
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
willMarkAllAsNo &&
|
||||||
|
setProperties(
|
||||||
|
this.getDatasetClassificationRef(),
|
||||||
|
datasetClassifiersKeys.reduce(
|
||||||
|
(classification, classifier) => ({ ...classification, ...{ [classifier]: false } }),
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the user intent to place this compliance component in edit mode
|
* Handle the user intent to place this compliance component in edit mode
|
||||||
*/
|
*/
|
||||||
@ -748,14 +782,7 @@ export default Component.extend({
|
|||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
onChangeDatasetClassification(classifier, value) {
|
onChangeDatasetClassification(classifier, value) {
|
||||||
let sourceDatasetClassification = getWithDefault(this, datasetClassificationKey, {});
|
return set(this.getDatasetClassificationRef(), classifier, value);
|
||||||
|
|
||||||
// For datasets initially without a datasetClassification, the default value is null
|
|
||||||
if (sourceDatasetClassification === null) {
|
|
||||||
sourceDatasetClassification = set(this, datasetClassificationKey, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
return set(sourceDatasetClassification, classifier, value);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Prompt for privacy compliance
|
* Prompt for privacy compliance
|
||||||
*/
|
*/
|
||||||
.metadata-prompt {
|
.metadata-prompt {
|
||||||
margin-top: 30px;
|
margin: 30px 0 20px;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides default styles
|
* Overrides default styles
|
||||||
@ -13,11 +13,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
|
display: flex;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: fw(normal, 4);
|
font-weight: fw(normal, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mark-dataset-no-button {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/// Wraps a status notification icon for a given dataset
|
/// Wraps a status notification icon for a given dataset
|
||||||
.dataset-tag-container {
|
.dataset-tag-container {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -90,13 +90,21 @@
|
|||||||
</sup>
|
</sup>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
{{#if isEditing}}
|
||||||
|
<button
|
||||||
|
{{action "markDatasetAsNotContainingMemberData"}}
|
||||||
|
class="nacho-button--large nacho-button--secondary mark-dataset-no-button">
|
||||||
|
Mark all as No
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
</header>
|
</header>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<table class="nacho-table nacho-table--bordered nacho-table--stripped">
|
<table class="nacho-table nacho-table--bordered nacho-table--stripped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Types of Member Data</th>
|
<th>Types of member data</th>
|
||||||
<th class="dataset-field-content__header">
|
<th class="dataset-field-content__header">
|
||||||
<span class="dataset-field-value">Is this type of member data contained in this dataset?</span>
|
<span class="dataset-field-value">Is this type of member data contained in this dataset?</span>
|
||||||
</th>
|
</th>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user