69 inline static std::string_view logger_name =
70 "ores.qt.compute_console_window";
72 [[nodiscard]]
static auto& lg() {
74 static auto instance = make_logger(logger_name);
82 QWidget* parent =
nullptr);
90 void setHttpBaseUrl(
const std::string& url) { http_base_url_ = url; }
92 QSize sizeHint()
const override {
return {1200, 720}; }
98 void statusChanged(
const QString& message);
99 void errorOccurred(
const QString& error);
102 void on_hosts_loaded();
103 void on_tasks_loaded();
104 void on_tasks_error(
const QString& message,
const QString& details);
105 void on_apps_loaded();
106 void on_app_versions_loaded();
107 void on_task_selection_changed();
108 void on_app_selection_changed();
109 void on_tab_changed(
int index);
110 void on_auto_refresh_toggled(
bool checked);
111 void on_new_application();
112 void on_new_app_version();
114 void on_new_work_unit();
116 void on_download_input();
117 void on_download_output();
118 void on_task_double_clicked(
const QModelIndex& index);
119 void on_app_double_clicked(
const QModelIndex& index);
120 void on_app_version_double_clicked(
const QModelIndex& index);
124 QWidget* make_tasks_tab();
125 QWidget* make_apps_tab();
126 QWidget* make_hosts_tab();
127 QWidget* make_transfers_tab();
129 QToolBar* make_tab_toolbar(Qt::ToolButtonStyle style = Qt::ToolButtonTextBesideIcon);
132 static constexpr int kTasksTab = 0;
133 static constexpr int kAppsTab = 1;
134 static constexpr int kHostsTab = 2;
135 static constexpr int kTransfersTab = 3;
137 ClientManager* client_manager_;
138 ChangeReasonCache* change_reason_cache_;
139 BadgeCache* badge_cache_;
140 std::string http_base_url_;
143 HostDisplayNameCache* host_cache_{
nullptr};
144 std::unique_ptr<ComputeTaskViewModel> task_model_;
145 std::unique_ptr<ClientAppModel> app_model_;
146 std::unique_ptr<ClientAppVersionModel> app_version_model_;
147 std::unique_ptr<ClientHostModel> host_model_;
148 std::unique_ptr<ComputeTransferModel> transfer_model_;
151 using HostList = std::vector<compute::domain::host>;
152 QFutureWatcher<HostList>* host_watcher_{
nullptr};
155 QTabWidget* main_tabs_{
nullptr};
158 QTableView* task_view_{
nullptr};
159 QSortFilterProxyModel* task_proxy_{
nullptr};
160 QAction* logs_action_{
nullptr};
161 QAction* download_input_action_{
nullptr};
162 QAction* download_output_action_{
nullptr};
163 QString selected_result_id_;
164 const compute_task* selected_task_{
nullptr};
167 QTableView* app_view_{
nullptr};
168 QSortFilterProxyModel* app_proxy_{
nullptr};
169 QTableView* app_version_view_{
nullptr};
170 QSortFilterProxyModel* app_version_proxy_{
nullptr};
171 QAction* new_app_version_action_{
nullptr};
174 QTableView* host_view_{
nullptr};
175 QSortFilterProxyModel* host_proxy_{
nullptr};
178 QTableView* transfer_view_{
nullptr};
180 QTimer* auto_refresh_timer_{
nullptr};
ComputeTransferModel * transfer_model() const
Exposes the transfer model so external upload/download helpers can call add_transfer / update_progres...
Definition ComputeConsoleWindow.hpp:88