Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/queue-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,11 @@
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.19.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public final class RunEngineService {
/* ---- Ping & status --------------------------------------------------- */

public Envelope<?> ping() throws Exception { return http.call(ApiEndpoint.PING, NoBody.INSTANCE); }
public StatusResponse status() throws Exception {
public StatusResponse status() throws Exception {
LOG.log(Level.FINEST, "Fetching status");
return http.send(ApiEndpoint.STATUS, NoBody.INSTANCE, StatusResponse.class);
return http.send(ApiEndpoint.STATUS, NoBody.INSTANCE, StatusResponse.class);
}
public Envelope<?> configGet() throws Exception { return http.call(ApiEndpoint.CONFIG_GET, NoBody.INSTANCE); }

Expand Down Expand Up @@ -136,6 +136,22 @@ public Envelope<?> queueItemAddBatch(List<QueueItem> items,
public Envelope<?> queueItemAddBatch(QueueItemMoveBatch body ) throws Exception { return http.call(ApiEndpoint.QUEUE_ITEM_ADD_BATCH, body); }
public Envelope<?> queueItemGet(Object params ) throws Exception { return http.call(ApiEndpoint.QUEUE_ITEM_GET, params); }
public Envelope<?> queueItemUpdate(Object b ) throws Exception { return http.call(ApiEndpoint.QUEUE_ITEM_UPDATE, b); }

public Envelope<?> queueItemUpdate(QueueItem item) throws Exception {
Map<String, Object> updateRequest = Map.of(
"item", Map.of(
"item_type", item.itemType(),
"name", item.name(),
"args", item.args(),
"kwargs", item.kwargs(),
"item_uid", item.itemUid()
),
"user", item.user() != null ? item.user() : "GUI Client",
"user_group", item.userGroup() != null ? item.userGroup() : "primary",
"replace", true
);
return queueItemUpdate(updateRequest);
}
public Envelope<?> queueItemRemove(Object b ) throws Exception { return http.call(ApiEndpoint.QUEUE_ITEM_REMOVE, b); }
public Envelope<?> queueItemRemoveBatch(Object b) throws Exception {return http.call(ApiEndpoint.QUEUE_ITEM_REMOVE_BATCH,b); }
public Envelope<?> queueItemMove(Object b ) throws Exception { return http.call(ApiEndpoint.QUEUE_ITEM_MOVE, b); }
Expand Down Expand Up @@ -234,9 +250,9 @@ public Envelope<?> rePause(String option) throws Exception {
/* ---- Permissions & allowed lists ------------------------------------ */

public Envelope<?> plansAllowed() throws Exception { return http.call(ApiEndpoint.PLANS_ALLOWED, NoBody.INSTANCE); }
public Map<String, Object> plansAllowedRaw() throws Exception {
public Map<String, Object> plansAllowedRaw() throws Exception {
LOG.log(Level.FINE, "Fetching plans allowed (raw)");
return http.send(ApiEndpoint.PLANS_ALLOWED, NoBody.INSTANCE);
return http.send(ApiEndpoint.PLANS_ALLOWED, NoBody.INSTANCE);
}
public Envelope<?> devicesAllowed() throws Exception { return http.call(ApiEndpoint.DEVICES_ALLOWED, NoBody.INSTANCE); }
public Envelope<?> plansExisting() throws Exception { return http.call(ApiEndpoint.PLANS_EXISTING, NoBody.INSTANCE); }
Expand Down Expand Up @@ -276,4 +292,4 @@ public Map<String, Object> plansAllowedRaw() throws Exception {
public Envelope<?> whoAmI() throws Exception { return http.call(ApiEndpoint.WHOAMI, NoBody.INSTANCE); }
public Envelope<?> apiScopes() throws Exception { return http.call(ApiEndpoint.API_SCOPES, NoBody.INSTANCE); }
public Envelope<?> logout() throws Exception { return http.call(ApiEndpoint.LOGOUT, NoBody.INSTANCE); }
}
}
Loading