Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aarti-dashboard automation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohammed.shibili
aarti-dashboard automation
Commits
7a6e86fb
Commit
7a6e86fb
authored
Jan 24, 2024
by
mohammed.shibili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new changes in group dashboard
parent
7afc5a71
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
341 additions
and
62 deletions
+341
-62
.env
.env
+1
-1
arti auto.xlsx
arti auto.xlsx
+0
-0
log/EMS-Automation.log
log/EMS-Automation.log
+256
-0
scripts/core/handlers/dashboard_handler.py
scripts/core/handlers/dashboard_handler.py
+1
-1
scripts/core/handlers/widget_handler.py
scripts/core/handlers/widget_handler.py
+74
-57
scripts/services/dashboards.py
scripts/services/dashboards.py
+8
-2
widget.json
widget.json
+1
-1
No files found.
.env
View file @
7a6e86fb
...
...
@@ -25,7 +25,7 @@ UPLOAD_LOG_PATH=/DATA/Config/
BASE_URL=https://staging.unifytwin.com/
USER_ID=7BYVRyxnzE4MS33Gv8Y6eB
PROJECT_ID=project_437
LOGIN_TOKEN=
d102d0403da94627a812836c7e2a66f8
LOGIN_TOKEN=
864d35ba4d4f4473a2abd000f5b2ec24
NEW_BASE_URL=https://staging.unifytwin.com/
NEW_USER_ID=56jyuX7Z9M4HkoeGfTNJWk
...
...
arti auto.xlsx
View file @
7a6e86fb
No preview for this file type
log/EMS-Automation.log
View file @
7a6e86fb
...
...
@@ -913,3 +913,259 @@ TypeError: cannot unpack non-iterable NoneType object
2024-01-22 15:32:45 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-22 15:32:45 - INFO - [create_pyload(): 70] - service started in creating payload
2024-01-22 15:32:55 - INFO - [create_pyload(): 70] - service started in creating payload
2024-01-23 11:04:20 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:04:20 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:07:09 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:07:09 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:08:22 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:08:23 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:08:24 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:08:25 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:08:25 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:08:26 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:08:26 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> gkQMJox7HTgR868JMSg3NW
2024-01-23 11:08:26 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:08:26 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:08:38 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:08:50 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:08:50 - INFO - [get_group_widget(): 214] - service started in creating group widget
2024-01-23 11:08:50 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:08:50 - ERROR - [get_widget_details(): 32] - error while getting existing widget details string indices must be integers
2024-01-23 11:08:50 - ERROR - [create_pyload(): 209] - error while creating payload 'NoneType' object is not iterable
2024-01-23 11:08:50 - ERROR - [create_new_widgets(): 65] - error while creating new widgets cannot unpack non-iterable NoneType object
2024-01-23 11:08:50 - ERROR - [create_dashboard(): 67] - error while creating dashboard cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "E:\Arti dashboards\scripts\services\dashboards.py", line 48, in create_dashboard
widget_response, missing_tags = widget_handler.create_new_widgets(existing_widget, parameters_json,
TypeError: cannot unpack non-iterable NoneType object
2024-01-23 11:10:13 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:10:13 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:10:46 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:10:46 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:10:58 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:11:02 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:11:03 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:11:03 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:11:03 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:11:04 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:11:05 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> iXZcJc8Gg2ygiVNd9WrzsC
2024-01-23 11:11:05 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:11:05 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:11:16 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:11:27 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:11:27 - INFO - [get_group_widget(): 214] - service started in creating group widget
2024-01-23 11:14:05 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:14:05 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:14:31 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:14:34 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:14:35 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:14:35 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:14:35 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:14:37 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:14:37 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> kir8C5kHD5Xk9XSfD5WvWZ
2024-01-23 11:14:37 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:14:37 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:14:49 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:15:00 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:15:00 - INFO - [get_group_widget(): 214] - service started in creating group widget
2024-01-23 11:15:00 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:15:01 - ERROR - [create_pyload(): 209] - error while creating payload string indices must be integers
2024-01-23 11:15:01 - ERROR - [create_new_widgets(): 65] - error while creating new widgets cannot unpack non-iterable NoneType object
2024-01-23 11:15:01 - ERROR - [create_dashboard(): 67] - error while creating dashboard cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "E:\Arti dashboards\scripts\services\dashboards.py", line 48, in create_dashboard
widget_response, missing_tags = widget_handler.create_new_widgets(existing_widget, parameters_json,
TypeError: cannot unpack non-iterable NoneType object
2024-01-23 11:16:59 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:16:59 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:17:17 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:17:19 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:17:19 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:17:20 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:17:20 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:17:21 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:17:22 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> A6bpsBS8W9cAz4rvadR6JL
2024-01-23 11:17:22 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:17:22 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:17:32 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:17:43 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:17:43 - INFO - [get_group_widget(): 214] - service started in creating group widget
2024-01-23 11:17:43 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:17:44 - ERROR - [create_pyload(): 209] - error while creating payload string indices must be integers
2024-01-23 11:17:44 - ERROR - [create_new_widgets(): 65] - error while creating new widgets cannot unpack non-iterable NoneType object
2024-01-23 11:17:44 - ERROR - [create_dashboard(): 67] - error while creating dashboard cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "E:\Arti dashboards\scripts\services\dashboards.py", line 48, in create_dashboard
widget_response, missing_tags = widget_handler.create_new_widgets(existing_widget, parameters_json,
TypeError: cannot unpack non-iterable NoneType object
2024-01-23 11:19:15 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:19:15 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:19:29 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:19:31 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:19:32 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:19:32 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:19:32 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:19:33 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:19:34 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> UiVNciT9SC7yfbwRcoKNhz
2024-01-23 11:19:34 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:19:34 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:19:45 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:19:56 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:19:56 - INFO - [get_group_widget(): 215] - service started in creating group widget
2024-01-23 11:19:56 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:19:56 - ERROR - [create_pyload(): 210] - error while creating payload string indices must be integers
2024-01-23 11:19:56 - ERROR - [create_new_widgets(): 65] - error while creating new widgets cannot unpack non-iterable NoneType object
2024-01-23 11:19:56 - ERROR - [create_dashboard(): 67] - error while creating dashboard cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "E:\Arti dashboards\scripts\services\dashboards.py", line 48, in create_dashboard
widget_response, missing_tags = widget_handler.create_new_widgets(existing_widget, parameters_json,
TypeError: cannot unpack non-iterable NoneType object
2024-01-23 11:21:19 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:21:19 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:21:58 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:21:58 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:22:33 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:22:39 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:22:40 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:22:41 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:22:41 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:22:42 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:22:42 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> ENkr5VDM2qbsX8RzMAqKZZ
2024-01-23 11:22:42 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:22:42 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:22:54 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:23:06 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:23:14 - INFO - [get_group_widget(): 215] - service started in creating group widget
2024-01-23 11:23:34 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:24:59 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:24:59 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:25:26 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:25:29 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:25:30 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:25:31 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:25:31 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:25:32 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:25:32 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> jC2FP2cfGy9URWv4c4YZ5y
2024-01-23 11:25:32 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:25:32 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:25:44 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:25:55 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:25:55 - INFO - [get_group_widget(): 215] - service started in creating group widget
2024-01-23 11:25:55 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:34:23 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:34:23 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:34:34 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:34:39 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:34:40 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:34:40 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:34:40 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:34:41 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:34:41 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> AqRWCtwhPDtmTY4iSit4uv
2024-01-23 11:34:41 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:34:41 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:34:53 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:35:04 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:35:10 - INFO - [get_group_widget(): 215] - service started in creating group widget
2024-01-23 11:35:16 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:41:39 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:41:39 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:41:45 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:41:53 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:41:53 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:41:54 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:41:54 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:41:54 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:41:55 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> j97H2cKbxMQZqaVuyUcFKX
2024-01-23 11:41:55 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:41:55 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:42:07 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:42:17 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:42:17 - INFO - [get_group_widget(): 215] - service started in creating group widget
2024-01-23 11:42:17 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:44:06 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:44:06 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:44:50 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:44:50 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:45:29 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:45:33 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:45:34 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:45:34 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:45:34 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:45:35 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:45:36 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> f5FWpj8dUrtv6GM4vBmiP2
2024-01-23 11:45:36 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:45:36 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:45:47 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:45:59 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:46:29 - INFO - [get_group_widget(): 216] - service started in creating group widget
2024-01-23 11:46:50 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:51:51 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 11:51:51 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 11:52:22 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 11:52:23 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:52:23 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 11:52:24 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 11:52:24 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:52:26 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 11:52:26 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> 4sXXfLPGcwDBQpwcoYJUtc
2024-01-23 11:52:26 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 11:52:26 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:52:37 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:52:47 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 11:52:47 - INFO - [get_group_widget(): 216] - service started in creating group widget
2024-01-23 11:52:47 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 12:02:18 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 12:02:18 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 12:02:38 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 12:02:40 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:02:41 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 12:02:42 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 12:02:42 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:02:43 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:02:43 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> RAAKWD7Q4PZv54bZGrMPtU
2024-01-23 12:02:43 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 12:02:43 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:02:53 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:03:08 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:03:08 - INFO - [get_group_widget(): 216] - service started in creating group widget
2024-01-23 12:03:08 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 12:24:49 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 12:24:49 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 12:25:13 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 12:25:15 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:25:16 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 12:25:16 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 12:25:16 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:25:17 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:25:18 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> J88aKB6DLLvmqET8wrLtKu
2024-01-23 12:25:18 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 12:25:18 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:25:28 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:25:38 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:25:38 - INFO - [get_group_widget(): 216] - service started in creating group widget
2024-01-23 12:25:38 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 12:29:35 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 12:29:35 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:29:35 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 12:29:36 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 12:29:36 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:29:37 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 12:29:38 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> A9SqZYWVbASui8CjPi2XYT
2024-01-23 12:29:38 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 12:29:38 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 12:29:47 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 14:31:06 - INFO - [<module>(): 13] - ****Starting EMS-Automation ***
2024-01-23 14:31:06 - INFO - [<module>(): 38] - App Starting at 127.0.0.1:8000 with 1 workers.
2024-01-23 15:10:33 - INFO - [create_dashboard(): 30] - service started in creating dashboard
2024-01-23 15:10:38 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 15:10:39 - INFO - [get_widget_details(): 19] - service started in getting the widget data
2024-01-23 15:10:39 - INFO - [create_new_dashboard(): 37] - service started in creating new dashboard
2024-01-23 15:10:39 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 15:10:40 - INFO - [get_dashboard_details(): 14] - service started in getting the dashboard reference
2024-01-23 15:10:41 - INFO - [create_new_dashboard(): 51] - dashboard id >>>> JWVVNJjDbXEhzeP5phanB5
2024-01-23 15:10:41 - INFO - [create_new_widgets(): 37] - service started in creating new widgets
2024-01-23 15:10:41 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 15:10:50 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 15:11:00 - INFO - [create_pyload(): 71] - service started in creating payload
2024-01-23 15:11:00 - INFO - [get_group_widget(): 216] - service started in creating group widget
2024-01-23 15:11:00 - INFO - [get_widget_details(): 19] - service started in getting the widget data
scripts/core/handlers/dashboard_handler.py
View file @
7a6e86fb
...
...
@@ -50,7 +50,7 @@ class Dashboards:
dashboard_id
=
new_dashboard_list
.
get
(
'dashboard_id'
,
''
)
logger
.
info
(
f
'dashboard id >>>> {dashboard_id}'
)
if
dashboard_id
:
return
dashboard_id
return
dashboard_id
,
dashboard_name
else
:
return
False
except
Exception
as
e
:
...
...
scripts/core/handlers/widget_handler.py
View file @
7a6e86fb
...
...
@@ -32,7 +32,7 @@ class Widgets:
logger
.
error
(
f
'error while getting existing widget details {e}'
)
@
staticmethod
def
create_new_widgets
(
existing_widget
,
parameters_json
,
dashboard_id
):
def
create_new_widgets
(
existing_widget
,
parameters_json
,
dashboard_id
,
new_dashboard_details
):
try
:
logger
.
info
(
f
'service started in creating new widgets'
)
count
=
0
...
...
@@ -44,7 +44,8 @@ class Widgets:
existing_widget_details
=
[
elem
for
elem
in
existing_widget_details
if
elem
not
in
group_elements
]
existing_widget_details
.
extend
(
group_elements
)
for
widget
in
existing_widget_details
:
new_widget_metadata
,
missing_tags
=
Widgets
()
.
create_pyload
(
widget
,
parameters_json
)
new_widget_metadata
,
missing_tags
=
Widgets
()
.
create_pyload
(
widget
,
parameters_json
,
new_dashboard_details
)
widget_payload
=
{
"dashboard_id"
:
dashboard_id
,
"widget_data"
:
new_widget_metadata
,
...
...
@@ -64,7 +65,7 @@ class Widgets:
logger
.
error
(
f
'error while creating new widgets {e}'
)
@
staticmethod
def
create_pyload
(
widget
,
parameters_json
):
def
create_pyload
(
widget
,
parameters_json
,
new_dashboard_details
):
try
:
count
=
0
logger
.
info
(
f
'service started in creating payload'
)
...
...
@@ -73,13 +74,13 @@ class Widgets:
new_filter_parameters
=
[]
missing_tags
=
[]
new_widget_payload
=
widget
# filter_list_old = new_widget_payload["cData"]["chartOptions"]["filter"]["filterList"][0]["value"]
new_widget_payload
.
pop
(
'widget_id'
)
if
widget
[
"cData"
][
"chartOptions"
][
"chartType"
]
==
"group"
:
Widgets
()
.
get_group_widget
(
widget
,
parameters_json
)
else
:
if
new_widget_payload
.
get
(
"editMode"
):
new_widget_payload
.
pop
(
'editMode'
)
if
widget
[
"cData"
][
"chartOptions"
][
"chartType"
]
==
"group"
:
group_widget
=
Widgets
()
.
get_group_widget
(
new_widget_payload
,
parameters_json
,
new_dashboard_details
)
return
group_widget
,
missing_tags
else
:
hierarchy_data
,
filter_data
=
create_hierarchy
(
parameters_json
)
yaxis_parameters
=
widget
[
"cData"
][
"chartOptions"
][
"yaxis"
]
hierarchy_details_url
=
f
'{Base_path.BASE_URL}{RequestEndpoints.hierarchy_details}'
...
...
@@ -102,7 +103,8 @@ class Widgets:
current_site_level
=
{}
for
select_hierarchy
in
filter_data
:
for
data_
in
site_level_hierarchy_data
:
if
data_
[
"name"
]
==
select_hierarchy
[
"filter"
]
and
select_hierarchy
[
"Existing Widget Name"
]
==
\
if
data_
[
"name"
]
==
select_hierarchy
[
"filter"
]
and
select_hierarchy
[
"Existing Widget Name"
]
==
\
widget
[
"title"
]:
widget_title
=
select_hierarchy
[
"New widget Name"
]
current_site_level
=
data_
...
...
@@ -119,7 +121,8 @@ class Widgets:
flag
=
0
for
data
in
yaxis_parameters
:
for
tag_name
in
hierarchy_data
:
if
tag_name
.
get
(
"Tag Name"
,
""
)
==
tags
[
"label"
]
and
tag_name
[
"Existing Widget Name"
]
==
widget
[
if
tag_name
.
get
(
"Tag Name"
,
""
)
==
tags
[
"label"
]
and
tag_name
[
"Existing Widget Name"
]
==
\
widget
[
"title"
]:
count
+=
1
print
(
count
)
...
...
@@ -192,24 +195,38 @@ class Widgets:
for
tags
in
hierarchy_details_list_old
:
if
params
==
tags
[
"value"
]:
params_label
.
append
(
tags
[
"label"
])
# for label in params_label:
# if label in filtered_hierarchy_data:
# changed_params_label.append(filtered_hierarchy_data[label])
if
changed_params_label
:
for
changed_label
in
changed_params_label
:
for
tags
in
hierarchy_details_list
:
if
changed_label
==
tags
[
"label"
]:
new_parameters
.
append
(
tags
[
"value"
])
new_widget_payload
[
"cData"
][
"chartOptions"
][
"xaxis"
][
"aggregations"
][
0
][
"parameters"
]
=
new_parameters
new_widget_payload
[
"cData"
][
"chartOptions"
][
"xaxis"
][
"aggregations"
][
0
][
"parameters"
]
=
new_parameters
return
new_widget_payload
,
missing_tags
except
Exception
as
e
:
logger
.
error
(
f
'error while creating payload {e}'
)
pass
@
staticmethod
def
get_group_widget
(
widget
,
parameters_json
):
def
get_group_widget
(
widget
,
parameters_json
,
new_dashboard_details
):
try
:
logger
.
info
(
f
'service started in creating group widget'
)
widgets_to_add
=
[]
widget_title
=
""
for
data
in
parameters_json
:
if
data
[
"Tag Name"
]
==
"Group Widget"
:
print
(
"tbd"
)
widget
[
"cData"
][
"widgetsList"
]
=
"list"
widgets_to_add
=
data
[
"Widget Lists"
]
.
split
(
','
)
widget_title
=
data
[
"New widget Name"
]
created_widgets
=
Widgets
()
.
get_widget_details
(
new_dashboard_details
)
widget_id
=
[]
for
each_widget
in
created_widgets
[
"widget"
][
"wcData"
]:
for
widget_name
in
widgets_to_add
:
if
each_widget
[
"title"
]
==
widget_name
:
widget_id
.
append
(
each_widget
[
"widget_id"
])
widget
[
"cData"
][
"chartOptions"
][
"widgetsList"
]
=
widget_id
widget
[
"cData"
][
"chartOptions"
][
"grpName"
]
=
widget_title
widget
[
"title"
]
=
widget_title
widget
[
"description"
]
=
widget_title
return
widget
except
Exception
as
e
:
logger
.
error
(
f
'error in creating payload for group widget {e}'
)
scripts/services/dashboards.py
View file @
7a6e86fb
...
...
@@ -38,10 +38,16 @@ async def create_dashboard(file: UploadFile = File(...), sheet_name: str = Form(
if
existing_dashboards
:
existing_widget
=
widget_handler
.
get_widget_details
(
existing_dashboards
)
if
existing_widget
:
dashboard_response
=
dashboard_handler
.
create_new_dashboard
(
existing_dashboards
,
new_dashboard_name
)
dashboard_response
,
new_dashboard_name
=
dashboard_handler
.
create_new_dashboard
(
existing_dashboards
,
new_dashboard_name
)
if
dashboard_response
:
new_dashboard_details
=
{
"dashboard_id"
:
dashboard_response
,
"name"
:
new_dashboard_name
}
widget_response
,
missing_tags
=
widget_handler
.
create_new_widgets
(
existing_widget
,
parameters_json
,
dashboard_response
)
dashboard_response
,
new_dashboard_details
)
if
widget_response
or
missing_tags
:
return
{
"widget"
:
f
'widget number:{widget_response} missing'
,
...
...
widget.json
View file @
7a6e86fb
[{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Moisture Removal Column C-1122:Running Status(P1127)"
,
"Label"
:
"Running Status"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Moisture Removal Column C-1122:Outlet Flow(FIC11295)"
,
"Label"
:
"Outlet Flow"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Moisture Removal Column C-1122:Bottom Temperature(TIC11225)"
,
"Label"
:
"Bottom Temperature"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Moisture Removal Column C-1122:Middle Top Temperature(TIC11222)"
,
"Label"
:
"Middle Top Temp"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Moisture Removal Column C-1122:Top Flow(FIC11269)"
,
"Label"
:
"Top Flow"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Moisture Removal Column C-1122:Differential Pressure(PDI11223)"
,
"Label"
:
"Differential Pressure"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>66 TPH Boiler>Steam And Water System>Steam Prs Station 2PIC0303:Pressure(2PIC0303)"
,
"Label"
:
"Pressure"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"Test 1"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Vaccum Pump System S607:Current(S607_AMP)"
,
"Label"
:
"Current"
,
"Existing Widget Name"
:
"Widget2"
,
"New widget Name"
:
"Test 2"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Vaccum Pump System S607:Pressure(PT-1)"
,
"Label"
:
"Pressure"
,
"Existing Widget Name"
:
"Widget2"
,
"New widget Name"
:
"Test 2"
,
"Null"
:
"Automation test KPI"
},
{
"Tag Name"
:
"NEO>MEA Plant>Reaction Section>Catalyst Prepeartion Reactor R-1005:Inlet valve(HS10035)"
,
"Label"
:
"Inlet valve"
,
"Existing Widget Name"
:
"Widget2"
,
"New widget Name"
:
"Test 2"
,
"Null"
:
"Automation test KPI"
}]
\ No newline at end of file
[{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Vaccum Pump System S607:Running Status(S607)"
,
"Label"
:
"Running Status"
,
"Existing Widget Name"
:
"Widget"
,
"New widget Name"
:
"test Widget"
,
"Widget Lists"
:
NaN
},
{
"Tag Name"
:
"NEO>MEA Plant>Column Section>Vaccum Pump System S607:Valve Status 1(XV-1)"
,
"Label"
:
"Valve Status"
,
"Existing Widget Name"
:
"widget 2"
,
"New widget Name"
:
"new test"
,
"Widget Lists"
:
NaN
},
{
"Tag Name"
:
"Group Widget"
,
"Label"
:
NaN
,
"Existing Widget Name"
:
"Test group"
,
"New widget Name"
:
"new test group"
,
"Widget Lists"
:
"test Widget,new test"
}]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment