mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-27 12:10:09 +00:00
Update comments-2
This commit is contained in:
parent
7b332388e1
commit
db8a6f9c5c
@ -84,9 +84,7 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
|
|||||||
const mainItems = this.createMainItems();
|
const mainItems = this.createMainItems();
|
||||||
const commonTaskItems = this.createCommonTaskItems();
|
const commonTaskItems = this.createCommonTaskItems();
|
||||||
let recentItems = this.createRecentItems();
|
let recentItems = this.createRecentItems();
|
||||||
if (useNotebook.getState().isPhoenix) {
|
recentItems = recentItems.filter((item) => item.description !== "Notebook");
|
||||||
recentItems = recentItems.filter((item) => item.description !== "Notebook");
|
|
||||||
}
|
|
||||||
|
|
||||||
const tipsItems = this.createTipsItems();
|
const tipsItems = this.createTipsItems();
|
||||||
const onClearRecent = this.clearMostRecent;
|
const onClearRecent = this.clearMostRecent;
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
IContainerData,
|
IContainerData,
|
||||||
IPhoenixConnectionInfoResult,
|
IPhoenixConnectionInfoResult,
|
||||||
IProvisionData,
|
IProvisionData,
|
||||||
IResponse,
|
IResponse
|
||||||
} from "../Contracts/DataModels";
|
} from "../Contracts/DataModels";
|
||||||
import { useNotebook } from "../Explorer/Notebook/useNotebook";
|
import { useNotebook } from "../Explorer/Notebook/useNotebook";
|
||||||
import { userContext } from "../UserContext";
|
import { userContext } from "../UserContext";
|
||||||
@ -37,7 +37,7 @@ export class PhoenixClient {
|
|||||||
): Promise<IResponse<IPhoenixConnectionInfoResult>> {
|
): Promise<IResponse<IPhoenixConnectionInfoResult>> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${this.getPhoenixControlPlaneEndpoint()}${userContext.databaseAccount.id}/containerconnections`,
|
`${this.getPhoenixControlPlaneEndpoint()}/containerconnections`,
|
||||||
{
|
{
|
||||||
method: operation === "allocate" ? "POST" : "PATCH",
|
method: operation === "allocate" ? "POST" : "PATCH",
|
||||||
headers: PhoenixClient.getHeaders(),
|
headers: PhoenixClient.getHeaders(),
|
||||||
@ -76,7 +76,7 @@ export class PhoenixClient {
|
|||||||
try {
|
try {
|
||||||
const runContainerStatusAsync = async () => {
|
const runContainerStatusAsync = async () => {
|
||||||
const response = await window.fetch(
|
const response = await window.fetch(
|
||||||
`${this.getPhoenixControlPlaneEndpoint()}${userContext.databaseAccount.id}/${containerData.forwardingId}`,
|
`${this.getPhoenixControlPlaneEndpoint()}/${containerData.forwardingId}`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: PhoenixClient.getHeaders(),
|
headers: PhoenixClient.getHeaders(),
|
||||||
@ -125,7 +125,7 @@ export class PhoenixClient {
|
|||||||
|
|
||||||
public async IsDbAcountWhitelisted() {
|
public async IsDbAcountWhitelisted() {
|
||||||
try {
|
try {
|
||||||
const response = await window.fetch(`${this.getPhoenixControlPlaneEndpoint()}${userContext.databaseAccount.id}`, {
|
const response = await window.fetch(`${this.getPhoenixControlPlaneEndpoint()}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: PhoenixClient.getHeaders(),
|
headers: PhoenixClient.getHeaders(),
|
||||||
});
|
});
|
||||||
@ -149,7 +149,7 @@ export class PhoenixClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getPhoenixControlPlaneEndpoint(): string {
|
public getPhoenixControlPlaneEndpoint(): string {
|
||||||
return `${PhoenixClient.getPhoenixEndpoint()}/api/controlplane/toolscontainer/cosmosaccounts`;
|
return `${PhoenixClient.getPhoenixEndpoint()}/api/controlplane/toolscontainer/cosmosaccounts${userContext.databaseAccount.id}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static getHeaders(): HeadersInit {
|
private static getHeaders(): HeadersInit {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user