Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 062780e

Browse files
committed
feat: 重启实例
1 parent 9cc25e2 commit 062780e

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

classisland.managementserver.client/src/router/modules/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const routes: Array<RouteRecordRaw> = [
2929
{
3030
path: 'reboot',
3131
name: `${routeName}_reboot`,
32-
component: () => import("@/views/commands/broadcast/index.vue"),
32+
component: () => import("@/views/commands/reboot/index.vue"),
3333
meta: {
3434
title: '重启实例',
3535
icon: renderIcon(ReloadOutlined)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<script setup lang="ts">
2+
import {ref} from "vue";
3+
import {ObjectsAssignee} from "@/api/globals";
4+
import {useMessage} from "naive-ui";
5+
6+
const targets = ref<Array<ObjectsAssignee>>([]);
7+
const isSaving = ref(false);
8+
const message = useMessage();
9+
const formRef = ref();
10+
11+
async function submit() {
12+
isSaving.value = true;
13+
try {
14+
await Apis.clientcommanddeliver.post_api_v1_client_commands_restart_app({
15+
data: {
16+
targets: targets.value
17+
}
18+
});
19+
message.success("发送成功");
20+
} finally {
21+
isSaving.value = false;
22+
}
23+
}
24+
</script>
25+
26+
<template>
27+
<n-card title="重启实例">
28+
<p class="mb-4">此操作将重启目标 ClassIsland 实例。</p>
29+
<n-form style="max-width: 700px" class="mx-auto"
30+
label-placement="left" label-width="auto" ref="formRef">
31+
<n-form-item label="目标">
32+
<AssigneeList v-model:value="targets"/>
33+
</n-form-item>
34+
35+
<n-form-item :show-label="false">
36+
<n-button type="primary" round @click="submit" :loading="isSaving">发送</n-button>
37+
</n-form-item>
38+
</n-form>
39+
</n-card>
40+
</template>
41+
42+
<style lang="less">
43+
44+
</style>

0 commit comments

Comments
 (0)