20#ifndef ORES_QT_WORKUNIT_DETAIL_DIALOG_HPP
21#define ORES_QT_WORKUNIT_DETAIL_DIALOG_HPP
26#include "ores.qt/ClientManager.hpp"
27#include "ores.qt/DetailDialogBase.hpp"
28#include "ores.logging/make_logger.hpp"
29#include "ores.compute.api/domain/batch.hpp"
30#include "ores.compute.api/domain/app_version.hpp"
31#include "ores.compute.api/domain/workunit.hpp"
34class WorkunitDetailDialog;
50 inline static std::string_view logger_name =
51 "ores.qt.workunit_detail_dialog";
53 [[nodiscard]]
static auto& lg() {
55 static auto instance = make_logger(logger_name);
64 void setUsername(
const std::string& username);
65 void setHttpBaseUrl(
const std::string& url);
67 void setCreateMode(
bool createMode);
68 void setReadOnly(
bool readOnly);
71 void workunitSaved(
const QString&
id);
72 void workunitDeleted(
const QString&
id);
76 void onDeleteClicked();
77 void onFieldChanged();
78 void onBrowseInputClicked();
79 void onBrowseConfigClicked();
94 void setupConnections();
96 void loadAppVersions();
97 void populateBatchCombo();
98 void populateAppVersionCombo();
99 void updateUiFromWorkunit();
100 void updateWorkunitFromUi();
101 void updateSaveButtonState();
102 bool validateInput();
103 void saveWorkunitViaNats();
105 Ui::WorkunitDetailDialog* ui_;
106 ClientManager* clientManager_;
107 std::string username_;
110 std::vector<IdEntry> batchEntries_;
111 std::vector<IdEntry> appVersionEntries_;
112 QString selectedInputFilePath_;
113 QString selectedConfigFilePath_;
114 bool createMode_{
true};
115 bool readOnly_{
false};
116 bool hasChanges_{
false};
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
An abstract job template within a compute batch.
Definition workunit.hpp:36
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Base class for all detail dialogs.
Definition DetailDialogBase.hpp:74
Widget displaying the 6 standard record provenance fields.
Definition ProvenanceWidget.hpp:39
Dialog for submitting a new workunit to the compute grid.
Definition WorkunitDetailDialog.hpp:46
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition WorkunitDetailDialog.cpp:68
bool hasUnsavedChanges() const override
Definition WorkunitDetailDialog.hpp:85
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition WorkunitDetailDialog.cpp:60
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition WorkunitDetailDialog.cpp:64