From c282dba898a4cb0645f88579339502a4e3778727 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 24 Jan 2020 15:09:00 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/graphql_shared/utils.js | 12 ++++++++ .../javascripts/groups/components/group_item.vue | 9 +++++- .../javascripts/groups/store/groups_store.js | 2 +- .../queries/getEnvironments.query.graphql | 10 +++++++ .../javascripts/monitoring/stores/actions.js | 28 ++++++++++-------- app/assets/javascripts/monitoring/stores/utils.js | 33 ++++++++++++++++++++++ .../settings/components/registry_settings_app.vue | 27 ++++++++++++++++-- .../javascripts/registry/settings/store/actions.js | 8 +++++- .../registry/settings/store/mutation_types.js | 1 + .../registry/settings/store/mutations.js | 3 ++ .../javascripts/registry/settings/store/state.js | 4 +++ app/assets/stylesheets/utilities.scss | 1 + app/controllers/admin/groups_controller.rb | 7 +++-- app/helpers/projects_helper.rb | 6 ++++ app/models/concerns/loaded_in_group_list.rb | 2 ++ app/models/group.rb | 4 +++ app/views/admin/groups/_group.html.haml | 1 + app/views/groups/settings/_advanced.html.haml | 11 ++------ .../groups/settings/_permanent_deletion.html.haml | 9 ++++++ app/views/groups/settings/_remove.html.haml | 5 ++++ app/views/groups/show.html.haml | 2 ++ app/views/kaminari/gitlab/_first_page.html.haml | 9 ------ app/views/kaminari/gitlab/_last_page.html.haml | 9 ------ app/views/kaminari/gitlab/_next_page.html.haml | 4 ++- app/views/kaminari/gitlab/_page.html.haml | 6 +++- app/views/kaminari/gitlab/_paginator.html.haml | 6 +--- app/views/kaminari/gitlab/_prev_page.html.haml | 4 ++- app/views/kaminari/gitlab/_without_count.html.haml | 8 ++++-- app/views/projects/settings/ci_cd/show.html.haml | 4 +-- app/views/projects/show.html.haml | 1 + 30 files changed, 179 insertions(+), 57 deletions(-) create mode 100644 app/assets/javascripts/graphql_shared/utils.js create mode 100644 app/assets/javascripts/monitoring/queries/getEnvironments.query.graphql create mode 100644 app/views/groups/settings/_permanent_deletion.html.haml create mode 100644 app/views/groups/settings/_remove.html.haml delete mode 100644 app/views/kaminari/gitlab/_first_page.html.haml delete mode 100644 app/views/kaminari/gitlab/_last_page.html.haml (limited to 'app') diff --git a/app/assets/javascripts/graphql_shared/utils.js b/app/assets/javascripts/graphql_shared/utils.js new file mode 100644 index 00000000000..a262fbd9ac3 --- /dev/null +++ b/app/assets/javascripts/graphql_shared/utils.js @@ -0,0 +1,12 @@ +/** + * Ids generated by GraphQL endpoints are usually in the format + * gid://gitlab/Environments/123. This method extracts Id number + * from the Id path + * + * @param {String} gid GraphQL global ID + * @returns {Number} + */ +export const getIdFromGraphQLId = (gid = '') => + parseInt((gid || '').replace(/gid:\/\/gitlab\/.*\//g, ''), 10) || null; + +export default {}; diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue index af9399a37bd..b192fb78631 100644 --- a/app/assets/javascripts/groups/components/group_item.vue +++ b/app/assets/javascripts/groups/components/group_item.vue @@ -1,5 +1,5 @@