mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 00:41:31 +00:00
Remove Explorer.isPreferredCassandraAPI (#654)
Co-authored-by: Steve Faulkner <471400+southpolesteve@users.noreply.github.com>
This commit is contained in:
@@ -34,9 +34,7 @@ describe("Collection", () => {
|
||||
mockContainer.isPreferredApiMongoDB = ko.computed(() => {
|
||||
return false;
|
||||
});
|
||||
mockContainer.isPreferredApiCassandra = ko.computed(() => {
|
||||
return false;
|
||||
});
|
||||
|
||||
mockContainer.isDatabaseNodeOrNoneSelected = () => {
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -374,7 +374,7 @@ export default class Collection implements ViewModels.Collection {
|
||||
dataExplorerArea: Constants.Areas.ResourceTree,
|
||||
});
|
||||
|
||||
if (this.container.isPreferredApiCassandra() && !this.cassandraKeys) {
|
||||
if (userContext.apiType === "Cassandra" && !this.cassandraKeys) {
|
||||
(<CassandraAPIDataClient>this.container.tableDataClient).getTableKeys(this).then((keys: CassandraTableKeys) => {
|
||||
this.cassandraKeys = keys;
|
||||
});
|
||||
@@ -391,7 +391,7 @@ export default class Collection implements ViewModels.Collection {
|
||||
} else {
|
||||
this.documentIds([]);
|
||||
let title = `Entities`;
|
||||
if (this.container.isPreferredApiCassandra()) {
|
||||
if (userContext.apiType === "Cassandra") {
|
||||
title = `Rows`;
|
||||
}
|
||||
const startKey: number = TelemetryProcessor.traceStart(Action.Tab, {
|
||||
@@ -1084,7 +1084,7 @@ export default class Collection implements ViewModels.Collection {
|
||||
if (this.container.isPreferredApiTable()) {
|
||||
this.onTableEntitiesClick();
|
||||
return;
|
||||
} else if (this.container.isPreferredApiCassandra()) {
|
||||
} else if (userContext.apiType === "Cassandra") {
|
||||
this.onTableEntitiesClick();
|
||||
return;
|
||||
} else if (this.container.isPreferredApiGraph()) {
|
||||
@@ -1104,7 +1104,7 @@ export default class Collection implements ViewModels.Collection {
|
||||
public getLabel(): string {
|
||||
if (this.container.isPreferredApiTable()) {
|
||||
return "Entities";
|
||||
} else if (this.container.isPreferredApiCassandra()) {
|
||||
} else if (userContext.apiType === "Cassandra") {
|
||||
return "Rows";
|
||||
} else if (this.container.isPreferredApiGraph()) {
|
||||
return "Graph";
|
||||
|
||||
@@ -273,7 +273,7 @@ export class ResourceTreeAdapter implements ReactAdapter {
|
||||
contextMenu: ResourceTreeContextMenuButtonFactory.createCollectionContextMenuButton(this.container, collection),
|
||||
});
|
||||
|
||||
if (!this.container.isPreferredApiCassandra() || !this.container.isServerlessEnabled()) {
|
||||
if (userContext.apiType !== "Cassandra" || !this.container.isServerlessEnabled()) {
|
||||
children.push({
|
||||
label: database.isDatabaseShared() || this.container.isServerlessEnabled() ? "Settings" : "Scale & Settings",
|
||||
onClick: collection.onSettingsClick.bind(collection),
|
||||
|
||||
Reference in New Issue
Block a user