devide the detection report into mutiple pages
This commit is contained in:
parent
c9dc3b7ec6
commit
93bf0ac093
70
0084-divide-detection-report-into-mutiple-sheet-pages.patch
Normal file
70
0084-divide-detection-report-into-mutiple-sheet-pages.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 7decf366a655e8c7c93d165ce007cc37231a3fcc Mon Sep 17 00:00:00 2001
|
||||
From: xuezhixin <xuezhixin@uniontech.com>
|
||||
Date: Mon, 13 Nov 2023 14:49:44 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E6=8A=A5=E5=91=8A=E7=9A=84?=
|
||||
=?UTF-8?q?=E5=88=86=E4=B8=BA=E5=A4=9A=E4=B8=AAsheet=E9=A1=B5?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
sysmig_agent/Abisystmcompchk.py | 46 +++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
||||
index 50bd201..0b5c519 100644
|
||||
--- a/sysmig_agent/Abisystmcompchk.py
|
||||
+++ b/sysmig_agent/Abisystmcompchk.py
|
||||
@@ -772,3 +772,49 @@ def write_summary_data(report_name_summary, index, flag):
|
||||
summary_sheet.write(2, 2, get_cur_sys_version())
|
||||
|
||||
summary_wb.save(report_name_summary)
|
||||
+
|
||||
+
|
||||
+# Deal report of sheet by num value
|
||||
+def switch_write_migrate_report(report_name, num, flag):
|
||||
+ # sheet[0]-system info: write data:row|column|value
|
||||
+ if num == 0:
|
||||
+ if flag == '0':
|
||||
+ migration_value_list = get_cur_sys_info_list()
|
||||
+ elif flag == '1':
|
||||
+ migration_value_list = get_migration_sys_info()
|
||||
+ write_row_and_column(report_name, migration_value_list, num)
|
||||
+ # sheet[1]-rpm package
|
||||
+ elif num == 1:
|
||||
+ with open(current_system_unique, 'r') as fr_cur:
|
||||
+ column_cur_list = fr_cur.readlines()
|
||||
+ write_column_by_column(report_name, column_cur_list, 3, 0, num)
|
||||
+
|
||||
+ if flag == '0':
|
||||
+ # sheet[1]:2-column
|
||||
+ with open(migration_system_total, 'r') as fr_migr:
|
||||
+ column_migr_list = fr_migr.readlines()
|
||||
+ write_column_by_column(report_name, column_migr_list, 3, 1, num)
|
||||
+ elif flag == '1':
|
||||
+ # sheet[1]:2-column
|
||||
+ with open(migration_system_install, 'r') as fr_migr:
|
||||
+ column_migr_list = fr_migr.readlines()
|
||||
+ write_column_by_column(report_name, column_migr_list, 3, 1, num)
|
||||
+
|
||||
+ # sheet[1]:3-row
|
||||
+ with open(migration_system_total, 'r') as fr_migr:
|
||||
+ column_migr_list = fr_migr.readlines()
|
||||
+ write_column_by_column(report_name, column_migr_list, 3, 2, num)
|
||||
+
|
||||
+ # summary data write to sheet[1]
|
||||
+ write_summary_data(report_name, num, flag)
|
||||
+
|
||||
+ # sheet[2]-ABI compartion
|
||||
+ elif num == 2:
|
||||
+ with open(abi_comp_chk, 'r') as fr_comp:
|
||||
+ column_comp_list = fr_comp.readlines()
|
||||
+ write_column_by_column(report_name, column_comp_list, 1, 0, num)
|
||||
+ # sheet[3]-ABI Incompartion
|
||||
+ elif num == 3:
|
||||
+ with open(abi_incomp_chk, 'r') as fr_incomp:
|
||||
+ column_incomp_list = fr_incomp.readlines()
|
||||
+ write_row_by_row(report_name, column_incomp_list, 2, 0, num)
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 83
|
||||
Release: 84
|
||||
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
|
||||
@ -90,7 +90,7 @@ Patch80: 0080-write-the-data-of-each-row-into-report.patch
|
||||
Patch81: 0081-add-interface-to-export-migration-check-report.patch
|
||||
Patch82: 0082-write-the-data-of-each-row-and-column-into-report.patch
|
||||
Patch83: 0083-add-basic-summary-information-to-the-report.patch
|
||||
|
||||
Patch84: 0084-divide-detection-report-into-mutiple-sheet-pages.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -189,6 +189,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-84
|
||||
- 0084-divide-detection-report-into-mutiple-sheet-pages.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-83
|
||||
- 0083-add-basic-summary-information-to-the-report.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user