mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-02 13:53:06 +00:00
removes tab indicator (red-dot) for compliance annotation suggestions
This commit is contained in:
parent
05a1b6eb0a
commit
a05dd208ec
@ -40,8 +40,7 @@ import {
|
||||
tagSuggestionNeedsReview,
|
||||
ComplianceEdit
|
||||
} from 'wherehows-web/constants';
|
||||
import { getTagsSuggestions } from 'wherehows-web/utils/datasets/compliance-suggestions';
|
||||
import { arrayFilter, arrayMap, compact, isListUnique, iterateArrayAsync } from 'wherehows-web/utils/array';
|
||||
import { arrayFilter, arrayMap, isListUnique, iterateArrayAsync } from 'wherehows-web/utils/array';
|
||||
import { identity, noop } from 'wherehows-web/utils/helpers/functions';
|
||||
import { IComplianceDataType } from 'wherehows-web/typings/api/list/compliance-datatypes';
|
||||
import Notifications, { NotificationEvent } from 'wherehows-web/services/notifications';
|
||||
@ -237,7 +236,7 @@ export default class DatasetCompliance extends Component {
|
||||
* External action to handle manual compliance entity metadata entry
|
||||
*/
|
||||
onComplianceJsonUpdate: (jsonString: string) => Promise<void>;
|
||||
notifyOnChangeSetSuggestions: (hasSuggestions: boolean) => void;
|
||||
|
||||
notifyOnChangeSetRequiresReview: (hasChangeSetDrift: boolean) => void;
|
||||
|
||||
classNames = ['compliance-container'];
|
||||
@ -779,7 +778,6 @@ export default class DatasetCompliance extends Component {
|
||||
const suggestionThreshold = get(this, 'suggestionConfidenceThreshold');
|
||||
|
||||
// pass current changeSet state to parent handlers
|
||||
run(() => next(this, 'notifyHandlerOfSuggestions', suggestionThreshold, changeSet));
|
||||
run(() =>
|
||||
next(
|
||||
this,
|
||||
@ -936,19 +934,6 @@ export default class DatasetCompliance extends Component {
|
||||
});
|
||||
}).drop();
|
||||
|
||||
/**
|
||||
* Invokes external action with flag indicating that at least 1 suggestion exists for a field in the changeSet
|
||||
* @param {number} suggestionConfidenceThreshold confidence threshold for filtering out higher quality suggestions
|
||||
* @param {Array<IComplianceChangeSet>} changeSet
|
||||
*/
|
||||
notifyHandlerOfSuggestions = (
|
||||
suggestionConfidenceThreshold: number,
|
||||
changeSet: Array<IComplianceChangeSet>
|
||||
): void => {
|
||||
const hasChangeSetSuggestions = !!compact(getTagsSuggestions({ suggestionConfidenceThreshold })(changeSet)).length;
|
||||
this.notifyOnChangeSetSuggestions(hasChangeSetSuggestions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Invokes external action with flag indicating that a field in the tags requires user review
|
||||
* @param {number} suggestionConfidenceThreshold confidence threshold for filtering out higher quality suggestions
|
||||
|
@ -62,11 +62,6 @@ type BatchContainerDataResult = Pick<
|
||||
const { successUpdating, failedUpdating, successUploading, invalidPolicyData } = compliancePolicyStrings;
|
||||
|
||||
export default class DatasetComplianceContainer extends Component {
|
||||
/**
|
||||
* External action on parent
|
||||
*/
|
||||
setOnChangeSetChange: (hasSuggestions: boolean) => void;
|
||||
|
||||
/**
|
||||
* External action to capture changes to dataset pii status
|
||||
*/
|
||||
@ -325,15 +320,6 @@ export default class DatasetComplianceContainer extends Component {
|
||||
get(this, 'getComplianceTask').perform();
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes external action if field suggestions change
|
||||
* @param {boolean} hasSuggestions
|
||||
*/
|
||||
@action
|
||||
onSuggestionsChanged(hasSuggestions: boolean) {
|
||||
this.setOnChangeSetChange(hasSuggestions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes external action if compliance info is new or otherwise
|
||||
* @param {boolean} isNewComplianceInfo flag indicating the policy does not exist remotely
|
||||
|
@ -46,13 +46,6 @@ export default class DatasetController extends Controller {
|
||||
*/
|
||||
isNewComplianceInfo: boolean;
|
||||
|
||||
/**
|
||||
* Flag indicating is there are suggestions that have not been accepted or ignored
|
||||
* @type {boolean}
|
||||
* @memberof DatasetController
|
||||
*/
|
||||
hasSuggestions: boolean;
|
||||
|
||||
/**
|
||||
* Flag indicating there are fields in the compliance policy that have not been updated by a user
|
||||
* @type {boolean}
|
||||
@ -126,11 +119,7 @@ export default class DatasetController extends Controller {
|
||||
* Flag indicating that the compliance policy needs user attention
|
||||
* @type {ComputedProperty<boolean>}
|
||||
*/
|
||||
requiresUserAction: ComputedProperty<boolean> = or(
|
||||
'isNewComplianceInfo',
|
||||
'hasSuggestions',
|
||||
'compliancePolicyHasDrift'
|
||||
);
|
||||
requiresUserAction: ComputedProperty<boolean> = or('isNewComplianceInfo', 'compliancePolicyHasDrift');
|
||||
|
||||
/**
|
||||
* Converts the uri on a model to a usable URN format
|
||||
@ -190,17 +179,6 @@ export default class DatasetController extends Controller {
|
||||
: this.transitionToRoute(`datasets.dataset.${tabSelected}`, get(this, 'encodedUrn'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the hasSuggestions flag if the policy is not from an upstream dataset, otherwise set to false
|
||||
* @param {boolean} hasSuggestions
|
||||
* @memberof DatasetController
|
||||
*/
|
||||
@action
|
||||
setOnChangeSetChange(hasSuggestions: boolean) {
|
||||
const fromUpstream = get(this, 'isPolicyFromUpstream');
|
||||
set(this, 'hasSuggestions', !fromUpstream && hasSuggestions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the isNewComplianceInfo flag if the policy is not from an upstream dataset, otherwise set to false
|
||||
* Also sets the isPolicyFromUpstream attribute
|
||||
@ -227,7 +205,6 @@ export default class DatasetController extends Controller {
|
||||
});
|
||||
|
||||
if (fromUpstream) {
|
||||
this.setOnChangeSetChange(false);
|
||||
this.setOnChangeSetDrift(false);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@
|
||||
schemaFieldNamesMappedToDataTypes=schemaFieldNamesMappedToDataTypes
|
||||
complianceDataTypes=complianceDataTypes
|
||||
notifyOnComplianceSuggestionFeedback=(action "onSuggestionsComplianceFeedback")
|
||||
notifyOnChangeSetSuggestions=(action "onSuggestionsChanged")
|
||||
notifyOnChangeSetRequiresReview=(action "onCompliancePolicyChangeSetDrift")
|
||||
onSave=(action "savePrivacyCompliancePolicy")
|
||||
onReset=(action "resetPrivacyCompliancePolicy")
|
||||
|
@ -154,7 +154,6 @@
|
||||
wikiLinks=wikiLinks
|
||||
datasetName=model.nativeName
|
||||
notifyPiiStatus=(action "onNotifyPiiStatus")
|
||||
setOnChangeSetChange=(action "setOnChangeSetChange")
|
||||
setOnChangeSetDrift=(action "setOnChangeSetDrift")
|
||||
setOnComplianceType=(action "setOnComplianceTypeChange")
|
||||
}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user