Commit 7a6e86fb authored by mohammed.shibili's avatar mohammed.shibili

new changes in group dashboard

parent 7afc5a71
...@@ -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
......
No preview for this file type
This diff is collapsed.
...@@ -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:
......
This diff is collapsed.
...@@ -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',
......
[{"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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment