mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-25 11:51:07 +00:00
* Replaced monaco editor on Container Vector Policy tab with controls same as on create container ux * Adds vector embedding policy to container management. Adds FullTextSearch to both add container and container management. * Fixing unit tests and formatting issues * More fixes * Updating full text controls based on feedback * Minor updates * Editing test to fix compile issue * Minor fix * Adding paths for jest to ignore transform due to recent changes in upstream dependencies * Adding mock to temporarily get unit tests to pass * Hiding FTS feature behind the new EnableNoSQLFullTextSearch capability
55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
import ko from "knockout";
|
|
import * as DataModels from "../../../Contracts/DataModels";
|
|
import * as ViewModels from "../../../Contracts/ViewModels";
|
|
import Explorer from "../../Explorer";
|
|
|
|
export const container = new Explorer();
|
|
|
|
export const collection = {
|
|
container: container,
|
|
databaseId: "test",
|
|
id: ko.observable<string>("test"),
|
|
defaultTtl: ko.observable<number>(5),
|
|
analyticalStorageTtl: ko.observable<number>(undefined),
|
|
indexingPolicy: ko.observable<DataModels.IndexingPolicy>({
|
|
automatic: true,
|
|
indexingMode: "consistent",
|
|
includedPaths: [],
|
|
excludedPaths: [],
|
|
}),
|
|
uniqueKeyPolicy: {} as DataModels.UniqueKeyPolicy,
|
|
usageSizeInKB: ko.observable(100),
|
|
offer: ko.observable<DataModels.Offer>({
|
|
autoscaleMaxThroughput: undefined,
|
|
manualThroughput: 10000,
|
|
minimumThroughput: 6000,
|
|
id: "offer",
|
|
offerReplacePending: false,
|
|
}),
|
|
conflictResolutionPolicy: ko.observable<DataModels.ConflictResolutionPolicy>(
|
|
{} as DataModels.ConflictResolutionPolicy,
|
|
),
|
|
changeFeedPolicy: ko.observable<DataModels.ChangeFeedPolicy>({} as DataModels.ChangeFeedPolicy),
|
|
geospatialConfig: ko.observable<DataModels.GeospatialConfig>({} as DataModels.GeospatialConfig),
|
|
getDatabase: () => {
|
|
return;
|
|
},
|
|
partitionKey: {
|
|
paths: [],
|
|
kind: "hash",
|
|
version: 2,
|
|
},
|
|
partitionKeyProperties: ["partitionKey"],
|
|
computedProperties: ko.observable<DataModels.ComputedProperties>([
|
|
{
|
|
name: "queryName",
|
|
query: "query",
|
|
},
|
|
]),
|
|
vectorEmbeddingPolicy: ko.observable<DataModels.VectorEmbeddingPolicy>({} as DataModels.VectorEmbeddingPolicy),
|
|
fullTextPolicy: ko.observable<DataModels.FullTextPolicy>({} as DataModels.FullTextPolicy),
|
|
readSettings: () => {
|
|
return;
|
|
},
|
|
} as unknown as ViewModels.Collection;
|