From ce3771febe8f1a78c2f723298b99517e4306ce30 Mon Sep 17 00:00:00 2001 From: Justin Bonus Date: Fri, 4 Oct 2024 12:19:21 -0700 Subject: [PATCH] Re-add the NOAA DC-Sea-level-rise viewer as a web-app Tool + small bug-fix to EDP selection's widget order --- EDP/HydroEDP_Selection.cpp | 2 +- WorkflowAppHydroUQ.cpp | 57 +++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/EDP/HydroEDP_Selection.cpp b/EDP/HydroEDP_Selection.cpp index 4947c69f..2cb664e4 100644 --- a/EDP/HydroEDP_Selection.cpp +++ b/EDP/HydroEDP_Selection.cpp @@ -136,7 +136,6 @@ HydroEDP_Selection::HydroEDP_Selection(QWidget *parent) theStackedWidget->addWidget(theStandardHydroEDPs); // theStackedWidget->addWidget(theStandardTsunamiEDPs); // theStackedWidget->addWidget(theStandardStormSurgeEDPs); - theStackedWidget->addWidget(theUserDefinedEDPs); SurrogateEDP * theSurrogateEDPs_tmp = SurrogateEDP::getInstance(); theSurrogateEDPs = theSurrogateEDPs_tmp; @@ -145,6 +144,7 @@ HydroEDP_Selection::HydroEDP_Selection(QWidget *parent) edpSelection->setCurrentIndex(4); }); theStackedWidget->addWidget(theSurrogateEDPs); + theStackedWidget->addWidget(theUserDefinedEDPs); layout->addWidget(theStackedWidget); diff --git a/WorkflowAppHydroUQ.cpp b/WorkflowAppHydroUQ.cpp index 4a6c0c81..03bd9c03 100644 --- a/WorkflowAppHydroUQ.cpp +++ b/WorkflowAppHydroUQ.cpp @@ -266,8 +266,8 @@ constexpr bool DEV_MODE = true; // Set to true for development mode, false for p // Quickly enable/disable tools here for compile-time constexpr bool USE_CLAYMORE_TOOL = true; -constexpr bool USE_TAICHI_TOOL = false; -constexpr bool USE_NOAA_TOOL = false; +constexpr bool USE_TAICHI_TOOL = true; +constexpr bool USE_NOAA_TOOL = true; constexpr bool USE_CELERIS_TOOL = false; constexpr bool USE_WEBGPU_TOOL = false; @@ -321,36 +321,35 @@ WorkflowAppHydroUQ::setMainWindow(MainWindowWorkflowApp* window) { // currentTool = miniMPMTool; // TODO: Make this more dynamics / use a better interface } - // if constexpr (USE_TAICHI_TOOL) { - // queues.clear(); queues << "rtx" << "rtx-dev"; // These are later changed to "normal" and "fast" in the tool based on number of cores/processors? Should fix this - // TaichiEvent *miniTaichi = new TaichiEvent(); - // appName = "simcenter-taichi-frontera"; // Frontera - // QString appVersion = "1.0.0"; - // QString machine = "frontera"; - // SC_RemoteAppTool *miniTaichiTool = new SC_RemoteAppTool(appName, appVersion, machine, queues, theRemoteService, miniTaichi, theToolDialog); - // theToolDialog->addTool(miniTaichiTool, "General Event (Taichi)"); - // QAction *showTaichi = toolsMenu->addAction("General Event (&Taichi)"); - // connect(showTaichi, &QAction::triggered, this,[this, theDialog=theToolDialog, miniT = miniTaichiTool] { - // theDialog->showTool("General Event (Taichi)"); - // }); + if constexpr (USE_TAICHI_TOOL) { + queues.clear(); queues << "rtx" << "rtx-dev"; // These are later changed to "normal" and "fast" in the tool based on number of cores/processors? Should fix this + TaichiEvent *miniTaichi = new TaichiEvent(); + appName = "simcenter-taichi-frontera"; // Frontera + QString appVersion = "1.0.0"; + QString machine = "frontera"; + SC_RemoteAppTool *miniTaichiTool = new SC_RemoteAppTool(appName, appVersion, machine, queues, theRemoteService, miniTaichi, theToolDialog); + theToolDialog->addTool(miniTaichiTool, "General Event (Taichi)"); + QAction *showTaichi = toolsMenu->addAction("General Event (&Taichi)"); + connect(showTaichi, &QAction::triggered, this,[this, theDialog=theToolDialog, miniT = miniTaichiTool] { + theDialog->showTool("General Event (Taichi)"); + }); - // } + } - // if constexpr (USE_NOAA_TOOL) { - // DigitalCoast *miniDC = new DigitalCoast(); - // QString appNameDC = "simcenter-noaa-dc-frontera"; // Frontera - // QString systemNameDC = "frontera"; - // QString appVersion = "1.0.0"; - // QString machine = "frontera"; - // QList queuesDC; queuesDC << "rtx" << "rtx-dev"; // These are later changed to "normal" and "fast" in the tool based on number of cores/processors? Should fix this - // SC_RemoteAppTool *miniDCTool = new SC_RemoteAppTool(appNameDC, appVersion, machine, queuesDC, theRemoteService, miniDC, theToolDialog); - // theToolDialog->addTool(miniDCTool, "Sea-Level Rise (NOAA Digital Coast)"); - // QAction *showDC = toolsMenu->addAction("Sea-Level Rise (&NOAA Digital Coast)"); - // connect(showDC, &QAction::triggered, this,[this, theDialog=theToolDialog, miniD = miniDCTool] { - // theDialog->showTool("Sea-Level Rise (NOAA Digital Coast)"); - // }); - // } + if constexpr (USE_NOAA_TOOL) { + DigitalCoast *miniDC = new DigitalCoast(); + QString appNameDC = "noaa-digital-coast-localhost"; // Frontera + QString appVersion = "1.0.0"; + QString machine = "localhost"; + queues.clear(); queues << "chromium"; // These are later changed to "normal" and "fast" in the tool based on number of cores/processors? Should fix this + SC_RemoteAppTool *miniDCTool = new SC_RemoteAppTool(appNameDC, appVersion, machine, queues, theRemoteService, miniDC, theToolDialog); + theToolDialog->addTool(miniDCTool, "Sea-Level Rise (NOAA Digital Coast)"); + QAction *showDC = toolsMenu->addAction("Sea-Level Rise (&NOAA Digital Coast)"); + connect(showDC, &QAction::triggered, this,[this, theDialog=theToolDialog, miniD = miniDCTool] { + theDialog->showTool("Sea-Level Rise (NOAA Digital Coast)"); + }); + } // if constexpr (USE_CELERIS_TOOL) { // Celeris *miniCeleris = new Celeris();