Skip to content

Commit

Permalink
chore(matchExpressions): rename target.isAgent match expression to ta…
Browse files Browse the repository at this point in the history
…rget.agent to fit current nomenclature (#625)

* rename isAgent match expression to agent

* chore(schema): automatic update

---------

Co-authored-by: Cryostat CI <rhjavamonitoring@gmail.com>
  • Loading branch information
mwangggg and Cryostat CI committed Aug 29, 2024
1 parent 245614c commit 0313522
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ type RuntimeMetrics {

type Target {
activeRecordings(filter: ActiveRecordingsFilterInput): ActiveRecordings
agent: Boolean!
alias: String!
annotations: Annotations!
archivedRecordings(filter: ArchivedRecordingsFilterInput): ArchivedRecordings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public static class ScriptCreation extends Event {}
* expression-relevant fields exposed, connection URI exposed as a String, etc.
*/
private static record SimplifiedTarget(
boolean isAgent,
boolean agent,
String connectUrl,
String alias,
@Nullable String jvmId,
Expand All @@ -242,7 +242,7 @@ private static record SimplifiedTarget(

static SimplifiedTarget from(Target target) {
return new SimplifiedTarget(
target.isAgent(),
target.agent(),
target.connectUrl.toString(),
target.alias,
target.jvmId,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/cryostat/targets/Target.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public class Target extends PanacheEntity {
public DiscoveryNode discoveryNode;

@JsonProperty(access = JsonProperty.Access.READ_ONLY)
public boolean isAgent() {
public boolean agent() {
return AgentConnection.isAgentConnection(connectUrl);
}

Expand Down

0 comments on commit 0313522

Please sign in to comment.