mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-29 19:46:00 +00:00
Merge pull request #1110 from theseyi/multi-tagging-updates
5456 marks fields without a selected identifier type as needs review
This commit is contained in:
commit
70060f9643
@ -27,6 +27,11 @@ import { IComplianceEntity } from 'wherehows-web/typings/api/datasets/compliance
|
||||
export default class DatasetComplianceRollupRow extends Component.extend({
|
||||
tagName: ''
|
||||
}) {
|
||||
/**
|
||||
* References the parent external action to handle double click events on the field name
|
||||
* @memberof DatasetComplianceRollupRow
|
||||
*/
|
||||
onFieldDblClick: () => void;
|
||||
/**
|
||||
* References the parent external action to add a tag to the list of change sets
|
||||
* @memberof DatasetComplianceRollupRow
|
||||
@ -247,6 +252,15 @@ export default class DatasetComplianceRollupRow extends Component.extend({
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Mouse double click event handler invokes parent action
|
||||
* @memberof DatasetComplianceRollupRow
|
||||
*/
|
||||
@action
|
||||
onFragmentDblClick() {
|
||||
get(this, 'onFieldDblClick')();
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the expansion / collapse of the row expansion flag
|
||||
* @memberof DatasetComplianceRollupRow
|
||||
|
@ -137,6 +137,12 @@ export default class DatasetCompliance extends Component {
|
||||
*/
|
||||
notifications: ComputedProperty<Notifications> = inject();
|
||||
|
||||
/**
|
||||
* Flag indicating that the field names in each compliance row is truncated or rendered in full
|
||||
* @type {boolean}
|
||||
*/
|
||||
isShowingFullFieldNames = true;
|
||||
|
||||
/**
|
||||
* Flag indicating that the related dataset is schemaless or has a schema
|
||||
* @type {boolean}
|
||||
@ -941,6 +947,13 @@ export default class DatasetCompliance extends Component {
|
||||
this.updateStep(initialStepIndex);
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggles the flag isShowingFullFieldNames when invoked
|
||||
*/
|
||||
onFieldDblClick() {
|
||||
this.toggleProperty('isShowingFullFieldNames');
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a new field tag to the list of compliance change set items
|
||||
* @param {IComplianceChangeSet} tag properties for new field tag
|
||||
|
@ -195,6 +195,10 @@ const tagNeedsReview = (complianceDataTypes: Array<IComplianceDataType>) =>
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!identifierType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check that suggestion exists and the identifierType does not match the change set item
|
||||
if (suggestion && suggestion.identifierType !== identifierType) {
|
||||
isReviewRequired = isReviewRequired || !suggestionAuthority;
|
||||
|
@ -15,6 +15,7 @@
|
||||
isReviewRequested=isReviewRequested
|
||||
suggestionResolution=suggestionResolution
|
||||
suggestionMatchesCurrentValue=suggestionMatchesCurrentValue
|
||||
onFragmentDblClick=(action "onFragmentDblClick")
|
||||
onSuggestionClick=(action "onSuggestionClick")
|
||||
onToggleRowExpansion=(action "onToggleRowExpansion")
|
||||
onAddFieldTag=(action "onAddFieldTag")
|
||||
|
@ -75,12 +75,13 @@
|
||||
field=field
|
||||
isNewComplianceInfo=isNewComplianceInfo
|
||||
complianceDataTypes=complianceDataTypes
|
||||
onFieldDblClick=(action "onFieldDblClick")
|
||||
onFieldTagAdded=(action "onFieldTagAdded")
|
||||
onFieldTagRemoved=(action "onFieldTagRemoved")
|
||||
onTagIdentifierTypeChange=(action "tagIdentifierChanged")
|
||||
onSuggestionIntent=(action "onFieldSuggestionIntentChange") as |row|
|
||||
}}
|
||||
<tr class="{{if row.isReadonly 'dataset-compliance-fields--readonly'}}">
|
||||
<tr class="{{if row.isReadonly 'dataset-compliance-fields--readonly'}}" ondblclick={{action row.onFragmentDblClick}}>
|
||||
{{#row.cell}}
|
||||
{{#if row.isReadonly}}
|
||||
|
||||
@ -147,12 +148,12 @@
|
||||
<div>
|
||||
<div title="{{row.identifierField}}">
|
||||
<strong>
|
||||
{{split-text row.identifierField 23}}
|
||||
{{if isShowingFullFieldNames row.identifierField (split-text row.identifierField 23)}}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div title="{{row.dataType}}">
|
||||
{{split-text row.dataType 23}}
|
||||
{{if isShowingFullFieldNames row.dataType (split-text row.dataType 23)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,15 +17,23 @@ const mockFieldChangeSets = [
|
||||
isDirty: true,
|
||||
privacyPolicyExists: false,
|
||||
suggestionAuthority: true,
|
||||
__requiresReview__: false,
|
||||
__msg__: 'NO suggestion, and policy does NOT exist and user has made changes to local working copy'
|
||||
__requiresReview__: true,
|
||||
__msg__:
|
||||
'No suggestion, and policy does NOT exist and user has made changes to local working copy, but no identifierType'
|
||||
},
|
||||
{
|
||||
isDirty: false,
|
||||
privacyPolicyExists: false,
|
||||
suggestionAuthority: false,
|
||||
__requiresReview__: true,
|
||||
__msg__: 'No identifierType present'
|
||||
},
|
||||
{
|
||||
isDirty: false,
|
||||
privacyPolicyExists: false,
|
||||
suggestionAuthority: true,
|
||||
__requiresReview__: true,
|
||||
__msg__: 'NO suggestion, and policy does NOT exist but user has NOT made changes to local working copy'
|
||||
__msg__: 'No suggestion, and policy does NOT exist but user has NOT made changes to local working copy'
|
||||
},
|
||||
{
|
||||
isDirty: true,
|
||||
@ -34,7 +42,7 @@ const mockFieldChangeSets = [
|
||||
suggestion,
|
||||
identifierType: 'same',
|
||||
__requiresReview__: false,
|
||||
__msg__: 'NO suggestion, and policy does NOT exist but user has NOT made changes to local working copy'
|
||||
__msg__: 'Suggestion exists, and policy does NOT exist but user has made changes to local working copy'
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user