mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-30 23:24:16 +00:00
Compare commits
4 Commits
master
...
users/saks
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24ced0c168 | ||
|
|
bcda749c13 | ||
|
|
20e7961341 | ||
|
|
9b2fb0c04e |
@@ -275,8 +275,7 @@ export interface DataMaskingPolicy {
|
|||||||
startPosition: number;
|
startPosition: number;
|
||||||
length: number;
|
length: number;
|
||||||
}>;
|
}>;
|
||||||
excludedPaths: string[];
|
excludedPaths?: string[];
|
||||||
isPolicyEnabled: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MaterializedView {
|
export interface MaterializedView {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ jest.mock("../../../Common/dataAccess/updateCollection", () => ({
|
|||||||
dataMaskingPolicy: {
|
dataMaskingPolicy: {
|
||||||
includedPaths: [],
|
includedPaths: [],
|
||||||
excludedPaths: ["/excludedPath"],
|
excludedPaths: ["/excludedPath"],
|
||||||
isPolicyEnabled: true,
|
|
||||||
},
|
},
|
||||||
indexes: [],
|
indexes: [],
|
||||||
}),
|
}),
|
||||||
@@ -307,12 +306,10 @@ describe("SettingsComponent", () => {
|
|||||||
dataMaskingContent: {
|
dataMaskingContent: {
|
||||||
includedPaths: [],
|
includedPaths: [],
|
||||||
excludedPaths: ["/excludedPath"],
|
excludedPaths: ["/excludedPath"],
|
||||||
isPolicyEnabled: true,
|
|
||||||
},
|
},
|
||||||
dataMaskingContentBaseline: {
|
dataMaskingContentBaseline: {
|
||||||
includedPaths: [],
|
includedPaths: [],
|
||||||
excludedPaths: [],
|
excludedPaths: [],
|
||||||
isPolicyEnabled: false,
|
|
||||||
},
|
},
|
||||||
isDataMaskingDirty: true,
|
isDataMaskingDirty: true,
|
||||||
});
|
});
|
||||||
@@ -326,7 +323,6 @@ describe("SettingsComponent", () => {
|
|||||||
expect(wrapper.state("dataMaskingContentBaseline")).toEqual({
|
expect(wrapper.state("dataMaskingContentBaseline")).toEqual({
|
||||||
includedPaths: [],
|
includedPaths: [],
|
||||||
excludedPaths: ["/excludedPath"],
|
excludedPaths: ["/excludedPath"],
|
||||||
isPolicyEnabled: true,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -340,7 +336,6 @@ describe("SettingsComponent", () => {
|
|||||||
const invalidPolicy: InvalidPolicy = {
|
const invalidPolicy: InvalidPolicy = {
|
||||||
includedPaths: "invalid",
|
includedPaths: "invalid",
|
||||||
excludedPaths: [],
|
excludedPaths: [],
|
||||||
isPolicyEnabled: false,
|
|
||||||
};
|
};
|
||||||
// Use type assertion since we're deliberately testing with invalid data
|
// Use type assertion since we're deliberately testing with invalid data
|
||||||
settingsComponentInstance["onDataMaskingContentChange"](invalidPolicy as unknown as DataModels.DataMaskingPolicy);
|
settingsComponentInstance["onDataMaskingContentChange"](invalidPolicy as unknown as DataModels.DataMaskingPolicy);
|
||||||
@@ -349,7 +344,6 @@ describe("SettingsComponent", () => {
|
|||||||
expect(wrapper.state("dataMaskingContent")).toEqual({
|
expect(wrapper.state("dataMaskingContent")).toEqual({
|
||||||
includedPaths: "invalid",
|
includedPaths: "invalid",
|
||||||
excludedPaths: [],
|
excludedPaths: [],
|
||||||
isPolicyEnabled: false,
|
|
||||||
});
|
});
|
||||||
expect(wrapper.state("dataMaskingValidationErrors")).toEqual(["includedPaths must be an array"]);
|
expect(wrapper.state("dataMaskingValidationErrors")).toEqual(["includedPaths must be an array"]);
|
||||||
|
|
||||||
@@ -364,7 +358,6 @@ describe("SettingsComponent", () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
excludedPaths: ["/excludedPath"],
|
excludedPaths: ["/excludedPath"],
|
||||||
isPolicyEnabled: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsComponentInstance["onDataMaskingContentChange"](validPolicy);
|
settingsComponentInstance["onDataMaskingContentChange"](validPolicy);
|
||||||
@@ -388,7 +381,6 @@ describe("SettingsComponent", () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
excludedPaths: ["/excludedPath1"],
|
excludedPaths: ["/excludedPath1"],
|
||||||
isPolicyEnabled: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const modifiedPolicy = {
|
const modifiedPolicy = {
|
||||||
@@ -401,7 +393,6 @@ describe("SettingsComponent", () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
excludedPaths: ["/excludedPath2"],
|
excludedPaths: ["/excludedPath2"],
|
||||||
isPolicyEnabled: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set initial state
|
// Set initial state
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
import { useIndexingPolicyStore } from "Explorer/Tabs/QueryTab/ResultsView";
|
import { useIndexingPolicyStore } from "Explorer/Tabs/QueryTab/ResultsView";
|
||||||
import { useDatabases } from "Explorer/useDatabases";
|
import { useDatabases } from "Explorer/useDatabases";
|
||||||
import { isFabricNative } from "Platform/Fabric/FabricUtil";
|
import { isFabricNative } from "Platform/Fabric/FabricUtil";
|
||||||
import { isCapabilityEnabled, isVectorSearchEnabled } from "Utils/CapabilityUtils";
|
import { isVectorSearchEnabled } from "Utils/CapabilityUtils";
|
||||||
import { isRunningOnPublicCloud } from "Utils/CloudUtils";
|
import { isRunningOnPublicCloud } from "Utils/CloudUtils";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import DiscardIcon from "../../../../images/discard.svg";
|
import DiscardIcon from "../../../../images/discard.svg";
|
||||||
@@ -70,6 +70,7 @@ import {
|
|||||||
getMongoNotification,
|
getMongoNotification,
|
||||||
getTabTitle,
|
getTabTitle,
|
||||||
hasDatabaseSharedThroughput,
|
hasDatabaseSharedThroughput,
|
||||||
|
isDataMaskingEnabled,
|
||||||
isDirty,
|
isDirty,
|
||||||
parseConflictResolutionMode,
|
parseConflictResolutionMode,
|
||||||
parseConflictResolutionProcedure,
|
parseConflictResolutionProcedure,
|
||||||
@@ -686,22 +687,14 @@ 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 (!Array.isArray(newDataMasking.includedPaths)) {
|
if (newDataMasking.includedPaths === undefined || newDataMasking.includedPaths === null) {
|
||||||
|
validationErrors.push("includedPaths is required");
|
||||||
|
} else if (!Array.isArray(newDataMasking.includedPaths)) {
|
||||||
validationErrors.push("includedPaths must be an array");
|
validationErrors.push("includedPaths must be an array");
|
||||||
}
|
}
|
||||||
if (!Array.isArray(newDataMasking.excludedPaths)) {
|
if (newDataMasking.excludedPaths !== undefined && !Array.isArray(newDataMasking.excludedPaths)) {
|
||||||
validationErrors.push("excludedPaths must be an array");
|
validationErrors.push("excludedPaths must be an array if provided");
|
||||||
}
|
|
||||||
if (typeof newDataMasking.isPolicyEnabled !== "boolean") {
|
|
||||||
validationErrors.push("isPolicyEnabled must be a boolean");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
@@ -842,7 +835,6 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
const dataMaskingContent: DataModels.DataMaskingPolicy = {
|
const dataMaskingContent: DataModels.DataMaskingPolicy = {
|
||||||
includedPaths: this.collection.dataMaskingPolicy?.()?.includedPaths || [],
|
includedPaths: this.collection.dataMaskingPolicy?.()?.includedPaths || [],
|
||||||
excludedPaths: this.collection.dataMaskingPolicy?.()?.excludedPaths || [],
|
excludedPaths: this.collection.dataMaskingPolicy?.()?.excludedPaths || [],
|
||||||
isPolicyEnabled: this.collection.dataMaskingPolicy?.()?.isPolicyEnabled ?? true,
|
|
||||||
};
|
};
|
||||||
const conflictResolutionPolicy: DataModels.ConflictResolutionPolicy =
|
const conflictResolutionPolicy: DataModels.ConflictResolutionPolicy =
|
||||||
this.collection.conflictResolutionPolicy && this.collection.conflictResolutionPolicy();
|
this.collection.conflictResolutionPolicy && this.collection.conflictResolutionPolicy();
|
||||||
@@ -1073,8 +1065,8 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
|
|
||||||
newCollection.fullTextPolicy = this.state.fullTextPolicy;
|
newCollection.fullTextPolicy = this.state.fullTextPolicy;
|
||||||
|
|
||||||
// Only send data masking policy if it was modified (dirty)
|
// Only send data masking policy if it was modified (dirty) and data masking is enabled
|
||||||
if (this.state.isDataMaskingDirty && isCapabilityEnabled(Constants.CapabilityNames.EnableDynamicDataMasking)) {
|
if (this.state.isDataMaskingDirty && isDataMaskingEnabled(this.collection.dataMaskingPolicy?.())) {
|
||||||
newCollection.dataMaskingPolicy = this.state.dataMaskingContent;
|
newCollection.dataMaskingPolicy = this.state.dataMaskingContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1463,15 +1455,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if DDM should be enabled
|
if (isDataMaskingEnabled(this.collection.dataMaskingPolicy?.())) {
|
||||||
const shouldEnableDDM = (): boolean => {
|
|
||||||
const hasDataMaskingCapability = isCapabilityEnabled(Constants.CapabilityNames.EnableDynamicDataMasking);
|
|
||||||
const isSqlAccount = userContext.apiType === "SQL";
|
|
||||||
|
|
||||||
return isSqlAccount && hasDataMaskingCapability; // Only show for SQL accounts with DDM capability
|
|
||||||
};
|
|
||||||
|
|
||||||
if (shouldEnableDDM()) {
|
|
||||||
const dataMaskingComponentProps: DataMaskingComponentProps = {
|
const dataMaskingComponentProps: DataMaskingComponentProps = {
|
||||||
shouldDiscardDataMasking: this.state.shouldDiscardDataMasking,
|
shouldDiscardDataMasking: this.state.shouldDiscardDataMasking,
|
||||||
resetShouldDiscardDataMasking: this.resetShouldDiscardDataMasking,
|
resetShouldDiscardDataMasking: this.resetShouldDiscardDataMasking,
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ describe("DataMaskingComponent", () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
excludedPaths: [],
|
excludedPaths: [],
|
||||||
isPolicyEnabled: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let changeContentCallback: () => void;
|
let changeContentCallback: () => void;
|
||||||
@@ -78,7 +77,7 @@ describe("DataMaskingComponent", () => {
|
|||||||
<DataMaskingComponent
|
<DataMaskingComponent
|
||||||
{...mockProps}
|
{...mockProps}
|
||||||
dataMaskingContent={samplePolicy}
|
dataMaskingContent={samplePolicy}
|
||||||
dataMaskingContentBaseline={{ ...samplePolicy, isPolicyEnabled: true }}
|
dataMaskingContentBaseline={{ ...samplePolicy, excludedPaths: ["/excluded"] }}
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -123,7 +122,7 @@ describe("DataMaskingComponent", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("resets content when shouldDiscardDataMasking is true", async () => {
|
it("resets content when shouldDiscardDataMasking is true", async () => {
|
||||||
const baselinePolicy = { ...samplePolicy, isPolicyEnabled: true };
|
const baselinePolicy = { ...samplePolicy, excludedPaths: ["/excluded"] };
|
||||||
|
|
||||||
const wrapper = mount(
|
const wrapper = mount(
|
||||||
<DataMaskingComponent
|
<DataMaskingComponent
|
||||||
@@ -159,7 +158,7 @@ describe("DataMaskingComponent", () => {
|
|||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|
||||||
// Update baseline to trigger componentDidUpdate
|
// Update baseline to trigger componentDidUpdate
|
||||||
const newBaseline = { ...samplePolicy, isPolicyEnabled: true };
|
const newBaseline = { ...samplePolicy, excludedPaths: ["/excluded"] };
|
||||||
wrapper.setProps({ dataMaskingContentBaseline: newBaseline });
|
wrapper.setProps({ dataMaskingContentBaseline: newBaseline });
|
||||||
|
|
||||||
expect(mockProps.onDataMaskingDirtyChange).toHaveBeenCalledWith(true);
|
expect(mockProps.onDataMaskingDirtyChange).toHaveBeenCalledWith(true);
|
||||||
@@ -174,7 +173,6 @@ describe("DataMaskingComponent", () => {
|
|||||||
const invalidPolicy: Record<string, unknown> = {
|
const invalidPolicy: Record<string, unknown> = {
|
||||||
includedPaths: "not an array",
|
includedPaths: "not an array",
|
||||||
excludedPaths: [] as string[],
|
excludedPaths: [] as string[],
|
||||||
isPolicyEnabled: "not a boolean",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mockGetValue.mockReturnValue(JSON.stringify(invalidPolicy));
|
mockGetValue.mockReturnValue(JSON.stringify(invalidPolicy));
|
||||||
@@ -197,7 +195,7 @@ describe("DataMaskingComponent", () => {
|
|||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|
||||||
// First change
|
// First change
|
||||||
const modifiedPolicy1 = { ...samplePolicy, isPolicyEnabled: true };
|
const modifiedPolicy1 = { ...samplePolicy, excludedPaths: ["/path1"] };
|
||||||
mockGetValue.mockReturnValue(JSON.stringify(modifiedPolicy1));
|
mockGetValue.mockReturnValue(JSON.stringify(modifiedPolicy1));
|
||||||
changeContentCallback();
|
changeContentCallback();
|
||||||
expect(mockProps.onDataMaskingDirtyChange).toHaveBeenCalledWith(true);
|
expect(mockProps.onDataMaskingDirtyChange).toHaveBeenCalledWith(true);
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import { MessageBar, MessageBarType, Stack } from "@fluentui/react";
|
import { MessageBar, MessageBarType, Stack } from "@fluentui/react";
|
||||||
import * as monaco from "monaco-editor";
|
import * as monaco from "monaco-editor";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as Constants from "../../../../Common/Constants";
|
|
||||||
import * as DataModels from "../../../../Contracts/DataModels";
|
import * as DataModels from "../../../../Contracts/DataModels";
|
||||||
import { isCapabilityEnabled } from "../../../../Utils/CapabilityUtils";
|
|
||||||
import { loadMonaco } from "../../../LazyMonaco";
|
import { loadMonaco } from "../../../LazyMonaco";
|
||||||
import { titleAndInputStackProps, unsavedEditorWarningMessage } from "../SettingsRenderUtils";
|
import { titleAndInputStackProps, unsavedEditorWarningMessage } from "../SettingsRenderUtils";
|
||||||
import { isDirty as isContentDirty } from "../SettingsUtils";
|
import { isDirty as isContentDirty, isDataMaskingEnabled } from "../SettingsUtils";
|
||||||
|
|
||||||
export interface DataMaskingComponentProps {
|
export interface DataMaskingComponentProps {
|
||||||
shouldDiscardDataMasking: boolean;
|
shouldDiscardDataMasking: boolean;
|
||||||
@@ -24,16 +22,8 @@ interface DataMaskingComponentState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const emptyDataMaskingPolicy: DataModels.DataMaskingPolicy = {
|
const emptyDataMaskingPolicy: DataModels.DataMaskingPolicy = {
|
||||||
includedPaths: [
|
includedPaths: [],
|
||||||
{
|
|
||||||
path: "/",
|
|
||||||
strategy: "Default",
|
|
||||||
startPosition: 0,
|
|
||||||
length: -1,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
excludedPaths: [],
|
excludedPaths: [],
|
||||||
isPolicyEnabled: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export class DataMaskingComponent extends React.Component<DataMaskingComponentProps, DataMaskingComponentState> {
|
export class DataMaskingComponent extends React.Component<DataMaskingComponentProps, DataMaskingComponentState> {
|
||||||
@@ -140,7 +130,7 @@ export class DataMaskingComponent extends React.Component<DataMaskingComponentPr
|
|||||||
};
|
};
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
if (!isCapabilityEnabled(Constants.CapabilityNames.EnableDynamicDataMasking)) {
|
if (!isDataMaskingEnabled(this.props.dataMaskingContent)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import * as Constants from "../../../Common/Constants";
|
|||||||
import * as DataModels from "../../../Contracts/DataModels";
|
import * as DataModels from "../../../Contracts/DataModels";
|
||||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||||
import { isFabricNative } from "../../../Platform/Fabric/FabricUtil";
|
import { isFabricNative } from "../../../Platform/Fabric/FabricUtil";
|
||||||
|
import { userContext } from "../../../UserContext";
|
||||||
|
import { isCapabilityEnabled } from "../../../Utils/CapabilityUtils";
|
||||||
import { MongoIndex } from "../../../Utils/arm/generatedClients/cosmos/types";
|
import { MongoIndex } from "../../../Utils/arm/generatedClients/cosmos/types";
|
||||||
|
|
||||||
const zeroValue = 0;
|
const zeroValue = 0;
|
||||||
@@ -88,6 +90,19 @@ export const hasDatabaseSharedThroughput = (collection: ViewModels.Collection):
|
|||||||
return database?.isDatabaseShared() && !collection.offer();
|
return database?.isDatabaseShared() && !collection.offer();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const isDataMaskingEnabled = (dataMaskingPolicy?: DataModels.DataMaskingPolicy): boolean => {
|
||||||
|
const isSqlAccount = userContext.apiType === "SQL";
|
||||||
|
if (!isSqlAccount) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const hasDataMaskingCapability = isCapabilityEnabled(Constants.CapabilityNames.EnableDynamicDataMasking);
|
||||||
|
const hasDataMaskingPolicyFromCollection =
|
||||||
|
dataMaskingPolicy?.includedPaths?.length > 0 || dataMaskingPolicy?.excludedPaths?.length > 0;
|
||||||
|
|
||||||
|
return hasDataMaskingCapability || hasDataMaskingPolicyFromCollection;
|
||||||
|
};
|
||||||
|
|
||||||
export const parseConflictResolutionMode = (modeFromBackend: string): DataModels.ConflictResolutionMode => {
|
export const parseConflictResolutionMode = (modeFromBackend: string): DataModels.ConflictResolutionMode => {
|
||||||
// Backend can contain different casing as it does case-insensitive comparisson
|
// Backend can contain different casing as it does case-insensitive comparisson
|
||||||
if (!modeFromBackend) {
|
if (!modeFromBackend) {
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ export const collection = {
|
|||||||
dataMaskingPolicy: ko.observable<DataModels.DataMaskingPolicy>({
|
dataMaskingPolicy: ko.observable<DataModels.DataMaskingPolicy>({
|
||||||
includedPaths: [],
|
includedPaths: [],
|
||||||
excludedPaths: ["/excludedPath"],
|
excludedPaths: ["/excludedPath"],
|
||||||
isPolicyEnabled: true,
|
|
||||||
}),
|
}),
|
||||||
readSettings: () => {
|
readSettings: () => {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -604,6 +604,58 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
|
<PivotItem
|
||||||
|
headerButtonProps={
|
||||||
|
{
|
||||||
|
"data-test": "settings-tab-header/DataMaskingTab",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
headerText="Masking Policy (preview)"
|
||||||
|
itemKey="DataMaskingTab"
|
||||||
|
key="DataMaskingTab"
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||||
|
"color": "var(--colorNeutralForeground1)",
|
||||||
|
"marginTop": 20,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Stack
|
||||||
|
styles={
|
||||||
|
{
|
||||||
|
"root": {
|
||||||
|
"backgroundColor": "var(--colorNeutralBackground1)",
|
||||||
|
"color": "var(--colorNeutralForeground1)",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<DataMaskingComponent
|
||||||
|
dataMaskingContent={
|
||||||
|
{
|
||||||
|
"excludedPaths": [
|
||||||
|
"/excludedPath",
|
||||||
|
],
|
||||||
|
"includedPaths": [],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataMaskingContentBaseline={
|
||||||
|
{
|
||||||
|
"excludedPaths": [
|
||||||
|
"/excludedPath",
|
||||||
|
],
|
||||||
|
"includedPaths": [],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onDataMaskingContentChange={[Function]}
|
||||||
|
onDataMaskingDirtyChange={[Function]}
|
||||||
|
resetShouldDiscardDataMasking={[Function]}
|
||||||
|
shouldDiscardDataMasking={false}
|
||||||
|
validationErrors={[]}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</PivotItem>
|
||||||
<PivotItem
|
<PivotItem
|
||||||
headerButtonProps={
|
headerButtonProps={
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ export default class Collection implements ViewModels.Collection {
|
|||||||
const defaultDataMaskingPolicy: DataModels.DataMaskingPolicy = {
|
const defaultDataMaskingPolicy: DataModels.DataMaskingPolicy = {
|
||||||
includedPaths: Array<{ path: string; strategy: string; startPosition: number; length: number }>(),
|
includedPaths: Array<{ path: string; strategy: string; startPosition: number; length: number }>(),
|
||||||
excludedPaths: Array<string>(),
|
excludedPaths: Array<string>(),
|
||||||
isPolicyEnabled: true,
|
|
||||||
};
|
};
|
||||||
const observablePolicy = ko.observable(data.dataMaskingPolicy || defaultDataMaskingPolicy);
|
const observablePolicy = ko.observable(data.dataMaskingPolicy || defaultDataMaskingPolicy);
|
||||||
observablePolicy.subscribe(() => {});
|
observablePolicy.subscribe(() => {});
|
||||||
|
|||||||
Reference in New Issue
Block a user