mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-29 05:00:20 +00:00
Rename properties from notebookService to phoenixService in phoenix c… (#1263)
* Rename properties from notebookService to phoenixService in phoenix client Co-authored-by: kcheekuri <kcheekuri@microsoft.com>
This commit is contained in:
parent
13811b1d44
commit
b9dffdd990
@ -438,7 +438,7 @@ export interface NotebookWorkspaceConnectionInfo {
|
|||||||
|
|
||||||
export interface ContainerInfo {
|
export interface ContainerInfo {
|
||||||
durationLeftInMinutes: number;
|
durationLeftInMinutes: number;
|
||||||
notebookServerInfo: NotebookWorkspaceConnectionInfo;
|
phoenixServerInfo: NotebookWorkspaceConnectionInfo;
|
||||||
status: ContainerStatusType;
|
status: ContainerStatusType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,8 +481,8 @@ export interface IMaxUsersPerDbAccountExceeded extends IPhoenixError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IPhoenixConnectionInfoResult {
|
export interface IPhoenixConnectionInfoResult {
|
||||||
readonly notebookAuthToken?: string;
|
readonly authToken?: string;
|
||||||
readonly notebookServerUrl?: string;
|
readonly phoenixServiceUrl?: string;
|
||||||
readonly forwardingId?: string;
|
readonly forwardingId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,8 +370,8 @@ export default class Explorer {
|
|||||||
});
|
});
|
||||||
useNotebook.getState().setIsAllocating(true);
|
useNotebook.getState().setIsAllocating(true);
|
||||||
connectionInfo = await this.phoenixClient.allocateContainer(provisionData);
|
connectionInfo = await this.phoenixClient.allocateContainer(provisionData);
|
||||||
if (!connectionInfo?.data?.notebookServerUrl) {
|
if (!connectionInfo?.data?.phoenixServiceUrl) {
|
||||||
throw new Error(`NotebookServerUrl is invalid!`);
|
throw new Error(`PhoenixServiceUrl is invalid!`);
|
||||||
}
|
}
|
||||||
await this.setNotebookInfo(connectionInfo, connectionStatus);
|
await this.setNotebookInfo(connectionInfo, connectionStatus);
|
||||||
TelemetryProcessor.traceSuccess(Action.PhoenixConnection, {
|
TelemetryProcessor.traceSuccess(Action.PhoenixConnection, {
|
||||||
@ -422,8 +422,8 @@ export default class Explorer {
|
|||||||
notebookServerEndpoint:
|
notebookServerEndpoint:
|
||||||
(validateEndpoint(userContext.features.notebookServerUrl, allowedNotebookServerUrls) &&
|
(validateEndpoint(userContext.features.notebookServerUrl, allowedNotebookServerUrls) &&
|
||||||
userContext.features.notebookServerUrl) ||
|
userContext.features.notebookServerUrl) ||
|
||||||
connectionInfo.data.notebookServerUrl,
|
connectionInfo.data.phoenixServiceUrl,
|
||||||
authToken: userContext.features.notebookServerToken || connectionInfo.data.notebookAuthToken,
|
authToken: userContext.features.notebookServerToken || connectionInfo.data.authToken,
|
||||||
forwardingId: connectionInfo.data.forwardingId,
|
forwardingId: connectionInfo.data.forwardingId,
|
||||||
});
|
});
|
||||||
this.notebookManager?.notebookClient
|
this.notebookManager?.notebookClient
|
||||||
@ -498,8 +498,8 @@ export default class Explorer {
|
|||||||
if (connectionInfo?.status !== HttpStatusCodes.OK) {
|
if (connectionInfo?.status !== HttpStatusCodes.OK) {
|
||||||
throw new Error(`Reset Workspace: Received status code- ${connectionInfo?.status}`);
|
throw new Error(`Reset Workspace: Received status code- ${connectionInfo?.status}`);
|
||||||
}
|
}
|
||||||
if (!connectionInfo?.data?.notebookServerUrl) {
|
if (!connectionInfo?.data?.phoenixServiceUrl) {
|
||||||
throw new Error(`Reset Workspace: NotebookServerUrl is invalid!`);
|
throw new Error(`Reset Workspace: PhoenixServiceUrl is invalid!`);
|
||||||
}
|
}
|
||||||
if (useNotebook.getState().isPhoenixNotebooks) {
|
if (useNotebook.getState().isPhoenixNotebooks) {
|
||||||
await this.setNotebookInfo(connectionInfo, connectionStatus);
|
await this.setNotebookInfo(connectionInfo, connectionStatus);
|
||||||
|
@ -96,7 +96,7 @@ export const useNotebook: UseStore<NotebookState> = create((set, get) => ({
|
|||||||
containerStatus: {
|
containerStatus: {
|
||||||
status: undefined,
|
status: undefined,
|
||||||
durationLeftInMinutes: undefined,
|
durationLeftInMinutes: undefined,
|
||||||
notebookServerInfo: undefined,
|
phoenixServerInfo: undefined,
|
||||||
},
|
},
|
||||||
isPhoenixNotebooks: undefined,
|
isPhoenixNotebooks: undefined,
|
||||||
isPhoenixFeatures: undefined,
|
isPhoenixFeatures: undefined,
|
||||||
@ -296,7 +296,7 @@ export const useNotebook: UseStore<NotebookState> = create((set, get) => ({
|
|||||||
useNotebook.getState().setContainerStatus({
|
useNotebook.getState().setContainerStatus({
|
||||||
status: undefined,
|
status: undefined,
|
||||||
durationLeftInMinutes: undefined,
|
durationLeftInMinutes: undefined,
|
||||||
notebookServerInfo: undefined,
|
phoenixServerInfo: undefined,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setIsRefreshed: (isRefreshed: boolean) => set({ isRefreshed }),
|
setIsRefreshed: (isRefreshed: boolean) => set({ isRefreshed }),
|
||||||
|
@ -104,7 +104,7 @@ export class PhoenixClient {
|
|||||||
const containerStatus = await response.json();
|
const containerStatus = await response.json();
|
||||||
return {
|
return {
|
||||||
durationLeftInMinutes: containerStatus?.durationLeftInMinutes,
|
durationLeftInMinutes: containerStatus?.durationLeftInMinutes,
|
||||||
notebookServerInfo: containerStatus?.notebookServerInfo,
|
phoenixServerInfo: containerStatus?.phoenixServerInfo,
|
||||||
status: ContainerStatusType.Active,
|
status: ContainerStatusType.Active,
|
||||||
};
|
};
|
||||||
} else if (response.status === HttpStatusCodes.NotFound) {
|
} else if (response.status === HttpStatusCodes.NotFound) {
|
||||||
@ -148,7 +148,7 @@ export class PhoenixClient {
|
|||||||
useNotebook.getState().setIsRefreshed(!useNotebook.getState().isRefreshed);
|
useNotebook.getState().setIsRefreshed(!useNotebook.getState().isRefreshed);
|
||||||
return {
|
return {
|
||||||
durationLeftInMinutes: undefined,
|
durationLeftInMinutes: undefined,
|
||||||
notebookServerInfo: undefined,
|
phoenixServerInfo: undefined,
|
||||||
status: ContainerStatusType.Disconnected,
|
status: ContainerStatusType.Disconnected,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user