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
Expand all
Hide 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/
...
@@ -25,7 +25,7 @@ UPLOAD_LOG_PATH=/DATA/Config/
BASE_URL=https://staging.unifytwin.com/
BASE_URL=https://staging.unifytwin.com/
USER_ID=7BYVRyxnzE4MS33Gv8Y6eB
USER_ID=7BYVRyxnzE4MS33Gv8Y6eB
PROJECT_ID=project_437
PROJECT_ID=project_437
LOGIN_TOKEN=
d102d0403da94627a812836c7e2a66f8
LOGIN_TOKEN=
864d35ba4d4f4473a2abd000f5b2ec24
NEW_BASE_URL=https://staging.unifytwin.com/
NEW_BASE_URL=https://staging.unifytwin.com/
NEW_USER_ID=56jyuX7Z9M4HkoeGfTNJWk
NEW_USER_ID=56jyuX7Z9M4HkoeGfTNJWk
...
...
arti auto.xlsx
View file @
7a6e86fb
No preview for this file type
log/EMS-Automation.log
View file @
7a6e86fb
This diff is collapsed.
Click to expand it.
scripts/core/handlers/dashboard_handler.py
View file @
7a6e86fb
...
@@ -50,7 +50,7 @@ class Dashboards:
...
@@ -50,7 +50,7 @@ class Dashboards:
dashboard_id
=
new_dashboard_list
.
get
(
'dashboard_id'
,
''
)
dashboard_id
=
new_dashboard_list
.
get
(
'dashboard_id'
,
''
)
logger
.
info
(
f
'dashboard id >>>> {dashboard_id}'
)
logger
.
info
(
f
'dashboard id >>>> {dashboard_id}'
)
if
dashboard_id
:
if
dashboard_id
:
return
dashboard_id
return
dashboard_id
,
dashboard_name
else
:
else
:
return
False
return
False
except
Exception
as
e
:
except
Exception
as
e
:
...
...
scripts/core/handlers/widget_handler.py
View file @
7a6e86fb
This diff is collapsed.
Click to expand it.
scripts/services/dashboards.py
View file @
7a6e86fb
...
@@ -38,10 +38,16 @@ async def create_dashboard(file: UploadFile = File(...), sheet_name: str = Form(
...
@@ -38,10 +38,16 @@ async def create_dashboard(file: UploadFile = File(...), sheet_name: str = Form(
if
existing_dashboards
:
if
existing_dashboards
:
existing_widget
=
widget_handler
.
get_widget_details
(
existing_dashboards
)
existing_widget
=
widget_handler
.
get_widget_details
(
existing_dashboards
)
if
existing_widget
:
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
:
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
,
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
:
if
widget_response
or
missing_tags
:
return
{
return
{
"widget"
:
f
'widget number:{widget_response} missing'
,
"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"
}]
[{
"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
\ 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