Add new Portal Backend Sample Data API and remove Notifications API references (#1965)

* Fixed Sample Data logic and remove notifications references

* fixed undefined

* fixed unit tests

* fixed format test

* cleanup

---------

Co-authored-by: Asier Isayas <aisayas@microsoft.com>
This commit is contained in:
Asier Isayas
2024-09-11 08:07:50 -04:00
committed by GitHub
parent 825a5d5257
commit 82bdeff158
22 changed files with 107 additions and 319 deletions

View File

@@ -1,6 +1,7 @@
import * as msal from "@azure/msal-browser";
import { Link } from "@fluentui/react/lib/Link";
import { isPublicInternetAccessAllowed } from "Common/DatabaseAccountUtility";
import { Environment, getEnvironment } from "Common/EnvironmentUtility";
import { sendMessage } from "Common/MessageHandler";
import { Platform, configContext } from "ConfigContext";
import { MessageTypes } from "Contracts/ExplorerContracts";
@@ -1178,7 +1179,11 @@ export default class Explorer {
}
public async configureCopilot(): Promise<void> {
if (userContext.apiType !== "SQL" || !userContext.subscriptionId) {
if (
userContext.apiType !== "SQL" ||
!userContext.subscriptionId ||
![Environment.Development, Environment.Mpac, Environment.Prod].includes(getEnvironment())
) {
return;
}
const copilotEnabledPromise = getCopilotEnabled();