mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-01 07:11:23 +00:00
Initial Move from Azure DevOps to GitHub
This commit is contained in:
22
src/Shared/ExplorerSettings.ts
Normal file
22
src/Shared/ExplorerSettings.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as Constants from "../Common/Constants";
|
||||
import { LocalStorageUtility, StorageKey } from "./StorageUtility";
|
||||
|
||||
export class ExplorerSettings {
|
||||
public static createDefaultSettings() {
|
||||
LocalStorageUtility.setEntryNumber(StorageKey.ActualItemPerPage, Constants.Queries.itemsPerPage);
|
||||
LocalStorageUtility.setEntryNumber(StorageKey.CustomItemPerPage, Constants.Queries.itemsPerPage);
|
||||
LocalStorageUtility.setEntryString(StorageKey.IsCrossPartitionQueryEnabled, "true");
|
||||
LocalStorageUtility.setEntryNumber(
|
||||
StorageKey.MaxDegreeOfParellism,
|
||||
Constants.Queries.DefaultMaxDegreeOfParallelism
|
||||
);
|
||||
}
|
||||
|
||||
public static hasSettingsDefined(): boolean {
|
||||
return (
|
||||
LocalStorageUtility.hasItem(StorageKey.ActualItemPerPage) &&
|
||||
LocalStorageUtility.hasItem(StorageKey.IsCrossPartitionQueryEnabled) &&
|
||||
LocalStorageUtility.hasItem(StorageKey.MaxDegreeOfParellism)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user