diff --git a/wherehows-frontend/app/controllers/Application.java b/wherehows-frontend/app/controllers/Application.java index c56dd7160b..213c9e8521 100644 --- a/wherehows-frontend/app/controllers/Application.java +++ b/wherehows-frontend/app/controllers/Application.java @@ -97,6 +97,8 @@ public class Application extends Controller { Play.application().configuration().getString("links.wiki.metadataHealth", ""); private static final String WHZ_WIKI_LINKS__PURGE_KEY = Play.application().configuration().getString("links.wiki.purgeKey", ""); + private static final String WHZ_WIKI_LINKS__DATASET_DECOMMISSION = + Play.application().configuration().getString("links.wiki.datasetDecommission"); private static final String WHZ_LINKS__JIT_ACL_CONTACT = Play.application().configuration().getString("links.jitAcl.contact", ""); @@ -272,6 +274,7 @@ public class Application extends Controller { wikiLinks.put("exportPolicy", WHZ_WIKI_LINKS__EXPORT_POLICY); wikiLinks.put("metadataHealth", WHZ_WIKI_LINKS__METADATA_HEALTH); wikiLinks.put("purgeKey", WHZ_WIKI_LINKS__PURGE_KEY); + wikiLinks.put("datasetDecommission", WHZ_WIKI_LINKS__DATASET_DECOMMISSION); return wikiLinks; } diff --git a/wherehows-web/app/components/dataset-deprecation.ts b/wherehows-web/app/components/dataset-deprecation.ts index e8cc85070e..2629d567ca 100644 --- a/wherehows-web/app/components/dataset-deprecation.ts +++ b/wherehows-web/app/components/dataset-deprecation.ts @@ -66,6 +66,14 @@ export default class DatasetDeprecation extends Component { */ deprecationNoteAlias: ComputedProperty = oneWay('deprecationNote'); + /** + * Before a user can update the deprecation status to deprecated, they must acknowledge that even if the + * dataset is deprecated they must still keep it compliant. + * @memberof DatasetDeprecation + * @type {boolean} + */ + isDeprecationNoticeAcknowledged: boolean = false; + /** * Checks the working / aliased copies of the deprecation properties diverge from the * saved versions i.e. deprecationNoteAlias and deprecationAlias @@ -124,6 +132,15 @@ export default class DatasetDeprecation extends Component { set(this, 'decommissionTime', new Date(decommissionTime).getTime()); } + /** + * When a user clicks the checkbox to acknowledge or cancel acknowledgement of the notice for + * deprecating a dataset + */ + @action + onAcknowledgeDeprecationNotice(this: DatasetDeprecation) { + this.toggleProperty('isDeprecationNoticeAcknowledged'); + } + /** * Invokes the save action with the updated values for * deprecated decommissionTime, and deprecationNote diff --git a/wherehows-web/app/styles/base/_checkbox.scss b/wherehows-web/app/styles/base/_checkbox.scss index 2d9fa5f2ec..eff0d012e5 100644 --- a/wherehows-web/app/styles/base/_checkbox.scss +++ b/wherehows-web/app/styles/base/_checkbox.scss @@ -58,3 +58,22 @@ input[type='checkbox'] { } } } + +input[type='checkbox'] + label.checkbox-input__wrapper { + $checkbox-width: 28px; + $container-margin: item-spacing(4); + display: flex; + padding: item-spacing(2) $container-margin item-spacing(2) ($container-margin + $checkbox-width); + box-sizing: content-box; + margin: 0 (-1 * $container-margin); + + &:hover { + background-color: rgba(0, 0, 0, 0.05); + } + + &:before, + &:after { + left: $container-margin; + top: item-spacing(2) - 1; + } +} diff --git a/wherehows-web/app/styles/components/search/_facet.scss b/wherehows-web/app/styles/components/search/_facet.scss index 20edb511b1..540c740203 100644 --- a/wherehows-web/app/styles/components/search/_facet.scss +++ b/wherehows-web/app/styles/components/search/_facet.scss @@ -29,22 +29,3 @@ color: rgba(0, 0, 0, 0.6); } } - -input[type='checkbox'] + label.search-facet__checkbox-wrapper { - $checkbox-width: 28px; - $container-margin: item-spacing(4); - display: flex; - padding: item-spacing(2) $container-margin item-spacing(2) ($container-margin + $checkbox-width); - box-sizing: content-box; - margin: 0 (-1 * $container-margin); - - &:hover { - background-color: rgba(0, 0, 0, 0.05); - } - - &:before, - &:after { - left: $container-margin; - top: item-spacing(2) - 1; - } -} diff --git a/wherehows-web/app/templates/components/dataset-deprecation.hbs b/wherehows-web/app/templates/components/dataset-deprecation.hbs index 5dc0583e49..9e92478613 100644 --- a/wherehows-web/app/templates/components/dataset-deprecation.hbs +++ b/wherehows-web/app/templates/components/dataset-deprecation.hbs @@ -82,13 +82,33 @@

+ + {{input + type="checkbox" + name="deprecated.acknowledge" + id="acknowledge-deprecation" + checked=(readonly isDeprecationAcknowledged) + change=(action "onAcknowledgeDeprecationNotice")}} + + + + + {{/if}}
diff --git a/wherehows-web/app/templates/components/datasets/containers/dataset-properties.hbs b/wherehows-web/app/templates/components/datasets/containers/dataset-properties.hbs index e4710eb1c7..58447edc24 100644 --- a/wherehows-web/app/templates/components/datasets/containers/dataset-properties.hbs +++ b/wherehows-web/app/templates/components/datasets/containers/dataset-properties.hbs @@ -2,6 +2,7 @@ deprecated=deprecated deprecationNote=deprecationNote decommissionTime=decommissionTime + wikiLinks=wikiLinks onUpdateDeprecation=(action "updateDeprecation") }} diff --git a/wherehows-web/app/templates/components/search/search-facet.hbs b/wherehows-web/app/templates/components/search/search-facet.hbs index 7990f40c78..9cab3158e8 100644 --- a/wherehows-web/app/templates/components/search/search-facet.hbs +++ b/wherehows-web/app/templates/components/search/search-facet.hbs @@ -21,7 +21,7 @@ checked=(readonly checked) change=(action onChange facet facetValue) }} -