!118 get checking envirnment process
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
100a10d874
56
0065-get-checking-envirnmnet-process.patch
Normal file
56
0065-get-checking-envirnmnet-process.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 738918f6c6a3fe1e6ae6c8b7f125feb132936c21 Mon Sep 17 00:00:00 2001
|
||||
From: lixin <lixinb@uniontech.com>
|
||||
Date: Mon, 13 Nov 2023 10:36:32 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=8E=AF=E5=A2=83=E6=A3=80?=
|
||||
=?UTF-8?q?=E6=B5=8B=E8=BF=9B=E5=BA=A6?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
views/server.py | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/views/server.py b/views/server.py
|
||||
index b13d908..c959c2a 100644
|
||||
--- a/views/server.py
|
||||
+++ b/views/server.py
|
||||
@@ -264,4 +264,32 @@ def get_repo_data(data):
|
||||
data['centos8_aarch64'] = 'faild'
|
||||
|
||||
json_data = json.dumps(data)
|
||||
- return json_data
|
||||
\ No newline at end of file
|
||||
+ return json_data
|
||||
+
|
||||
+
|
||||
+def get_environment_data(data):
|
||||
+ """
|
||||
+ 获取环境检查进度
|
||||
+ :return:
|
||||
+ """
|
||||
+ get_environment_pro_sql = "select agent_ip,task_progress,task_status from agent_task;"
|
||||
+ progress = DBHelper().execute(get_environment_pro_sql).fetchall()
|
||||
+ res = {}
|
||||
+ info_list = []
|
||||
+ finall_progress = []
|
||||
+ for i in progress:
|
||||
+ sql = "select agent_id from agent_info where agent_ip='%s' and agent_online_status=0 and repo_status=0 " \
|
||||
+ "and agent_storage>=10 and agent_migration_os is null;" % i[0]
|
||||
+ get_sql = DBHelper().execute(sql).fetchall()
|
||||
+ if get_sql:
|
||||
+ finall_progress.append(list(i))
|
||||
+
|
||||
+ info_dict_keys_list = ['agent_ip', 'task_progress', 'task_status']
|
||||
+ for i in finall_progress:
|
||||
+ info_list.append(dict(zip(info_dict_keys_list, list(i))))
|
||||
+
|
||||
+ res['info'] = info_list
|
||||
+ res['num'] = len(finall_progress)
|
||||
+
|
||||
+ json_res = json.dumps(res)
|
||||
+ return json_res
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 64
|
||||
Release: 65
|
||||
License: MulanPSL-2.0
|
||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
@ -71,6 +71,7 @@ Patch61: 0061-detection-abi-log.patch
|
||||
Patch62: 0062-add-detection-ELF-content-in-abi-file.patch
|
||||
Patch63: 0063-add-compare-with-package-result-in-abi-report.patch
|
||||
Patch64: 0064-get-system-package-information-in-rpm-database.patch
|
||||
Patch65: 0065-get-checking-envirnmnet-process.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
@ -170,6 +171,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-65
|
||||
- 0065-get-checking-envirnmnet-process.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-64
|
||||
- 0064-get-system-package-information-in-rpm-database.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user