From 8cc04bab87ba2f557398e64222505f9b6341e65a Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Thu, 25 Mar 2021 15:24:43 -0700 Subject: [PATCH 1/3] MongoDocumentsTab.html was not used here (#582) --- src/Explorer/ComponentRegisterer.ts | 2 - src/Explorer/Tabs/MongoDocumentsTab.html | 426 ----------------------- src/Explorer/Tabs/MongoDocumentsTab.ts | 2 - 3 files changed, 430 deletions(-) delete mode 100644 src/Explorer/Tabs/MongoDocumentsTab.html diff --git a/src/Explorer/ComponentRegisterer.ts b/src/Explorer/ComponentRegisterer.ts index 67c2777fa..b67717c0e 100644 --- a/src/Explorer/ComponentRegisterer.ts +++ b/src/Explorer/ComponentRegisterer.ts @@ -11,7 +11,6 @@ import { NewVertexComponent } from "./Graph/NewVertexComponent/NewVertexComponen import { ThroughputInputComponentAutoPilotV3 } from "./Controls/ThroughputInput/ThroughputInputComponentAutoPilotV3"; import DocumentsTab from "./Tabs/DocumentsTab"; -import MongoDocumentsTab from "./Tabs/MongoDocumentsTab"; import StoredProcedureTab from "./Tabs/StoredProcedureTab"; import TriggerTab from "./Tabs/TriggerTab"; import UserDefinedFunctionTab from "./Tabs/UserDefinedFunctionTab"; @@ -42,7 +41,6 @@ ko.components.register("tabs-manager", { template: TabsManagerTemplate }); // Collection Tabs [ DocumentsTab, - MongoDocumentsTab, StoredProcedureTab, TriggerTab, UserDefinedFunctionTab, diff --git a/src/Explorer/Tabs/MongoDocumentsTab.html b/src/Explorer/Tabs/MongoDocumentsTab.html deleted file mode 100644 index 00e2a6685..000000000 --- a/src/Explorer/Tabs/MongoDocumentsTab.html +++ /dev/null @@ -1,426 +0,0 @@ -
- -
-
- - - New Document - - - New Document - - - - - - New SQL Query - - - New Query - - - - - - Save - - - Save - - - - - - Discard - - - Discard - - - - - - Update - - - Update - - - - - - Discard - - - Discard - - - - - - Delete - - - Delete - - -
-
- - - - -
-
-

Title

-
Text
-
-
- - -
-
-
-
- - - - -
- -
- SELECT * FROM c - - -
-
- Filter : - - No filter applied - - -
- - - -
-
-
- - SELECT * FROM c - - - - - - - - - - - - - - -
-
-
- -
- - - -
-
-
- - - - - - - - - - - - - -
_idid - -
- - - - - - - - - - - -
_id - -
- -
- -
- - - - - - - - - - - -
- -
- -
- Load more -
-
- - - -
-
-
- -
-
- -
diff --git a/src/Explorer/Tabs/MongoDocumentsTab.ts b/src/Explorer/Tabs/MongoDocumentsTab.ts index e72f0c2e3..61fce5059 100644 --- a/src/Explorer/Tabs/MongoDocumentsTab.ts +++ b/src/Explorer/Tabs/MongoDocumentsTab.ts @@ -20,10 +20,8 @@ import { extractPartitionKey } from "@azure/cosmos"; import * as Logger from "../../Common/Logger"; import { PartitionKeyDefinition } from "@azure/cosmos"; import { getErrorMessage, getErrorStack } from "../../Common/ErrorHandlingUtils"; -import template from "./MongoDocumentsTab.html"; export default class MongoDocumentsTab extends DocumentsTab { - public static readonly component = { name: "mongo-documents-tab", template }; public collection: ViewModels.Collection; private continuationToken: string; From a66f042c10d6724973178776c07ac2bb75ddbfb6 Mon Sep 17 00:00:00 2001 From: Armando Trejo Oliver Date: Fri, 26 Mar 2021 12:18:04 -0700 Subject: [PATCH 2/3] Fix table api query projections (#584) When building queries with projections, the resulting query does not include the "id" property as part of the projection. The "id" property is used by the results grid to display as the RowKey so the result is queries wih projections do not show the RowKey. This change fixes this by including "id" as part of the projections. --- .../QueryBuilder/QueryBuilderViewModel.ts | 20 +++++++++---------- src/Explorer/Tables/TableEntityProcessor.ts | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Explorer/Tables/QueryBuilder/QueryBuilderViewModel.ts b/src/Explorer/Tables/QueryBuilder/QueryBuilderViewModel.ts index 523c83dee..a9c0d0dbe 100644 --- a/src/Explorer/Tables/QueryBuilder/QueryBuilderViewModel.ts +++ b/src/Explorer/Tables/QueryBuilder/QueryBuilderViewModel.ts @@ -1,17 +1,17 @@ import * as ko from "knockout"; -import * as CustomTimestampHelper from "./CustomTimestampHelper"; -import { getQuotedCqlIdentifier } from "../CqlUtilities"; -import QueryClauseViewModel from "./QueryClauseViewModel"; -import ClauseGroup from "./ClauseGroup"; -import ClauseGroupViewModel from "./ClauseGroupViewModel"; -import QueryViewModel from "./QueryViewModel"; +import { KeyCodes } from "../../../Common/Constants"; import * as Constants from "../Constants"; -import TableEntityListViewModel from "../DataTable/TableEntityListViewModel"; -import * as DateTimeUtilities from "./DateTimeUtilities"; +import { getQuotedCqlIdentifier } from "../CqlUtilities"; import * as DataTableUtilities from "../DataTable/DataTableUtilities"; +import TableEntityListViewModel from "../DataTable/TableEntityListViewModel"; import * as TableEntityProcessor from "../TableEntityProcessor"; import * as Utilities from "../Utilities"; -import { KeyCodes } from "../../../Common/Constants"; +import ClauseGroup from "./ClauseGroup"; +import ClauseGroupViewModel from "./ClauseGroupViewModel"; +import * as CustomTimestampHelper from "./CustomTimestampHelper"; +import * as DateTimeUtilities from "./DateTimeUtilities"; +import QueryClauseViewModel from "./QueryClauseViewModel"; +import QueryViewModel from "./QueryViewModel"; export default class QueryBuilderViewModel { /* Labels */ @@ -182,7 +182,7 @@ export default class QueryBuilderViewModel { value = `["${TableEntityProcessor.keyProperties.PartitionKey}"]`; filterString = filterString.concat(filterString === "SELECT" ? " c" : ", c"); } else if (value === Constants.EntityKeyNames.RowKey) { - value = `["${TableEntityProcessor.keyProperties.Id2}"]`; + value = `["${TableEntityProcessor.keyProperties.Id}"]`; filterString = filterString.concat(filterString === "SELECT" ? " c" : ", c"); } else { if (value === Constants.EntityKeyNames.Timestamp) { diff --git a/src/Explorer/Tables/TableEntityProcessor.ts b/src/Explorer/Tables/TableEntityProcessor.ts index f412fb12c..4f6fd4f99 100644 --- a/src/Explorer/Tables/TableEntityProcessor.ts +++ b/src/Explorer/Tables/TableEntityProcessor.ts @@ -1,6 +1,6 @@ import * as ViewModels from "../../Contracts/ViewModels"; -import * as Entities from "./Entities"; import * as Constants from "./Constants"; +import * as Entities from "./Entities"; import * as DateTimeUtilities from "./QueryBuilder/DateTimeUtilities"; // For use exclusively with Tables API. @@ -36,7 +36,7 @@ export function convertDocumentsToEntities(documents: any[]): Entities.ITableEnt let results: Entities.ITableEntityForTablesAPI[] = []; documents && documents.forEach((document) => { - if (!document.hasOwnProperty(keyProperties.PartitionKey) || !document.hasOwnProperty(keyProperties.Id2)) { + if (!document.hasOwnProperty(keyProperties.PartitionKey) || !document.hasOwnProperty(keyProperties.Id)) { //Document does not match the current required format for Tables, so we ignore it return; // The rest of the key properties should be guaranteed as DocumentDB properties } From f82b0b442ec4e8d45491644e6ad164bb8d359c9f Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Sat, 27 Mar 2021 11:18:59 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 72e608e02..f82af79ee 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ Run `npm start` to start the development server and automatically rebuild on cha ### Hosted Development (https://cosmos.azure.com) - Visit: `https://localhost:1234/hostedExplorer.html` -- Local sign in via AAD will NOT work. Connection string only in dev mode. Use the Portal if you need AAD auth. - The default webpack dev server configuration will proxy requests to the production portal backend: `https://main.documentdb.ext.azure.com`. This will allow you to use production connection strings on your local machine. ### Emulator Development