diff options
Diffstat (limited to 'app/assets/javascripts/environments/graphql')
3 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql b/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql index c3ab9cf7fca..1a572208a1c 100644 --- a/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql +++ b/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql @@ -1,5 +1,5 @@ -query getEnvironmentApp($page: Int, $scope: String) { - environmentApp(page: $page, scope: $scope) @client { +query getEnvironmentApp($page: Int, $scope: String, $search: String) { + environmentApp(page: $page, scope: $scope, search: $search) @client { availableCount stoppedCount environments diff --git a/app/assets/javascripts/environments/graphql/queries/folder.query.graphql b/app/assets/javascripts/environments/graphql/queries/folder.query.graphql index e8c145ee916..c662acb8f93 100644 --- a/app/assets/javascripts/environments/graphql/queries/folder.query.graphql +++ b/app/assets/javascripts/environments/graphql/queries/folder.query.graphql @@ -1,5 +1,5 @@ -query getEnvironmentFolder($environment: NestedLocalEnvironment, $scope: String) { - folder(environment: $environment, scope: $scope) @client { +query getEnvironmentFolder($environment: NestedLocalEnvironment, $scope: String, $search: String) { + folder(environment: $environment, scope: $scope, search: $search) @client { availableCount environments stoppedCount diff --git a/app/assets/javascripts/environments/graphql/resolvers.js b/app/assets/javascripts/environments/graphql/resolvers.js index 722bb78bcf9..afd56d0cf0d 100644 --- a/app/assets/javascripts/environments/graphql/resolvers.js +++ b/app/assets/javascripts/environments/graphql/resolvers.js @@ -30,8 +30,8 @@ const mapEnvironment = (env) => ({ export const resolvers = (endpoint) => ({ Query: { - environmentApp(_context, { page, scope }, { cache }) { - return axios.get(endpoint, { params: { nested: true, page, scope } }).then((res) => { + environmentApp(_context, { page, scope, search }, { cache }) { + return axios.get(endpoint, { params: { nested: true, page, scope, search } }).then((res) => { const headers = normalizeHeaders(res.headers); const interval = headers['POLL-INTERVAL']; const pageInfo = { ...parseIntPagination(headers), __typename: 'LocalPageInfo' }; @@ -59,8 +59,8 @@ export const resolvers = (endpoint) => ({ }; }); }, - folder(_, { environment: { folderPath }, scope }) { - return axios.get(folderPath, { params: { scope, per_page: 3 } }).then((res) => ({ + folder(_, { environment: { folderPath }, scope, search }) { + return axios.get(folderPath, { params: { scope, search, per_page: 3 } }).then((res) => ({ availableCount: res.data.available_count, environments: res.data.environments.map(mapEnvironment), stoppedCount: res.data.stopped_count, |