diff options
Diffstat (limited to 'app/assets/javascripts/clusters_list/graphql')
4 files changed, 79 insertions, 0 deletions
diff --git a/app/assets/javascripts/clusters_list/graphql/mutations/create_agent.mutation.graphql b/app/assets/javascripts/clusters_list/graphql/mutations/create_agent.mutation.graphql new file mode 100644 index 00000000000..c29756159f5 --- /dev/null +++ b/app/assets/javascripts/clusters_list/graphql/mutations/create_agent.mutation.graphql @@ -0,0 +1,8 @@ +mutation createClusterAgent($input: CreateClusterAgentInput!) { + createClusterAgent(input: $input) { + clusterAgent { + id + } + errors + } +} diff --git a/app/assets/javascripts/clusters_list/graphql/mutations/create_agent_token.mutation.graphql b/app/assets/javascripts/clusters_list/graphql/mutations/create_agent_token.mutation.graphql new file mode 100644 index 00000000000..e93580cf416 --- /dev/null +++ b/app/assets/javascripts/clusters_list/graphql/mutations/create_agent_token.mutation.graphql @@ -0,0 +1,9 @@ +mutation createClusterAgentToken($input: ClusterAgentTokenCreateInput!) { + clusterAgentTokenCreate(input: $input) { + secret + token { + id + } + errors + } +} diff --git a/app/assets/javascripts/clusters_list/graphql/queries/agent_configurations.query.graphql b/app/assets/javascripts/clusters_list/graphql/queries/agent_configurations.query.graphql new file mode 100644 index 00000000000..40b61337024 --- /dev/null +++ b/app/assets/javascripts/clusters_list/graphql/queries/agent_configurations.query.graphql @@ -0,0 +1,15 @@ +query agentConfigurations($projectPath: ID!) { + project(fullPath: $projectPath) { + agentConfigurations { + nodes { + agentName + } + } + + clusterAgents { + nodes { + name + } + } + } +} diff --git a/app/assets/javascripts/clusters_list/graphql/queries/get_agents.query.graphql b/app/assets/javascripts/clusters_list/graphql/queries/get_agents.query.graphql new file mode 100644 index 00000000000..61989e00d9e --- /dev/null +++ b/app/assets/javascripts/clusters_list/graphql/queries/get_agents.query.graphql @@ -0,0 +1,47 @@ +#import "~/graphql_shared/fragments/pageInfo.fragment.graphql" + +query getAgents( + $defaultBranchName: String! + $projectPath: ID! + $first: Int + $last: Int + $afterAgent: String + $afterTree: String + $beforeAgent: String + $beforeTree: String +) { + project(fullPath: $projectPath) { + clusterAgents(first: $first, last: $last, before: $beforeAgent, after: $afterAgent) { + nodes { + id + name + webPath + tokens { + nodes { + lastUsedAt + } + } + } + + pageInfo { + ...PageInfo + } + } + + repository { + tree(path: ".gitlab/agents", ref: $defaultBranchName) { + trees(first: $first, last: $last, after: $afterTree, before: $beforeTree) { + nodes { + name + path + webPath + } + + pageInfo { + ...PageInfo + } + } + } + } + } +} |