This repository was archived by the owner on Jan 27, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
classisland.managementserver.client/src Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments