Skip to content

Commit dc82a81

Browse files
committed
Add agent state filtering and paused fields to agent list
Adding --state flag to filter agents by running, idle, or paused state using GraphQL. Adds support for paused-related fields to the Agent type in the schema and updates the agent list command to use GraphQL for state-based filtering.
1 parent c09c532 commit dc82a81

File tree

5 files changed

+508
-31
lines changed

5 files changed

+508
-31
lines changed

cli

30.2 MB
Binary file not shown.

internal/agent/agents.graphql

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
query ListAgents($orgSlug: ID!, $first: Int, $after: String, $isRunningJob: Boolean, $paused: Boolean) {
2+
organization(slug: $orgSlug) {
3+
agents(first: $first, after: $after, isRunningJob: $isRunningJob, paused: $paused) {
4+
edges {
5+
node {
6+
id
7+
name
8+
hostname
9+
version
10+
connectionState
11+
metaData
12+
createdAt
13+
ipAddress
14+
userAgent
15+
isRunningJob
16+
paused
17+
pausedAt
18+
pausedBy {
19+
name
20+
}
21+
pausedNote
22+
pausedTimeoutInMinutes
23+
clusterQueue {
24+
id
25+
key
26+
}
27+
}
28+
}
29+
pageInfo {
30+
hasNextPage
31+
endCursor
32+
}
33+
}
34+
}
35+
}

internal/graphql/generated.go

Lines changed: 312 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)