separate server run bindings from deployment targets
This commit is contained in:
@@ -176,7 +176,9 @@ describe("first-party console pages", () => {
|
||||
expect(serverDeploymentWorkflowSource).toContain("选择目标");
|
||||
expect(serverDeploymentWorkflowSource).toContain("部署方式");
|
||||
expect(serverDeploymentWorkflowSource).toContain("相关配置");
|
||||
expect(serverDeploymentWorkflowSource).toContain("仅保存为草稿");
|
||||
expect(serverDeploymentWorkflowSource).toContain("选择部署目标");
|
||||
expect(serverDeploymentWorkflowSource).toContain("专属 Run");
|
||||
expect(serverDeploymentWorkflowSource).toContain("保存草稿并准备专属 Run");
|
||||
expect(serverDeploymentWorkflowSource).toContain("执行目录(可选)");
|
||||
expect(serverDeploymentWorkflowSource).toContain("默认使用服务器目录");
|
||||
expect(serverDeploymentWorkflowSource).toContain("安装目录{isScum ? \"(必填)\" : \"(可选)\"}");
|
||||
|
||||
@@ -157,11 +157,11 @@ export function ServersPage({ session, operations, onNavigate }: PageComponentPr
|
||||
const operationId = operations.begin({ intent: "创建服务器", targetKind: "server", targetId: "platform", requester: session.displayName });
|
||||
try {
|
||||
const result = await platformApiClient.createServerWorkflow(serverCreateRequestFromForm(nextForm));
|
||||
operations.succeed(operationId, result.job.id ? `已创建实例 ${result.instance.id},安装任务 ${result.job.id} 已派发` : `已保存草稿 ${result.instance.id};可在 Run 注册后绑定并部署。`, result.job.id ? result.job : undefined);
|
||||
operations.succeed(operationId, result.job.id ? `已创建实例 ${result.instance.id},安装任务 ${result.job.id} 已派发` : `已保存草稿 ${result.instance.id};请生成并注册专属 Run 后再部署。`, result.job.id ? result.job : undefined);
|
||||
setForm(defaultServerCreateForm(plugins, endpoints));
|
||||
setShowCreate(false);
|
||||
await refresh();
|
||||
if (result.job.id) onNavigate("serverDetail", { serverId: result.instance.id, routeKey: "run-builder" });
|
||||
onNavigate("serverDetail", { serverId: result.instance.id, routeKey: "run-builder" });
|
||||
} catch (error) {
|
||||
operations.fail(operationId, error instanceof Error ? error.message : "创建失败", operationId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user