mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-26 00:14:53 +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({ | export default class DatasetComplianceRollupRow extends Component.extend({ | ||||||
|   tagName: '' |   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 |    * References the parent external action to add a tag to the list of change sets | ||||||
|    * @memberof DatasetComplianceRollupRow |    * @memberof DatasetComplianceRollupRow | ||||||
| @ -247,6 +252,15 @@ export default class DatasetComplianceRollupRow extends Component.extend({ | |||||||
|     return false; |     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 |    * Toggles the expansion / collapse of the row expansion flag | ||||||
|    * @memberof DatasetComplianceRollupRow |    * @memberof DatasetComplianceRollupRow | ||||||
|  | |||||||
| @ -137,6 +137,12 @@ export default class DatasetCompliance extends Component { | |||||||
|    */ |    */ | ||||||
|   notifications: ComputedProperty<Notifications> = inject(); |   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 |    * Flag indicating that the related dataset is schemaless or has a schema | ||||||
|    * @type {boolean} |    * @type {boolean} | ||||||
| @ -941,6 +947,13 @@ export default class DatasetCompliance extends Component { | |||||||
|       this.updateStep(initialStepIndex); |       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 |      * Adds a new field tag to the list of compliance change set items | ||||||
|      * @param {IComplianceChangeSet} tag properties for new field tag |      * @param {IComplianceChangeSet} tag properties for new field tag | ||||||
|  | |||||||
| @ -195,6 +195,10 @@ const tagNeedsReview = (complianceDataTypes: Array<IComplianceDataType>) => | |||||||
|       return false; |       return false; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     if (!identifierType) { | ||||||
|  |       return true; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     // Check that suggestion exists and the identifierType does not match the change set item
 |     // Check that suggestion exists and the identifierType does not match the change set item
 | ||||||
|     if (suggestion && suggestion.identifierType !== identifierType) { |     if (suggestion && suggestion.identifierType !== identifierType) { | ||||||
|       isReviewRequired = isReviewRequired || !suggestionAuthority; |       isReviewRequired = isReviewRequired || !suggestionAuthority; | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ | |||||||
|           isReviewRequested=isReviewRequested |           isReviewRequested=isReviewRequested | ||||||
|           suggestionResolution=suggestionResolution |           suggestionResolution=suggestionResolution | ||||||
|           suggestionMatchesCurrentValue=suggestionMatchesCurrentValue |           suggestionMatchesCurrentValue=suggestionMatchesCurrentValue | ||||||
|  |           onFragmentDblClick=(action "onFragmentDblClick") | ||||||
|           onSuggestionClick=(action "onSuggestionClick") |           onSuggestionClick=(action "onSuggestionClick") | ||||||
|           onToggleRowExpansion=(action "onToggleRowExpansion") |           onToggleRowExpansion=(action "onToggleRowExpansion") | ||||||
|           onAddFieldTag=(action "onAddFieldTag") |           onAddFieldTag=(action "onAddFieldTag") | ||||||
|  | |||||||
| @ -75,12 +75,13 @@ | |||||||
|           field=field |           field=field | ||||||
|           isNewComplianceInfo=isNewComplianceInfo |           isNewComplianceInfo=isNewComplianceInfo | ||||||
|           complianceDataTypes=complianceDataTypes |           complianceDataTypes=complianceDataTypes | ||||||
|  |           onFieldDblClick=(action "onFieldDblClick") | ||||||
|           onFieldTagAdded=(action "onFieldTagAdded") |           onFieldTagAdded=(action "onFieldTagAdded") | ||||||
|           onFieldTagRemoved=(action "onFieldTagRemoved") |           onFieldTagRemoved=(action "onFieldTagRemoved") | ||||||
|           onTagIdentifierTypeChange=(action "tagIdentifierChanged") |           onTagIdentifierTypeChange=(action "tagIdentifierChanged") | ||||||
|           onSuggestionIntent=(action "onFieldSuggestionIntentChange") as |row| |           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}} |             {{#row.cell}} | ||||||
|               {{#if row.isReadonly}} |               {{#if row.isReadonly}} | ||||||
| 
 | 
 | ||||||
| @ -147,12 +148,12 @@ | |||||||
|                 <div> |                 <div> | ||||||
|                   <div title="{{row.identifierField}}"> |                   <div title="{{row.identifierField}}"> | ||||||
|                     <strong> |                     <strong> | ||||||
|                       {{split-text row.identifierField 23}} |                       {{if isShowingFullFieldNames row.identifierField (split-text row.identifierField 23)}} | ||||||
|                     </strong> |                     </strong> | ||||||
|                   </div> |                   </div> | ||||||
| 
 | 
 | ||||||
|                   <div title="{{row.dataType}}"> |                   <div title="{{row.dataType}}"> | ||||||
|                     {{split-text row.dataType 23}} |                     {{if isShowingFullFieldNames row.dataType (split-text row.dataType 23)}} | ||||||
|                   </div> |                   </div> | ||||||
|                 </div> |                 </div> | ||||||
|               </div> |               </div> | ||||||
|  | |||||||
| @ -17,15 +17,23 @@ const mockFieldChangeSets = [ | |||||||
|     isDirty: true, |     isDirty: true, | ||||||
|     privacyPolicyExists: false, |     privacyPolicyExists: false, | ||||||
|     suggestionAuthority: true, |     suggestionAuthority: true, | ||||||
|     __requiresReview__: false, |     __requiresReview__: true, | ||||||
|     __msg__: 'NO suggestion, and policy does NOT exist and user has made changes to local working copy' |     __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, |     isDirty: false, | ||||||
|     privacyPolicyExists: false, |     privacyPolicyExists: false, | ||||||
|     suggestionAuthority: true, |     suggestionAuthority: true, | ||||||
|     __requiresReview__: 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, |     isDirty: true, | ||||||
| @ -34,7 +42,7 @@ const mockFieldChangeSets = [ | |||||||
|     suggestion, |     suggestion, | ||||||
|     identifierType: 'same', |     identifierType: 'same', | ||||||
|     __requiresReview__: false, |     __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
	 Seyi Adebajo
						Seyi Adebajo