mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-29 22:54:15 +00:00
updated the included value validation and excluded to be optional
This commit is contained in:
@@ -687,13 +687,6 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
this.setState({ isComputedPropertiesDirty: isComputedPropertiesDirty });
|
this.setState({ isComputedPropertiesDirty: isComputedPropertiesDirty });
|
||||||
|
|
||||||
private onDataMaskingContentChange = (newDataMasking: DataModels.DataMaskingPolicy): void => {
|
private onDataMaskingContentChange = (newDataMasking: DataModels.DataMaskingPolicy): void => {
|
||||||
if (!newDataMasking.excludedPaths) {
|
|
||||||
newDataMasking.excludedPaths = [];
|
|
||||||
}
|
|
||||||
if (!newDataMasking.includedPaths) {
|
|
||||||
newDataMasking.includedPaths = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const validationErrors = [];
|
const validationErrors = [];
|
||||||
if (newDataMasking.includedPaths === undefined || newDataMasking.includedPaths === null) {
|
if (newDataMasking.includedPaths === undefined || newDataMasking.includedPaths === null) {
|
||||||
validationErrors.push("includedPaths is required");
|
validationErrors.push("includedPaths is required");
|
||||||
|
|||||||
@@ -22,14 +22,7 @@ interface DataMaskingComponentState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const emptyDataMaskingPolicy: DataModels.DataMaskingPolicy = {
|
const emptyDataMaskingPolicy: DataModels.DataMaskingPolicy = {
|
||||||
includedPaths: [
|
includedPaths: [],
|
||||||
{
|
|
||||||
path: "/",
|
|
||||||
strategy: "Default",
|
|
||||||
startPosition: 0,
|
|
||||||
length: -1,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
excludedPaths: [],
|
excludedPaths: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user