mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 11:49:23 +00:00
Merge pull request #1397 from cptran777/advanced-compliance-edit-fix
Various Small UI Fixes
This commit is contained in:
commit
18079547be
@ -95,6 +95,8 @@ public class Application extends Controller {
|
||||
Play.application().configuration().getString("links.wiki.exportPolicy", "");
|
||||
private static final String WHZ_WIKI_LINKS__METADATA_HEALTH =
|
||||
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_LINKS__JIT_ACL_CONTACT =
|
||||
Play.application().configuration().getString("links.jitAcl.contact", "");
|
||||
@ -269,6 +271,7 @@ public class Application extends Controller {
|
||||
wikiLinks.put("metadataCustomRegex", WHZ_WIKI_LINKS__METADATA_CUSTOM_REGEX);
|
||||
wikiLinks.put("exportPolicy", WHZ_WIKI_LINKS__EXPORT_POLICY);
|
||||
wikiLinks.put("metadataHealth", WHZ_WIKI_LINKS__METADATA_HEALTH);
|
||||
wikiLinks.put("purgeKey", WHZ_WIKI_LINKS__PURGE_KEY);
|
||||
|
||||
return wikiLinks;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ enum Classification {
|
||||
Confidential = 'CONFIDENTIAL',
|
||||
LimitedDistribution = 'LIMITED_DISTRIBUTION',
|
||||
HighlyConfidential = 'HIGHLY_CONFIDENTIAL',
|
||||
Internal = 'INTERNAL',
|
||||
Internal = 'GENERAL',
|
||||
Public = 'PUBLIC'
|
||||
}
|
||||
|
||||
|
||||
@ -135,7 +135,6 @@
|
||||
|
||||
&__guided-modal {
|
||||
@include nacho-container;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
z-index: z(modal);
|
||||
|
||||
@ -32,6 +32,10 @@
|
||||
background-color: transparent;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
|
||||
&::placeholder {
|
||||
color: get-color(white, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
&__button {
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
</button>
|
||||
{{/track-ui-event}}
|
||||
|
||||
{{#if (and isInitialEditStep (and manualParseError (not showGuidedComplianceEditMode)))}}
|
||||
{{#if (and (eq editTarget ComplianceEdit.CompliancePolicy) (and manualParseError (not showGuidedComplianceEditMode)))}}
|
||||
<div class="action-bar__content__error-messages">
|
||||
{{fa-icon "times-circle-o"}}
|
||||
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
<h3>Metadata Health</h3>
|
||||
{{datasets/health/metrics-charts
|
||||
isActiveTab=isActiveTab
|
||||
categoryData=renderedCategories
|
||||
severityData=renderedSeverity
|
||||
onCategorySelect=(action onFilterSelect "category")
|
||||
onSeveritySelect=(action onFilterSelect "severity")}}
|
||||
{{#unless tableData.length}}
|
||||
{{datasets/health/metrics-charts
|
||||
isActiveTab=isActiveTab
|
||||
categoryData=renderedCategories
|
||||
severityData=renderedSeverity
|
||||
onCategorySelect=(action onFilterSelect "category")
|
||||
onSeveritySelect=(action onFilterSelect "severity")}}
|
||||
{{/unless}}
|
||||
{{datasets/health/score-table
|
||||
tableData=tableData
|
||||
currentCategoryFilter=currentCategoryFilter
|
||||
|
||||
@ -1,148 +0,0 @@
|
||||
<section class="metadata-prompt">
|
||||
<header class="metadata-prompt__header">
|
||||
<p>
|
||||
{{if isEditing
|
||||
"Does this dataset contain the following types of data?"
|
||||
"Types of data contained in this dataset"}}
|
||||
|
||||
|
||||
{{more-info
|
||||
link=@wikiLinks.gdprTaxonomy
|
||||
tooltip="Click for more information on Dataset classification with examples"
|
||||
}}
|
||||
</p>
|
||||
|
||||
{{#unless isEditing}}
|
||||
<div class="compliance-entities-meta__secondary">
|
||||
<button
|
||||
class="nacho-button nacho-button--tertiary"
|
||||
onclick={{action toggleEditing true ComplianceEdit.DatasetLevelPolicy}}>
|
||||
|
||||
<i class="fa fa-pencil" aria-label="Edit Compliance Policy"></i>
|
||||
|
||||
Edit
|
||||
</button>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
{{#if isEditing}}
|
||||
<button
|
||||
{{action "markDatasetAsNotContainingMemberData"}}
|
||||
class="nacho-button--large nacho-button--secondary mark-dataset-no-button">
|
||||
Mark all as No
|
||||
</button>
|
||||
{{/if}}
|
||||
</header>
|
||||
</section>
|
||||
|
||||
{{#dataset-table
|
||||
class="nacho-table nacho-table--bordered nacho-table--stripped"
|
||||
fields=datasetClassification as |table|}}
|
||||
|
||||
{{#table.head as |head|}}
|
||||
{{#head.column}}Types of data{{/head.column}}
|
||||
|
||||
{{#head.column class="dataset-field-content__header"}}
|
||||
<span class="dataset-field-value">Is this type of data contained in this dataset?</span>
|
||||
{{/head.column}}
|
||||
{{/table.head}}
|
||||
|
||||
{{#table.body as |body|}}
|
||||
{{#each (if shouldShowAllMemberData table.data (filter-by "value" true table.data)) as |classification|}}
|
||||
{{#body.row as |row|}}
|
||||
{{#row.cell class="dataset-field-content__prompt"}}
|
||||
<span class="dataset-tag-container">
|
||||
{{#if (eq classification.value true)}}
|
||||
|
||||
<i class="dataset-classification-indicator dataset-classification-indicator--tagged"
|
||||
title="{{classification.label}} is in dataset">
|
||||
<svg viewBox="0 0 24 24" width="24px" height="24px" x="0" y="0" preserveAspectRatio="xMinYMin meet">
|
||||
<g class="large-icon" style="fill: currentColor">
|
||||
<path
|
||||
d="M19.68,4L9,17.7,4.36,12,3,13.06l5.42,6.67A0.72,0.72,0,0,0,9,20a0.7,0.7,0,0,0,.59-0.28L21,5.05Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</i>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq classification.value false)}}
|
||||
<i class="dataset-classification-indicator dataset-classification-indicator--not-tagged"
|
||||
title="{{classification.label}} is not in dataset">
|
||||
<svg viewBox="0 0 24 24" width="24px" height="24px" x="0" y="0" preserveAspectRatio="xMinYMin meet">
|
||||
<g class="large-icon" style="fill: currentColor">
|
||||
<path
|
||||
d="M20,5.32L13.32,12,20,18.68,18.66,20,12,13.33,5.34,20,4,18.68,10.68,12,4,5.32,5.32,4,12,10.69,18.68,4Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</i>
|
||||
{{/if}}
|
||||
|
||||
{{classification.label}}
|
||||
</span>
|
||||
{{/row.cell}}
|
||||
|
||||
{{#row.cell class="dataset-field-content__input"}}
|
||||
<span class="dataset-field-value">
|
||||
{{#radio-button-composer
|
||||
value=true
|
||||
name=classification.classifier
|
||||
groupValue=(readonly classification.value)
|
||||
changed=(action "onChangeDatasetClassification" classification.classifier)}}
|
||||
Yes
|
||||
{{/radio-button-composer}}
|
||||
{{#radio-button-composer
|
||||
value=false
|
||||
name=classification.classifier
|
||||
groupValue=(readonly classification.value)
|
||||
changed=(action "onChangeDatasetClassification" classification.classifier)}}
|
||||
No
|
||||
{{/radio-button-composer}}
|
||||
</span>{{/row.cell}}
|
||||
{{/body.row}}
|
||||
{{else}}
|
||||
|
||||
<tr class="dataset-field-content__empty">
|
||||
<td colspan="2">
|
||||
<div>
|
||||
<header>
|
||||
<strong>
|
||||
None selected
|
||||
</strong>
|
||||
</header>
|
||||
|
||||
{{#if (and excludesSomeMemberData (not isEditing))}}
|
||||
<p>
|
||||
Click 'See More' below to view all available types of data
|
||||
</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{/each}}
|
||||
{{/table.body}}
|
||||
|
||||
{{#if (and excludesSomeMemberData (not isEditing))}}
|
||||
|
||||
{{#table.foot}}
|
||||
<td colspan="2" class="text-center">
|
||||
<button
|
||||
{{action "onShowAllDatasetMemberData"}}
|
||||
class="nacho-button--large nacho-button--tertiary">
|
||||
{{#if shouldShowAllMemberData}}
|
||||
|
||||
See Less <span class="fa fa-caret-up" aria-label="See Less Types of Data"></span>
|
||||
|
||||
{{else}}
|
||||
|
||||
See More <span class="fa fa-caret-down" aria-label="See More Types of Data"></span>
|
||||
|
||||
{{/if}}
|
||||
</button>
|
||||
</td>
|
||||
{{/table.foot}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/dataset-table}}
|
||||
@ -360,6 +360,10 @@
|
||||
<section class="dataset-compliance-fields__compliance-info-column">
|
||||
<header class="dataset-compliance-fields__compliance-info-column__title">
|
||||
<strong>Is purge key?</strong>
|
||||
{{more-info
|
||||
link=@wikiLinks.purgeKey
|
||||
tooltip="Click for more information about purge keys"
|
||||
}}
|
||||
</header>
|
||||
|
||||
<div class="dataset-compliance-fields__compliance-info-column__content">
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
{{#each editSteps as |step index|}}
|
||||
<span class="dataset-compliance-step dataset-compliance-step--{{if (gt editStepIndex index) "complete" "incomplete"}}">
|
||||
{{inc index}}
|
||||
</span>
|
||||
{{/each}}
|
||||
@ -30,6 +30,7 @@ import { getDatasetCount } from 'wherehows-web/mirage/helpers/dataset-count';
|
||||
import { getDatasetDownstreams } from 'wherehows-web/mirage/helpers/dataset-downstreams';
|
||||
import { getBrowsePlatforms } from 'wherehows-web/mirage/helpers/browse-platforms';
|
||||
import { getSearchResults } from 'wherehows-web/mirage/helpers/search';
|
||||
import { getDatasetExportPolicy } from 'wherehows-web/mirage/helpers/export-policy';
|
||||
|
||||
export default function(this: IMirageServer) {
|
||||
this.get('/config', getConfig);
|
||||
@ -64,6 +65,8 @@ export default function(this: IMirageServer) {
|
||||
|
||||
this.get('/datasets/:dataset_id/compliance', getDatasetCompliance);
|
||||
|
||||
this.get('/datasets/:dataset_id/exportpolicy', getDatasetExportPolicy);
|
||||
|
||||
this.get('/datasets/:dataset_id/fabrics', getDatasetFabrics);
|
||||
|
||||
this.get('/datasets/:dataset_id/health', getDatasetHealth);
|
||||
|
||||
17
wherehows-web/mirage/factories/export-policy.ts
Normal file
17
wherehows-web/mirage/factories/export-policy.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { Factory } from 'ember-cli-mirage';
|
||||
|
||||
const randomize = () => Math.random() < 0.5;
|
||||
|
||||
export default Factory.extend({
|
||||
containsUserActionGeneratedContent() {
|
||||
return this.randomized ? randomize() : false;
|
||||
},
|
||||
|
||||
containsUserDerivedContent() {
|
||||
return this.randomized ? randomize() : false;
|
||||
},
|
||||
|
||||
containsUserGeneratedContent() {
|
||||
return this.randomized ? randomize() : false;
|
||||
}
|
||||
});
|
||||
1
wherehows-web/mirage/helpers/export-policy.ts
Normal file
1
wherehows-web/mirage/helpers/export-policy.ts
Normal file
@ -0,0 +1 @@
|
||||
export const getDatasetExportPolicy = ({ exportPolicies }: { exportPolicies: any }) => exportPolicies.first();
|
||||
3
wherehows-web/mirage/models/export-policy.ts
Normal file
3
wherehows-web/mirage/models/export-policy.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { Model } from 'ember-cli-mirage';
|
||||
|
||||
export default Model.extend({});
|
||||
@ -14,6 +14,7 @@ export default function(server: IMirageServer) {
|
||||
server.loadFixtures(...fixtures);
|
||||
server.create('config');
|
||||
server.create('datasetsCount');
|
||||
server.create('exportPolicy', { randomized: true });
|
||||
server.createList('owner', 6);
|
||||
server.createList('dataset', 10);
|
||||
server.createList('datasetView', 2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user