mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-05-16 18:27:44 +01:00
Move restore flag behind feature flag. Whitelist restorable tabs in for Fabric. Restore e2e tests.
This commit is contained in:
@@ -1166,7 +1166,10 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
await this.refreshSampleData();
|
||||
this.restoreOpenTabs();
|
||||
|
||||
if (userContext.features.restoreTabs) {
|
||||
this.restoreOpenTabs();
|
||||
}
|
||||
}
|
||||
|
||||
public async configureCopilot(): Promise<void> {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// TODO convert this file to an action registry in order to have actions and their handlers be more tightly coupled.
|
||||
import { configContext, Platform } from "ConfigContext";
|
||||
import { useDatabases } from "Explorer/useDatabases";
|
||||
import React from "react";
|
||||
import { ActionContracts } from "../../Contracts/ExplorerContracts";
|
||||
@@ -56,6 +57,19 @@ function openCollectionTab(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
configContext.platform === Platform.Fabric &&
|
||||
!(
|
||||
// whitelist the tab kinds that are allowed to be opened in Fabric
|
||||
(
|
||||
action.tabKind === ActionContracts.TabKind.SQLDocuments ||
|
||||
action.tabKind === ActionContracts.TabKind.SQLQuery
|
||||
)
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//expand database first if not expanded to load the collections
|
||||
if (!database.isDatabaseExpanded?.()) {
|
||||
database.expandDatabase?.();
|
||||
|
||||
Reference in New Issue
Block a user