From 80dd161a6fe10a0826f57009635876e114c41edc Mon Sep 17 00:00:00 2001
From: victor-meng <56978073+victor-meng@users.noreply.github.com>
Date: Mon, 6 Feb 2023 12:51:04 -0800
Subject: [PATCH] Remove networking warning message for sql, gremlin, and
tables api (#1388)
---
.../AddCollectionPanel.test.tsx.snap | 23 +++++++++++++++++++
src/Utils/NetworkUtility.ts | 12 +++-------
src/hooks/useKnockoutExplorer.ts | 2 +-
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/src/Explorer/Panes/__snapshots__/AddCollectionPanel.test.tsx.snap b/src/Explorer/Panes/__snapshots__/AddCollectionPanel.test.tsx.snap
index 420e23955..4544d086b 100644
--- a/src/Explorer/Panes/__snapshots__/AddCollectionPanel.test.tsx.snap
+++ b/src/Explorer/Panes/__snapshots__/AddCollectionPanel.test.tsx.snap
@@ -234,6 +234,29 @@ exports[`AddCollectionPanel should render Default properly 1`] = `
type="text"
value=""
/>
+
+
+ Add hierarchical partition key (preview)
+
+
{
+export const getNetworkSettingsWarningMessage = (): string => {
const accountProperties = userContext.databaseAccount?.properties;
if (!accountProperties) {
@@ -40,13 +40,7 @@ export const getNetworkSettingsWarningMessage = (clientIpAddress: string): strin
if (numberOfMatches !== portalIPs.length) {
return "The Network settings for this account are preventing access from Data Explorer. Please allow access from Azure Portal to proceed.";
}
-
- return "";
- } else {
- if (!clientIpAddress || ipRules.some((ipRule) => ipRule.ipAddressOrRange === clientIpAddress)) {
- return "";
- }
-
- return "The Network settings for this account are preventing access from Data Explorer. Please add your current IP to the firewall rules to proceed.";
}
+
+ return "";
};
diff --git a/src/hooks/useKnockoutExplorer.ts b/src/hooks/useKnockoutExplorer.ts
index dbfd64c5e..70f8dc3c6 100644
--- a/src/hooks/useKnockoutExplorer.ts
+++ b/src/hooks/useKnockoutExplorer.ts
@@ -382,7 +382,7 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
}
}
- const warningMessage = getNetworkSettingsWarningMessage(inputs.clientIpAddress);
+ const warningMessage = getNetworkSettingsWarningMessage();
useTabs.getState().setNetworkSettingsWarning(warningMessage);
if (inputs.features) {