!11 Modify the logic of deleting the machine
From: @jxy_git Reviewed-by: @yangzhao_kl Signed-off-by: @yangzhao_kl
This commit is contained in:
commit
2ecef96cf6
42
Modify-the-logic-of-deleting-the-machine.patch
Normal file
42
Modify-the-logic-of-deleting-the-machine.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From aba5560cb48950b52879ffbe8c0283a81d77b889 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wubijie <wubijie@kylinos.cn>
|
||||||
|
Date: Mon, 15 Apr 2024 14:53:12 +0800
|
||||||
|
Subject: [PATCH] Modify the logic of deleting the machine
|
||||||
|
|
||||||
|
---
|
||||||
|
src/app/server/service/internal/dao/batchmanagerdao.go | 5 +++++
|
||||||
|
src/app/server/service/machine/machinemanager.go | 5 +++++
|
||||||
|
2 files changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/app/server/service/internal/dao/batchmanagerdao.go b/src/app/server/service/internal/dao/batchmanagerdao.go
|
||||||
|
index e861c509..54d9e007 100644
|
||||||
|
--- a/src/app/server/service/internal/dao/batchmanagerdao.go
|
||||||
|
+++ b/src/app/server/service/internal/dao/batchmanagerdao.go
|
||||||
|
@@ -84,3 +84,8 @@ func GetMachineID(BatchID int) ([]uint, error) {
|
||||||
|
err := mysqlmanager.MySQL().Model(BatchMachines{}).Select("machine_node_id").Where("batch_id=?", BatchID).Find(&machineids).Error
|
||||||
|
return machineids, err
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+func DeleteMachineBatch(NodeID int) error {
|
||||||
|
+ var bm BatchMachines
|
||||||
|
+ return mysqlmanager.MySQL().Where("machine_node_id=?", NodeID).Delete(&bm).Error
|
||||||
|
+}
|
||||||
|
diff --git a/src/app/server/service/machine/machinemanager.go b/src/app/server/service/machine/machinemanager.go
|
||||||
|
index 8a87ba36..2bf2ca35 100644
|
||||||
|
--- a/src/app/server/service/machine/machinemanager.go
|
||||||
|
+++ b/src/app/server/service/machine/machinemanager.go
|
||||||
|
@@ -76,6 +76,11 @@ func DeleteMachine(Deluuid []string) map[string]string {
|
||||||
|
machinelist[machinedeluuid] = err.Error()
|
||||||
|
}
|
||||||
|
if node.ID != 0 {
|
||||||
|
+ //删除机器批次关系表数据
|
||||||
|
+ if err := dao.DeleteMachineBatch(node.ID); err != nil {
|
||||||
|
+ machinelist[machinedeluuid] = err.Error()
|
||||||
|
+ continue
|
||||||
|
+ }
|
||||||
|
if err := dao.DeleteMachine(machinedeluuid); err != nil {
|
||||||
|
machinelist[machinedeluuid] = err.Error()
|
||||||
|
}
|
||||||
|
--
|
||||||
|
Gitee
|
||||||
|
|
||||||
29
Open-extension_btns-permission.patch
Normal file
29
Open-extension_btns-permission.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From d0a943fe0636e7a910b4e83c1688d4a30fa686fa Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhaozhenfang <zhaozhenfang@kylinos.cn>
|
||||||
|
Date: Wed, 15 May 2024 17:39:25 +0800
|
||||||
|
Subject: [PATCH] open extension_btns permission
|
||||||
|
|
||||||
|
---
|
||||||
|
frontend/src/views/Cluster/Cluster.vue | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/frontend/src/views/Cluster/Cluster.vue b/frontend/src/views/Cluster/Cluster.vue
|
||||||
|
index 4684889e..50c766c4 100644
|
||||||
|
--- a/frontend/src/views/Cluster/Cluster.vue
|
||||||
|
+++ b/frontend/src/views/Cluster/Cluster.vue
|
||||||
|
@@ -30,9 +30,10 @@
|
||||||
|
</auth-button>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-for="item in extButtons">
|
||||||
|
- <auth-button :auth="item.permission" :show="true" @click="handlePluginAPI(item.url)">
|
||||||
|
+ <!-- <auth-button :auth="'button/' + item.permission" :show="true" @click="handlePluginAPI(item.url)">
|
||||||
|
{{ item.name }}
|
||||||
|
- </auth-button>
|
||||||
|
+ </auth-button> -->
|
||||||
|
+ <el-button @click="handlePluginAPI(item.url)">{{ item.name }}</el-button>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
--
|
||||||
|
Gitee
|
||||||
|
|
||||||
Binary file not shown.
10
PilotGo.spec
10
PilotGo.spec
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: PilotGo
|
Name: PilotGo
|
||||||
Version: 2.1.0
|
Version: 2.1.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: PilotGo is a plugable operation platform written in go
|
Summary: PilotGo is a plugable operation platform written in go
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
URL: https://gitee.com/openeuler/PilotGo
|
URL: https://gitee.com/openeuler/PilotGo
|
||||||
@ -12,6 +12,8 @@ Source0: https://gitee.com/openeuler/PilotGo/repository/archive/v%{versio
|
|||||||
# run 'yarn install and yarn build' in it
|
# run 'yarn install and yarn build' in it
|
||||||
# tar -czvf PilotGo-web.tar.gz ../frontend/dist/
|
# tar -czvf PilotGo-web.tar.gz ../frontend/dist/
|
||||||
Source1: PilotGo-web.tar.gz
|
Source1: PilotGo-web.tar.gz
|
||||||
|
Patch0: Modify-the-logic-of-deleting-the-machine.patch
|
||||||
|
Patch1: Open-extension_btns-permission.patch
|
||||||
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: golang
|
BuildRequires: golang
|
||||||
@ -35,6 +37,8 @@ PilotGo agent.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n %{name}-v%{version}
|
%setup -n %{name}-v%{version}
|
||||||
|
%patch 0 -p1
|
||||||
|
%patch 1 -p1
|
||||||
tar -xzvf %{SOURCE1}
|
tar -xzvf %{SOURCE1}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -92,6 +96,10 @@ install -D -m 0644 scripts/service/PilotGo-agent.service %{buildroot}%{_unitdir}
|
|||||||
%{_unitdir}/PilotGo-agent.service
|
%{_unitdir}/PilotGo-agent.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 16 2024 jianxinyu <jiangxinyu@kylinos.cn> - 2.1.0-2
|
||||||
|
- Modify the logic of deleting the machine
|
||||||
|
- Open extension_btns permission
|
||||||
|
|
||||||
* Wed Apr 03 2024 jianxinyu <jiangxinyu@kylinos.cn> - 2.1.0-1
|
* Wed Apr 03 2024 jianxinyu <jiangxinyu@kylinos.cn> - 2.1.0-1
|
||||||
- Update package to version 2.1.0
|
- Update package to version 2.1.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user