diff --git a/src/Contracts/DataModels.ts b/src/Contracts/DataModels.ts index 5e783f471..8bec7e6f9 100644 --- a/src/Contracts/DataModels.ts +++ b/src/Contracts/DataModels.ts @@ -438,7 +438,7 @@ export interface NotebookWorkspaceConnectionInfo { export interface ContainerInfo { durationLeftInMinutes: number; - notebookServerInfo: NotebookWorkspaceConnectionInfo; + phoenixServerInfo: NotebookWorkspaceConnectionInfo; status: ContainerStatusType; } @@ -481,8 +481,8 @@ export interface IMaxUsersPerDbAccountExceeded extends IPhoenixError { } export interface IPhoenixConnectionInfoResult { - readonly notebookAuthToken?: string; - readonly notebookServerUrl?: string; + readonly authToken?: string; + readonly phoenixServiceUrl?: string; readonly forwardingId?: string; } diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index a9a5f645b..6bf9a581c 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -370,8 +370,8 @@ export default class Explorer { }); useNotebook.getState().setIsAllocating(true); connectionInfo = await this.phoenixClient.allocateContainer(provisionData); - if (!connectionInfo?.data?.notebookServerUrl) { - throw new Error(`NotebookServerUrl is invalid!`); + if (!connectionInfo?.data?.phoenixServiceUrl) { + throw new Error(`PhoenixServiceUrl is invalid!`); } await this.setNotebookInfo(connectionInfo, connectionStatus); TelemetryProcessor.traceSuccess(Action.PhoenixConnection, { @@ -422,8 +422,8 @@ export default class Explorer { notebookServerEndpoint: (validateEndpoint(userContext.features.notebookServerUrl, allowedNotebookServerUrls) && userContext.features.notebookServerUrl) || - connectionInfo.data.notebookServerUrl, - authToken: userContext.features.notebookServerToken || connectionInfo.data.notebookAuthToken, + connectionInfo.data.phoenixServiceUrl, + authToken: userContext.features.notebookServerToken || connectionInfo.data.authToken, forwardingId: connectionInfo.data.forwardingId, }); this.notebookManager?.notebookClient @@ -498,8 +498,8 @@ export default class Explorer { if (connectionInfo?.status !== HttpStatusCodes.OK) { throw new Error(`Reset Workspace: Received status code- ${connectionInfo?.status}`); } - if (!connectionInfo?.data?.notebookServerUrl) { - throw new Error(`Reset Workspace: NotebookServerUrl is invalid!`); + if (!connectionInfo?.data?.phoenixServiceUrl) { + throw new Error(`Reset Workspace: PhoenixServiceUrl is invalid!`); } if (useNotebook.getState().isPhoenixNotebooks) { await this.setNotebookInfo(connectionInfo, connectionStatus); diff --git a/src/Explorer/Notebook/useNotebook.ts b/src/Explorer/Notebook/useNotebook.ts index b0bcba10b..d283b7a7b 100644 --- a/src/Explorer/Notebook/useNotebook.ts +++ b/src/Explorer/Notebook/useNotebook.ts @@ -96,7 +96,7 @@ export const useNotebook: UseStore = create((set, get) => ({ containerStatus: { status: undefined, durationLeftInMinutes: undefined, - notebookServerInfo: undefined, + phoenixServerInfo: undefined, }, isPhoenixNotebooks: undefined, isPhoenixFeatures: undefined, @@ -296,7 +296,7 @@ export const useNotebook: UseStore = create((set, get) => ({ useNotebook.getState().setContainerStatus({ status: undefined, durationLeftInMinutes: undefined, - notebookServerInfo: undefined, + phoenixServerInfo: undefined, }); }, setIsRefreshed: (isRefreshed: boolean) => set({ isRefreshed }), diff --git a/src/Phoenix/PhoenixClient.ts b/src/Phoenix/PhoenixClient.ts index 9728a8a15..9ff373366 100644 --- a/src/Phoenix/PhoenixClient.ts +++ b/src/Phoenix/PhoenixClient.ts @@ -104,7 +104,7 @@ export class PhoenixClient { const containerStatus = await response.json(); return { durationLeftInMinutes: containerStatus?.durationLeftInMinutes, - notebookServerInfo: containerStatus?.notebookServerInfo, + phoenixServerInfo: containerStatus?.phoenixServerInfo, status: ContainerStatusType.Active, }; } else if (response.status === HttpStatusCodes.NotFound) { @@ -148,7 +148,7 @@ export class PhoenixClient { useNotebook.getState().setIsRefreshed(!useNotebook.getState().isRefreshed); return { durationLeftInMinutes: undefined, - notebookServerInfo: undefined, + phoenixServerInfo: undefined, status: ContainerStatusType.Disconnected, }; }