add missed file and better cli output

(cherry picked from commit 5ee4ad66359f2d27fd736aee9b9364cf67526019)
This commit is contained in:
zhuyuncheng 2021-09-18 14:43:20 +08:00 committed by openeuler-sync-bot
parent 015e747f9f
commit 27567476d1
2 changed files with 60 additions and 2 deletions

View File

@ -0,0 +1,54 @@
From 35907042fbdbe7949671cb508ee4690d91e27e0b Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Sat, 18 Sep 2021 14:33:03 +0800
Subject: [PATCH] add missed file and better cli output
---
aops-cli/aops_cli/commands/task_cmd.py | 4 ++--
aops-utils/aops_utils/excel2dict/__init__.py | 12 ++++++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 aops-utils/aops_utils/excel2dict/__init__.py
diff --git a/aops-cli/aops_cli/commands/task_cmd.py b/aops-cli/aops_cli/commands/task_cmd.py
index 7d918e0..cd72b8c 100644
--- a/aops-cli/aops_cli/commands/task_cmd.py
+++ b/aops-cli/aops_cli/commands/task_cmd.py
@@ -23,7 +23,7 @@ from aops_utils.restful.helper import make_manager_url
from aops_utils.restful.response import MyResponse
from aops_utils.restful.status import SUCCEED
from aops_utils.cli_utils import add_page, cli_request, add_access_token, add_query_args
-from aops_utils.cli_utils import request_without_print, print_row_from_result
+from aops_utils.cli_utils import request_without_print, pretty_json
class TaskCommand(BaseCommand):
@@ -151,7 +151,7 @@ class TaskCommand(BaseCommand):
result = request_without_print('POST', manager_url, pyload, header, params.access_token)
task_infos = result.pop('task_infos', [])
print(result)
- print_row_from_result(task_infos)
+ print(pretty_json(task_infos))
@staticmethod
def manage_requests_delete(**kwargs):
diff --git a/aops-utils/aops_utils/excel2dict/__init__.py b/aops-utils/aops_utils/excel2dict/__init__.py
new file mode 100644
index 0000000..e90ecf9
--- /dev/null
+++ b/aops-utils/aops_utils/excel2dict/__init__.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python3
+# ******************************************************************************
+# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+# licensed under the Mulan PSL v2.
+# You can use this software according to the terms and conditions of the Mulan PSL v2.
+# You may obtain a copy of Mulan PSL v2 at:
+# http://license.coscl.org.cn/MulanPSL2
+# THIS SOFTWARE IS PROVIDED ON AN 'AS IS' BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
+# PURPOSE.
+# See the Mulan PSL v2 for more details.
+# ******************************************************************************/
--
2.30.0

View File

@ -1,12 +1,12 @@
Name: A-Ops Name: A-Ops
Version: v1.1.0 Version: v1.1.0
Release: 1 Release: 2
Summary: The intelligent ops toolkit for openEuler Summary: The intelligent ops toolkit for openEuler
License: MulanPSL2 License: MulanPSL2
URL: https://gitee.com/openeuler/A-Ops URL: https://gitee.com/openeuler/A-Ops
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Source1: A-Ops-web-node-modules.tar.gz Source1: A-Ops-web-node-modules.tar.gz
patch0001: 0001-add-missed-file-and-better-cli-output.patch
# build for gopher # build for gopher
BuildRequires: cmake gcc-c++ yum elfutils-devel clang >= 10.0.1 llvm libconfig-devel BuildRequires: cmake gcc-c++ yum elfutils-devel clang >= 10.0.1 llvm libconfig-devel
@ -167,6 +167,7 @@ website for A-Ops, deployed by Nginx
%prep %prep
%setup %setup
%setup -T -D -a 1 %setup -T -D -a 1
%patch0001 -p1
cp -r A-Ops-web-node-modules/node_modules aops-web/ cp -r A-Ops-web-node-modules/node_modules aops-web/
%build %build
@ -488,6 +489,9 @@ fi
%changelog %changelog
* Sat Sep 18 2021 zhuyuncheng<zhuyuncheng@huawei.com> - v1.1.0-2
- add missed file and better cli output
* Fri Sep 17 2021 chemingdao<chemingdao@huawei.com> - v1.1.0-1 * Fri Sep 17 2021 chemingdao<chemingdao@huawei.com> - v1.1.0-1
- New release 1.1.0, bug fix and UI beautify. - New release 1.1.0, bug fix and UI beautify.
- 1. Simplify gala-spider UI display. - 1. Simplify gala-spider UI display.