Integrate SCUM real ops workflows
This commit is contained in:
@@ -11,7 +11,6 @@ import {
|
||||
runtimeDependencyStages,
|
||||
runtimeDownloadStages,
|
||||
runtimeKeyResetStages,
|
||||
runtimeLogStages,
|
||||
runtimeRunBuildStages,
|
||||
runtimeUpdateStages,
|
||||
useRuntimeTaskController
|
||||
@@ -33,7 +32,6 @@ import { filterServerCards, serverIsOnline, type ServerCardView, type ServerStat
|
||||
import {
|
||||
clientManagerBuildRequest,
|
||||
dependencyJobRequest,
|
||||
logBackfillRequest,
|
||||
runDistributionGenerateRequest,
|
||||
runUpdateRequest,
|
||||
serverCreateRequestFromForm,
|
||||
@@ -367,8 +365,7 @@ export function ServersPage({ session, operations, onNavigate }: PageComponentPr
|
||||
const job = await platformApiClient.installDependencies(instance.id, dependencyJobRequest(instance.id, probe.key, plan.key, plan.digest));
|
||||
return `依赖安装任务已排队,job ${job.id}`;
|
||||
}
|
||||
const job = await platformApiClient.requestLogBackfill(instance.id, logBackfillRequest(instance.id, defaults.logSourceKey));
|
||||
return `历史日志回填任务已排队,job ${job.id}`;
|
||||
throw new Error("该运行操作已下线");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -677,8 +674,7 @@ type ServerQuickRuntimeAction =
|
||||
| "reset-run-key"
|
||||
| "generate-client-manager"
|
||||
| "dependencies-check"
|
||||
| "dependencies-install"
|
||||
| "historical-logs";
|
||||
| "dependencies-install";
|
||||
|
||||
async function requireQuickRuntimeActionAvailable(serverInstanceId: string, action: ServerQuickRuntimeAction): Promise<void> {
|
||||
const runtimeActions = await platformApiClient.getServerRuntimeActions(serverInstanceId);
|
||||
@@ -917,7 +913,7 @@ const serverQuickActionGroups: Array<{ label: string; actions: ServerQuickRuntim
|
||||
},
|
||||
{
|
||||
label: "诊断维护",
|
||||
actions: ["dependencies-check", "dependencies-install", "historical-logs"]
|
||||
actions: ["dependencies-check", "dependencies-install"]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -937,8 +933,6 @@ function quickRuntimeActionLabel(action: ServerQuickRuntimeAction): string {
|
||||
return "依赖检查";
|
||||
case "dependencies-install":
|
||||
return "依赖安装";
|
||||
case "historical-logs":
|
||||
return "历史日志";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -961,7 +955,7 @@ function quickRuntimeStages(action: ServerQuickRuntimeAction) {
|
||||
if (action === "dependencies-check" || action === "dependencies-install") {
|
||||
return runtimeDependencyStages;
|
||||
}
|
||||
return runtimeLogStages;
|
||||
return runtimeDependencyStages;
|
||||
}
|
||||
|
||||
function quickRuntimeExecuteStageIndex(action: ServerQuickRuntimeAction): number {
|
||||
@@ -990,8 +984,7 @@ function quickRuntimeDefaultsForPlugin(pluginId: string) {
|
||||
clientProfileKey: isScum ? "scum-client-manager" : "client-manager",
|
||||
repositoryUrl: isScum ? "https://github.com/F88888/scum_client.git" : "https://github.com/example/client-manager.git",
|
||||
probeKey: isScum ? "steamcmd" : "java-21",
|
||||
installPlanKey: isScum ? "install-steamcmd-linux" : "install-java-linux",
|
||||
logSourceKey: isScum ? "scum-server-events" : "latest-log"
|
||||
installPlanKey: isScum ? "install-steamcmd-linux" : "install-java-linux"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user