20#ifndef ORES_QT_CLIENT_JOB_INSTANCE_MODEL_HPP
21#define ORES_QT_CLIENT_JOB_INSTANCE_MODEL_HPP
24#include <QFutureWatcher>
25#include <QAbstractTableModel>
26#include "ores.qt/AbstractClientModel.hpp"
27#include "ores.qt/ClientManager.hpp"
28#include "ores.logging/make_logger.hpp"
29#include "ores.scheduler.api/messaging/scheduler_protocol.hpp"
43 inline static std::string_view logger_name =
44 "ores.qt.client_job_instance_model";
46 [[nodiscard]]
static auto& lg() {
48 static auto instance = make_logger(logger_name);
65 QObject* parent =
nullptr);
68 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
69 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
70 QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
71 QVariant headerData(
int section, Qt::Orientation orientation,
72 int role = Qt::DisplayRole)
const override;
79 void onInstancesLoaded();
84 std::vector<scheduler::messaging::job_instance_summary> instances;
85 QString error_message;
86 QString error_details;
89 void fetch_instances();
92 std::vector<scheduler::messaging::job_instance_summary> instances_;
93 QFutureWatcher<FetchResult>* watcher_;
94 bool is_fetching_{
false};
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AccountController.hpp:32
Base class for all client-side entity models.
Definition AbstractClientModel.hpp:37
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:123
Table model for the global job-instance execution history.
Definition ClientJobInstanceModel.hpp:39
A job_instance enriched with the parent job's display name.
Definition scheduler_protocol.hpp:122