From d014775d13add961624db1b59a5e582b0c58b29a Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Thu, 19 Apr 2018 13:57:12 +0300 Subject: Move discussion actions to the right for small viewports --- .../javascripts/notes/components/note_header.vue | 30 +++++++++++----------- app/assets/stylesheets/pages/notes.scss | 5 ---- .../move-disussion-actions-to-the-right.yml | 5 ++++ 3 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 changelogs/unreleased/move-disussion-actions-to-the-right.yml diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue index c3d1ef1fcc6..fbfd6f92c85 100644 --- a/app/assets/javascripts/notes/components/note_header.vue +++ b/app/assets/javascripts/notes/components/note_header.vue @@ -62,6 +62,21 @@ export default { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 6d5c6cb136f..817c956da31 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -473,11 +473,6 @@ ul.notes { margin-left: 10px; color: $gray-darkest; - @include notes-media('max', $screen-md-max) { - float: none; - margin-left: 0; - } - .btn-group > .discussion-next-btn { margin-left: -1px; } diff --git a/changelogs/unreleased/move-disussion-actions-to-the-right.yml b/changelogs/unreleased/move-disussion-actions-to-the-right.yml new file mode 100644 index 00000000000..b79c6f36585 --- /dev/null +++ b/changelogs/unreleased/move-disussion-actions-to-the-right.yml @@ -0,0 +1,5 @@ +--- +title: Move discussion actions to the right for small viewports +merge_request: 18476 +author: George Tsiolis +type: changed -- cgit v1.2.1 From c866b5e4401ec50567b3eaa3bffa11bc3831850f Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Thu, 26 Apr 2018 11:46:43 +0300 Subject: Move note actions to the right --- app/assets/stylesheets/pages/notes.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 817c956da31..42fe319b931 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -407,10 +407,6 @@ ul.notes { .note-header { display: flex; justify-content: space-between; - - @include notes-media('max', $screen-xs-max) { - flex-flow: row wrap; - } } .note-header-info { -- cgit v1.2.1 From 77a925f4a6bff04f0b40255e4dced741818149d7 Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Thu, 26 Apr 2018 12:06:31 +0300 Subject: Reorder discussion timestamp information for issues --- app/assets/javascripts/notes/components/note_edited_text.vue | 10 +++++----- app/assets/javascripts/notes/components/note_header.vue | 2 +- app/views/discussions/_discussion.html.haml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/notes/components/note_edited_text.vue b/app/assets/javascripts/notes/components/note_edited_text.vue index 4ddca918495..2dc39d1a186 100644 --- a/app/assets/javascripts/notes/components/note_edited_text.vue +++ b/app/assets/javascripts/notes/components/note_edited_text.vue @@ -32,17 +32,17 @@ export default { diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue index fbfd6f92c85..7183d0b50b2 100644 --- a/app/assets/javascripts/notes/components/note_header.vue +++ b/app/assets/javascripts/notes/components/note_header.vue @@ -74,7 +74,7 @@ export default { class="fa" aria-hidden="true"> - Toggle discussion + {{ __('Toggle discussion') }} diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml index e9589213f80..ebe8c327079 100644 --- a/app/views/discussions/_discussion.html.haml +++ b/app/views/discussions/_discussion.html.haml @@ -13,7 +13,7 @@ = icon("chevron-up") - else = icon("chevron-down") - Toggle discussion + = _('Toggle discussion') = link_to_member(@project, discussion.author, avatar: false) .inline.discussion-headline-light -- cgit v1.2.1 From 6fd75502d6afed374bf34f193b44eac57bf5ba33 Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Tue, 8 May 2018 14:51:29 +0000 Subject: correct doc-nav header hierarchy --- doc/development/fe_guide/vuex.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 6a89bfc7721..d6305bc4dec 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -149,7 +149,7 @@ import { mapActions } from 'vuex'; }; ``` -#### `mutations.js` +### `mutations.js` The mutations specify how the application state changes in response to actions sent to the store. The only way to change state in a Vuex store should be by committing a mutation. @@ -188,7 +188,7 @@ Remember that actions only describe that something happened, they don't describe }; ``` -#### `getters.js` +### `getters.js` Sometimes we may need to get derived state based on store state, like filtering for a specific prop. Using a getter will also cache the result based on dependencies due to [how computed props work](https://vuejs.org/v2/guide/computed.html#Computed-Caching-vs-Methods) This can be done through the `getters`: @@ -213,7 +213,7 @@ import { mapGetters } from 'vuex'; }; ``` -#### `mutations_types.js` +### `mutations_types.js` From [vuex mutations docs][vuex-mutations]: > It is a commonly seen pattern to use constants for mutation types in various Flux implementations. This allows the code to take advantage of tooling like linters, and putting all constants in a single file allows your collaborators to get an at-a-glance view of what mutations are possible in the entire application. -- cgit v1.2.1 From 7e0af6cfc9d9d0272f3b29f128a37863bd6e6324 Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Tue, 8 May 2018 14:55:49 +0000 Subject: add rewire gotcha about testing vuex actions/getters --- doc/development/fe_guide/vuex.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index d6305bc4dec..29d5e446e20 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -352,6 +352,18 @@ describe('component', () => { }); ``` +#### Testing Vuex actions and getters +Because we're currently using `babel-plugin-rewire`, you may encounter the following error when testing your Vuex actions and getters: +`[vuex] actions should be function or object with "handler" function` + +To prevent this error from happening, you need to export an empty function: +``` +// /stores/getters.js or /stores/actions.js + +// prevent babel-plugin-rewire from generating an invalid default during karma tests +export default () => {}; +``` + [vuex-docs]: https://vuex.vuejs.org [vuex-structure]: https://vuex.vuejs.org/en/structure.html [vuex-mutations]: https://vuex.vuejs.org/en/mutations.html -- cgit v1.2.1 From e69d6ae0f8c27dcfc111b4ac9b401deb1ae33725 Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Tue, 8 May 2018 14:56:43 +0000 Subject: Update vuex.md --- doc/development/fe_guide/vuex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 29d5e446e20..d047fd96dda 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -358,7 +358,7 @@ Because we're currently using `babel-plugin-rewire`, you may encounter the follo To prevent this error from happening, you need to export an empty function: ``` -// /stores/getters.js or /stores/actions.js +// getters.js or actions.js // prevent babel-plugin-rewire from generating an invalid default during karma tests export default () => {}; -- cgit v1.2.1 From e665169a94a855d7eb45924d8c6ec602578447dd Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Tue, 8 May 2018 17:13:22 +0000 Subject: add link for babel-plugin-rewire --- doc/development/fe_guide/vuex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index d047fd96dda..95636153805 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -353,7 +353,7 @@ describe('component', () => { ``` #### Testing Vuex actions and getters -Because we're currently using `babel-plugin-rewire`, you may encounter the following error when testing your Vuex actions and getters: +Because we're currently using [`babel-plugin-rewire`](https://github.com/speedskater/babel-plugin-rewire), you may encounter the following error when testing your Vuex actions and getters: `[vuex] actions should be function or object with "handler" function` To prevent this error from happening, you need to export an empty function: -- cgit v1.2.1 From 1a12471d315fac6e4d6a12ffa4f3331c29017602 Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Fri, 11 May 2018 12:39:32 +0000 Subject: fix typo --- doc/development/fe_guide/vuex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 95636153805..0335109366a 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -68,7 +68,7 @@ Often we need to provide data from haml to our Vue application. Let's store it i You can use `mapState` to access state properties in the components. ### `actions.js` -An action is a playload of information to send data from our application to our store. +An action is a payload of information to send data from our application to our store. An action is usually composed by a `type` and a `payload` and they describe what happened. Enforcing that every change is described as an action lets us have a clear understanting of what is going on in the app. -- cgit v1.2.1 From e012485a99d83cc57a46b17eb50b9e360dbb51c9 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Mon, 14 May 2018 11:04:39 +0200 Subject: Move Gitlab::Git::Repository#add_branch to mandatory Prior to this change, a feature flag could be used to disable this feature. Now all requests go through Gitaly's OperationService. Closes https://gitlab.com/gitlab-org/gitaly/issues/540 When vendoring `Gitlab::Git` again in Gitaly, this implemenation will be gone, but this is readded there through: https://gitlab.com/gitlab-org/gitaly/merge_requests/717 --- changelogs/unreleased/zj-add-branch-mandatory.yml | 5 ++ lib/gitlab/git/repository.rb | 26 +-------- spec/models/repository_spec.rb | 68 +++++------------------ 3 files changed, 22 insertions(+), 77 deletions(-) create mode 100644 changelogs/unreleased/zj-add-branch-mandatory.yml diff --git a/changelogs/unreleased/zj-add-branch-mandatory.yml b/changelogs/unreleased/zj-add-branch-mandatory.yml new file mode 100644 index 00000000000..82712ce842d --- /dev/null +++ b/changelogs/unreleased/zj-add-branch-mandatory.yml @@ -0,0 +1,5 @@ +--- +title: Adding branches through the WebUI is handled by Gitaly +merge_request: +author: +type: other diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 29a3a35812c..03f137d7385 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -776,13 +776,9 @@ module Gitlab end def add_branch(branch_name, user:, target:) - gitaly_migrate(:operation_user_create_branch, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| - if is_enabled - gitaly_add_branch(branch_name, user, target) - else - rugged_add_branch(branch_name, user, target) - end - end + gitaly_operation_client.user_create_branch(branch_name, user, target) + rescue GRPC::FailedPrecondition => ex + raise InvalidRef, ex end def add_tag(tag_name, user:, target:, message: nil) @@ -2232,22 +2228,6 @@ module Gitlab end end - def gitaly_add_branch(branch_name, user, target) - gitaly_operation_client.user_create_branch(branch_name, user, target) - rescue GRPC::FailedPrecondition => ex - raise InvalidRef, ex - end - - def rugged_add_branch(branch_name, user, target) - target_object = Ref.dereference_object(lookup(target)) - raise InvalidRef.new("target not found: #{target}") unless target_object - - OperationService.new(user, self).add_branch(branch_name, target_object.oid) - find_branch(branch_name) - rescue Rugged::ReferenceError => ex - raise InvalidRef, ex - end - def rugged_cherry_pick(user:, commit:, branch_name:, message:, start_branch_name:, start_repository:) OperationService.new(user, self).with_branch( branch_name, diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index a7755a505d8..ac8d9a32d4e 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -990,65 +990,25 @@ describe Repository do subject { repository.add_branch(user, branch_name, target) } - context 'with Gitaly enabled' do - it "calls Gitaly's OperationService" do - expect_any_instance_of(Gitlab::GitalyClient::OperationService) - .to receive(:user_create_branch).with(branch_name, user, target) - .and_return(nil) - - subject - end - - it 'creates_the_branch' do - expect(subject.name).to eq(branch_name) - expect(repository.find_branch(branch_name)).not_to be_nil - end - - context 'with a non-existing target' do - let(:target) { 'fake-target' } + it "calls Gitaly's OperationService" do + expect_any_instance_of(Gitlab::GitalyClient::OperationService) + .to receive(:user_create_branch).with(branch_name, user, target) + .and_return(nil) - it "returns false and doesn't create the branch" do - expect(subject).to be(false) - expect(repository.find_branch(branch_name)).to be_nil - end - end + subject end - context 'with Gitaly disabled', :disable_gitaly do - context 'when pre hooks were successful' do - it 'runs without errors' do - hook = double(trigger: [true, nil]) - expect(Gitlab::Git::Hook).to receive(:new).exactly(3).times.and_return(hook) - - expect { subject }.not_to raise_error - end - - it 'creates the branch' do - allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([true, nil]) - - expect(subject.name).to eq(branch_name) - end - - it 'calls the after_create_branch hook' do - expect(repository).to receive(:after_create_branch) - - subject - end - end - - context 'when pre hooks failed' do - it 'gets an error' do - allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([false, '']) - - expect { subject }.to raise_error(Gitlab::Git::HooksService::PreReceiveError) - end + it 'creates_the_branch' do + expect(subject.name).to eq(branch_name) + expect(repository.find_branch(branch_name)).not_to be_nil + end - it 'does not create the branch' do - allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([false, '']) + context 'with a non-existing target' do + let(:target) { 'fake-target' } - expect { subject }.to raise_error(Gitlab::Git::HooksService::PreReceiveError) - expect(repository.find_branch(branch_name)).to be_nil - end + it "returns false and doesn't create the branch" do + expect(subject).to be(false) + expect(repository.find_branch(branch_name)).to be_nil end end end -- cgit v1.2.1 From f1a22c6cf5cfd6551932c83ba7188a3d3ed7066c Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Mon, 14 May 2018 11:16:24 +0000 Subject: clarify that the function export should be default --- doc/development/fe_guide/vuex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 0335109366a..bebd0edab57 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -356,7 +356,7 @@ describe('component', () => { Because we're currently using [`babel-plugin-rewire`](https://github.com/speedskater/babel-plugin-rewire), you may encounter the following error when testing your Vuex actions and getters: `[vuex] actions should be function or object with "handler" function` -To prevent this error from happening, you need to export an empty function: +To prevent this error from happening, you need to export an empty function as `default`: ``` // getters.js or actions.js -- cgit v1.2.1 From dde62ccff57371ee68089d21dc431bf435b2a896 Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Mon, 14 May 2018 11:31:14 +0000 Subject: typo in `endpoint` --- doc/development/fe_guide/vuex.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index bebd0edab57..def6f0ade5e 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -87,7 +87,7 @@ In this file, we will write the actions that will call the respective mutations: export const fetchUsers = ({ state, dispatch }) => { dispatch('requestUsers'); - axios.get(state.endoint) + axios.get(state.endpoint) .then(({ data }) => dispatch('receiveUsersSuccess', data)) .catch((error) => { dispatch('receiveUsersError', error) @@ -102,7 +102,7 @@ In this file, we will write the actions that will call the respective mutations: export const addUser = ({ state, dispatch }, user) => { dispatch('requestAddUser'); - axios.post(state.endoint, user) + axios.post(state.endpoint, user) .then(({ data }) => dispatch('receiveAddUserSuccess', data)) .catch((error) => dispatch('receiveAddUserError', error)); } -- cgit v1.2.1 From 274a446dfba2d98f48562f8dd48c8e91ae2699e8 Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Mon, 14 May 2018 11:41:50 +0000 Subject: more typos --- doc/development/fe_guide/vuex.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index def6f0ade5e..459dc540788 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -71,7 +71,7 @@ You can use `mapState` to access state properties in the components. An action is a payload of information to send data from our application to our store. An action is usually composed by a `type` and a `payload` and they describe what happened. -Enforcing that every change is described as an action lets us have a clear understanting of what is going on in the app. +Enforcing that every change is described as an action lets us have a clear understanding of what is going on in the app. In this file, we will write the actions that will call the respective mutations: @@ -126,7 +126,7 @@ The component MUST only dispatch the `fetchNamespace` action. Actions namespaced The `fetch` action will be responsible to dispatch `requestNamespace`, `receiveNamespaceSuccess` and `receiveNamespaceError` By following this pattern we guarantee: -1. All aplications follow the same pattern, making it easier for anyone to maintain the code +1. All applications follow the same pattern, making it easier for anyone to maintain the code 1. All data in the application follows the same lifecycle pattern 1. Actions are contained and human friendly 1. Unit tests are easier @@ -289,7 +289,7 @@ export default { ``` ### Vuex Gotchas -1. Do not call a mutation directly. Always use an action to commit a mutation. Doing so will keep consistency through out the application. From Vuex docs: +1. Do not call a mutation directly. Always use an action to commit a mutation. Doing so will keep consistency throughout the application. From Vuex docs: > why don't we just call store.commit('action') directly? Well, remember that mutations must be synchronous? Actions aren't. We can perform asynchronous operations inside an action. @@ -342,7 +342,7 @@ describe('component', () => { }; // populate the store - store.dipatch('addUser', user); + store.dispatch('addUser', user); vm = new Component({ store, -- cgit v1.2.1 From 6c9af2d1e547e2c07b2f0cf5c60cdcee09c1bbec Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Mon, 14 May 2018 11:50:19 +0000 Subject: code example formatting --- doc/development/fe_guide/vuex.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 459dc540788..8997a5889dc 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -175,7 +175,7 @@ Remember that actions only describe that something happened, they don't describe state.isLoading = false; }, [types.REQUEST_ADD_USER](state, user) { - state.isAddingUser = true; + state.isAddingUser = true; }, [types.RECEIVE_ADD_USER_SUCCESS](state, user) { state.isAddingUser = false; @@ -183,7 +183,7 @@ Remember that actions only describe that something happened, they don't describe }, [types.REQUEST_ADD_USER_ERROR](state, error) { state.isAddingUser = true; - state.errorAddingUser = error∂; + state.errorAddingUser = error; }, }; ``` -- cgit v1.2.1 From 3f4a3e4f608508044e2f91d7a78cfb64b71ec90c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 16 May 2018 08:47:18 +0200 Subject: Document the 3h timeout for GitLab.com shared Runners --- doc/user/gitlab_com/index.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md index 7baccb796c6..0c1cd113686 100644 --- a/doc/user/gitlab_com/index.md +++ b/doc/user/gitlab_com/index.md @@ -75,7 +75,6 @@ Shared Runners on GitLab.com run in [autoscale mode] and powered by Google Cloud Platform and DigitalOcean. Autoscaling means reduced waiting times to spin up CI/CD jobs, and isolated VMs for each project, thus maximizing security. - They're free to use for public open source projects and limited to 2000 CI minutes per month per group for private projects. Read about all [GitLab.com plans](https://about.gitlab.com/pricing/). @@ -90,6 +89,10 @@ ephemeral instances with 3.75GB of RAM, CoreOS and the latest Docker Engine installed. Instances provide 1 vCPU and 25GB of HDD disk space. The default region of the VMs is US East1. +Jobs handled by the shared Runners on GitLab.com (`shared-runners-manager-X.gitlab.com`), +**will be timed out after 3 hours**, regardless of the timeout configured in a +project. Check the issues [4010] and [4070] for the reference. + Below are the shared Runners settings. | Setting | GitLab.com | Default | @@ -340,3 +343,5 @@ High Performance TCP/HTTP Load Balancer: [mailgun]: https://www.mailgun.com/ "Mailgun website" [sidekiq]: http://sidekiq.org/ "Sidekiq website" [unicorn-worker-killer]: https://rubygems.org/gems/unicorn-worker-killer "unicorn-worker-killer" +[4010]: https://gitlab.com/gitlab-com/infrastructure/issues/4010 "Find a good value for maximum timeout for Shared Runners" +[4070]: https://gitlab.com/gitlab-com/infrastructure/issues/4070 "Configure per-runner timeout for shared-runners-manager-X on GitLab.com" -- cgit v1.2.1 From e6cbf40263ccf160cc97216e395e5c8ede8d13d2 Mon Sep 17 00:00:00 2001 From: Lars Greiss Date: Wed, 16 May 2018 10:19:41 +0000 Subject: Remove docker pull prefix from registry clipboard feature --- .../javascripts/registry/components/collapsible_container.vue | 7 +------ app/assets/javascripts/registry/components/table_registry.vue | 6 +----- .../registry-ux-improvements-remove-clipboard-prefix.yml | 5 +++++ 3 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 changelogs/unreleased/registry-ux-improvements-remove-clipboard-prefix.yml diff --git a/app/assets/javascripts/registry/components/collapsible_container.vue b/app/assets/javascripts/registry/components/collapsible_container.vue index a03180e80e6..2ce43ef0125 100644 --- a/app/assets/javascripts/registry/components/collapsible_container.vue +++ b/app/assets/javascripts/registry/components/collapsible_container.vue @@ -28,11 +28,6 @@ isOpen: false, }; }, - computed: { - clipboardText() { - return `docker pull ${this.repo.location}`; - }, - }, methods: { ...mapActions([ 'fetchRepos', @@ -84,7 +79,7 @@ diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue index a2227b2f554..673b1db6769 100644 --- a/app/assets/javascripts/registry/components/table_registry.vue +++ b/app/assets/javascripts/registry/components/table_registry.vue @@ -56,10 +56,6 @@ .catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY)); }, - clipboardText(text) { - return `docker pull ${text}`; - }, - showError(message) { Flash(errorMessages[message]); }, @@ -89,7 +85,7 @@ diff --git a/changelogs/unreleased/registry-ux-improvements-remove-clipboard-prefix.yml b/changelogs/unreleased/registry-ux-improvements-remove-clipboard-prefix.yml new file mode 100644 index 00000000000..ddf7f51aa5e --- /dev/null +++ b/changelogs/unreleased/registry-ux-improvements-remove-clipboard-prefix.yml @@ -0,0 +1,5 @@ +--- +title: Remove docker pull prefix from registry clipboard feature +merge_request: 18933 +author: Lars Greiss +type: changed -- cgit v1.2.1 From 33af33d7cbf947055a2a40dc2dddf74dfb13079c Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 16 May 2018 12:53:54 +0200 Subject: Fix GPM content types for Doorkeeper Certain controllers (e.g. Doorkeeper::TokensController) don't expose the method "request_format". This commit changes Gitlab::Metrics::WebTransaction so we don't rely on this method, instead using the underlying code this method uses. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/46412 --- lib/gitlab/metrics/web_transaction.rb | 6 +++++- spec/lib/gitlab/metrics/web_transaction_spec.rb | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/gitlab/metrics/web_transaction.rb b/lib/gitlab/metrics/web_transaction.rb index 7cf33ca9e8a..3799aaebf1c 100644 --- a/lib/gitlab/metrics/web_transaction.rb +++ b/lib/gitlab/metrics/web_transaction.rb @@ -28,7 +28,11 @@ module Gitlab controller = @env[CONTROLLER_KEY] action = "#{controller.action_name}" - suffix = controller.request_format + + # Devise exposes a method called "request_format" that does the below. + # However, this method is not available to all controllers (e.g. certain + # Doorkeeper controllers). As such we use the underlying code directly. + suffix = controller.request.format.try(:ref) if suffix && suffix != :html action += ".#{suffix}" diff --git a/spec/lib/gitlab/metrics/web_transaction_spec.rb b/spec/lib/gitlab/metrics/web_transaction_spec.rb index c07b33a039a..6eb0600f49e 100644 --- a/spec/lib/gitlab/metrics/web_transaction_spec.rb +++ b/spec/lib/gitlab/metrics/web_transaction_spec.rb @@ -180,11 +180,11 @@ describe Gitlab::Metrics::WebTransaction do end context 'when request goes to ActionController' do - let(:request_format) { :html } + let(:request) { double(:request, format: double(:format, ref: :html)) } before do klass = double(:klass, name: 'TestController') - controller = double(:controller, class: klass, action_name: 'show', request_format: request_format) + controller = double(:controller, class: klass, action_name: 'show', request: request) env['action_controller.instance'] = controller end @@ -195,7 +195,7 @@ describe Gitlab::Metrics::WebTransaction do end context 'when the response content type is not :html' do - let(:request_format) { :json } + let(:request) { double(:request, format: double(:format, ref: :json)) } it 'appends the mime type to the transaction action' do expect(transaction.labels).to eq({ controller: 'TestController', action: 'show.json' }) -- cgit v1.2.1 From 762672fd26a0ae804e57376587b16b99cb3a32a1 Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Wed, 16 May 2018 11:16:33 +0000 Subject: Project Sidebar: Split CI/CD into CI/CD and Operations --- app/helpers/projects_helper.rb | 1 + app/views/layouts/nav/sidebar/_project.html.haml | 116 ++++++++------ changelogs/unreleased/43673-operations-tab-mvc.yml | 5 + locale/gitlab.pot | 170 ++++++++++++++++++--- .../layouts/nav/sidebar/_project.html.haml_spec.rb | 9 +- 5 files changed, 229 insertions(+), 72 deletions(-) create mode 100644 changelogs/unreleased/43673-operations-tab-mvc.yml diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index eb81dc2de43..fa54eafd3a3 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -257,6 +257,7 @@ module ProjectsHelper if project.builds_enabled? && can?(current_user, :read_pipeline, project) nav_tabs << :pipelines + nav_tabs << :operations end if project.external_issue_tracker diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 196db08cebd..c3ea592a6b5 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -13,13 +13,13 @@ .nav-icon-container = sprite_icon('project') %span.nav-item-name - Project + = _('Project') %ul.sidebar-sub-level-items = nav_link(path: 'projects#show', html_options: { class: "fly-out-top-item" } ) do = link_to project_path(@project) do %strong.fly-out-top-item-name - #{ _('Overview') } + = _('Overview') %li.divider.fly-out-top-item = nav_link(path: 'projects#show') do = link_to project_path(@project), title: _('Project details'), class: 'shortcuts-project' do @@ -40,45 +40,45 @@ .nav-icon-container = sprite_icon('doc_text') %span.nav-item-name - Repository + = _('Repository') %ul.sidebar-sub-level-items = nav_link(controller: %w(tree blob blame edit_tree new_tree find_file commit commits compare projects/repositories tags branches releases graphs network), html_options: { class: "fly-out-top-item" } ) do = link_to project_tree_path(@project) do %strong.fly-out-top-item-name - #{ _('Repository') } + = _('Repository') %li.divider.fly-out-top-item = nav_link(controller: %w(tree blob blame edit_tree new_tree find_file)) do = link_to project_tree_path(@project) do - #{ _('Files') } + = _('Files') = nav_link(controller: [:commit, :commits]) do = link_to project_commits_path(@project, current_ref) do - #{ _('Commits') } + = _('Commits') = nav_link(html_options: {class: branches_tab_class}) do = link_to project_branches_path(@project) do - #{ _('Branches') } + = _('Branches') = nav_link(controller: [:tags, :releases]) do = link_to project_tags_path(@project) do - #{ _('Tags') } + = _('Tags') = nav_link(path: 'graphs#show') do = link_to project_graph_path(@project, current_ref) do - #{ _('Contributors') } + = _('Contributors') = nav_link(controller: %w(network)) do = link_to project_network_path(@project, current_ref) do - #{ s_('ProjectNetworkGraph|Graph') } + = _('Graph') = nav_link(controller: :compare) do = link_to project_compare_index_path(@project, from: @repository.root_ref, to: current_ref) do - #{ _('Compare') } + = _('Compare') = nav_link(path: 'graphs#charts') do = link_to charts_project_graph_path(@project, current_ref) do - #{ _('Charts') } + = _('Charts') - if project_nav_tab? :issues = nav_link(controller: @project.issues_enabled? ? [:issues, :labels, :milestones, :boards] : :issues) do @@ -86,7 +86,7 @@ .nav-icon-container = sprite_icon('issues') %span.nav-item-name - Issues + = _('Issues') - if @project.issues_enabled? %span.badge.count.issue_counter = number_with_delimiter(@project.open_issues_count) @@ -95,7 +95,7 @@ = nav_link(controller: :issues, html_options: { class: "fly-out-top-item" } ) do = link_to project_issues_path(@project) do %strong.fly-out-top-item-name - #{ _('Issues') } + = _('Issues') - if @project.issues_enabled? %span.badge.count.issue_counter.fly-out-badge = number_with_delimiter(@project.open_issues_count) @@ -103,7 +103,7 @@ = nav_link(controller: :issues, action: :index) do = link_to project_issues_path(@project), title: 'Issues' do %span - List + = _('List') = nav_link(controller: :boards) do = link_to project_boards_path(@project), title: boards_link_text do @@ -113,12 +113,12 @@ = nav_link(controller: :labels) do = link_to project_labels_path(@project), title: 'Labels' do %span - Labels + = _('Labels') = nav_link(controller: :milestones) do = link_to project_milestones_path(@project), title: 'Milestones' do %span - Milestones + = _('Milestones') - if project_nav_tab? :external_issue_tracker = nav_link do - issue_tracker = @project.external_issue_tracker @@ -139,54 +139,75 @@ .nav-icon-container = sprite_icon('git-merge') %span.nav-item-name - Merge Requests + = _('Merge Requests') %span.badge.count.merge_counter.js-merge-counter = number_with_delimiter(@project.open_merge_requests_count) %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :merge_requests, html_options: { class: "fly-out-top-item" } ) do = link_to project_merge_requests_path(@project) do %strong.fly-out-top-item-name - #{ _('Merge Requests') } + = _('Merge Requests') %span.badge.count.merge_counter.js-merge-counter.fly-out-badge = number_with_delimiter(@project.open_merge_requests_count) - if project_nav_tab? :pipelines - = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :environments, :artifacts, :clusters, :user, :gcp]) do + = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts]) do = link_to project_pipelines_path(@project), class: 'shortcuts-pipelines' do .nav-icon-container = sprite_icon('pipeline') %span.nav-item-name - CI / CD + = _('CI / CD') %ul.sidebar-sub-level-items - = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :environments, :artifacts, :clusters, :user, :gcp], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], html_options: { class: "fly-out-top-item" } ) do = link_to project_pipelines_path(@project) do %strong.fly-out-top-item-name - #{ _('CI / CD') } + = _('CI / CD') %li.divider.fly-out-top-item - if project_nav_tab? :pipelines = nav_link(path: ['pipelines#index', 'pipelines#show']) do = link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do %span - Pipelines + = _('Pipelines') - if project_nav_tab? :builds = nav_link(controller: [:jobs, :artifacts]) do = link_to project_jobs_path(@project), title: 'Jobs', class: 'shortcuts-builds' do %span - Jobs + = _('Jobs') - if project_nav_tab? :pipelines = nav_link(controller: :pipeline_schedules) do = link_to pipeline_schedules_path(@project), title: 'Schedules', class: 'shortcuts-builds' do %span - Schedules + = _('Schedules') + + - if @project.feature_available?(:builds, current_user) && !@project.empty_repo? + = nav_link(path: 'pipelines#charts') do + = link_to charts_project_pipelines_path(@project), title: 'Charts', class: 'shortcuts-pipelines-charts' do + %span + = _('Charts') + + - if project_nav_tab? :operations + = nav_link(controller: [:environments, :clusters, :user, :gcp]) do + = link_to project_environments_path(@project), class: 'shortcuts-operations' do + .nav-icon-container + = sprite_icon('cloud-gear') + %span.nav-item-name + = _('Operations') + + %ul.sidebar-sub-level-items + = nav_link(controller: [:environments, :clusters, :user, :gcp], html_options: { class: "fly-out-top-item" } ) do + = link_to project_environments_path(@project) do + %strong.fly-out-top-item-name + = _('Operations') + %li.divider.fly-out-top-item - if project_nav_tab? :environments = nav_link(controller: :environments) do = link_to project_environments_path(@project), title: 'Environments', class: 'shortcuts-environments' do %span - Environments + = _('Environments') - if project_nav_tab? :clusters - show_cluster_hint = show_gke_cluster_integration_callout?(@project) @@ -217,19 +238,18 @@ %span= _("Got it!") = sprite_icon('thumb-up') - - if @project.feature_available?(:builds, current_user) && !@project.empty_repo? - = nav_link(path: 'pipelines#charts') do - = link_to charts_project_pipelines_path(@project), title: 'Charts', class: 'shortcuts-pipelines-charts' do - %span - Charts - - if project_nav_tab? :container_registry = nav_link(controller: %w[projects/registry/repositories]) do = link_to project_container_registry_index_path(@project), class: 'shortcuts-container-registry' do .nav-icon-container = sprite_icon('disk') %span.nav-item-name - Registry + = _('Registry') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: %w[projects/registry/repositories], html_options: { class: "fly-out-top-item" } ) do + = link_to project_container_registry_index_path(@project) do + %strong.fly-out-top-item-name + = _('Registry') - if project_nav_tab? :wiki = nav_link(controller: :wikis) do @@ -237,12 +257,12 @@ .nav-icon-container = sprite_icon('book') %span.nav-item-name - Wiki + = _('Wiki') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :wikis, html_options: { class: "fly-out-top-item" } ) do = link_to get_project_wiki_path(@project) do %strong.fly-out-top-item-name - #{ _('Wiki') } + = _('Wiki') - if project_nav_tab? :snippets = nav_link(controller: :snippets) do @@ -250,12 +270,12 @@ .nav-icon-container = sprite_icon('snippet') %span.nav-item-name - Snippets + = _('Snippets') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :snippets, html_options: { class: "fly-out-top-item" } ) do = link_to project_snippets_path(@project) do %strong.fly-out-top-item-name - #{ _('Snippets') } + = _('Snippets') - if project_nav_tab? :settings = nav_link(path: %w[projects#edit project_members#index integrations#show services#edit repository#show ci_cd#show badges#index pages#show]) do @@ -263,7 +283,7 @@ .nav-icon-container = sprite_icon('settings') %span.nav-item-name.qa-settings-item - Settings + = _('Settings') %ul.sidebar-sub-level-items - can_edit = can?(current_user, :admin_project, @project) @@ -271,16 +291,16 @@ = nav_link(path: %w[projects#edit project_members#index integrations#show services#edit repository#show ci_cd#show badges#index pages#show], html_options: { class: "fly-out-top-item" } ) do = link_to edit_project_path(@project) do %strong.fly-out-top-item-name - #{ _('Settings') } + = _('Settings') %li.divider.fly-out-top-item = nav_link(path: %w[projects#edit]) do = link_to edit_project_path(@project), title: 'General' do %span - General + = _('General') = nav_link(controller: :project_members) do = link_to project_project_members_path(@project), title: 'Members' do %span - Members + = _('Members') - if can_edit = nav_link(controller: :badges) do = link_to project_settings_badges_path(@project), title: _('Badges') do @@ -290,21 +310,21 @@ = nav_link(controller: [:integrations, :services, :hooks, :hook_logs]) do = link_to project_settings_integrations_path(@project), title: 'Integrations' do %span - Integrations + = _('Integrations') = nav_link(controller: :repository) do = link_to project_settings_repository_path(@project), title: 'Repository' do %span - Repository + = _('Repository') - if @project.feature_available?(:builds, current_user) = nav_link(controller: :ci_cd) do = link_to project_settings_ci_cd_path(@project), title: 'CI / CD' do %span - CI / CD + = _('CI / CD') - if @project.pages_available? = nav_link(controller: :pages) do = link_to project_pages_path(@project), title: 'Pages' do %span - Pages + = _('Pages') - else = nav_link(controller: :project_members) do @@ -312,12 +332,12 @@ .nav-icon-container = sprite_icon('users') %span.nav-item-name - Members + = _('Members') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(path: %w[members#show], html_options: { class: "fly-out-top-item" } ) do = link_to project_project_members_path(@project) do %strong.fly-out-top-item-name - #{ _('Members') } + = _('Members') = render 'shared/sidebar_toggle_button' diff --git a/changelogs/unreleased/43673-operations-tab-mvc.yml b/changelogs/unreleased/43673-operations-tab-mvc.yml new file mode 100644 index 00000000000..cd580e7a8d6 --- /dev/null +++ b/changelogs/unreleased/43673-operations-tab-mvc.yml @@ -0,0 +1,5 @@ +--- +title: Move project sidebar sub-entries 'Environments' and 'Kubernetes' from 'CI/CD' to a new entry 'Operations' +merge_request: 18941 +author: +type: changed diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 1179f71353a..90cdfd0dd03 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-14 10:49+0200\n" -"PO-Revision-Date: 2018-05-14 10:49+0200\n" +"POT-Creation-Date: 2018-05-15 15:05+0200\n" +"PO-Revision-Date: 2018-05-15 15:05+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -53,6 +53,16 @@ msgid_plural "%d metrics" msgstr[0] "" msgstr[1] "" +msgid "%d staged change" +msgid_plural "%d staged changes" +msgstr[0] "" +msgstr[1] "" + +msgid "%d unstaged change" +msgid_plural "%d unstaged changes" +msgstr[0] "" +msgstr[1] "" + msgid "%s additional commit has been omitted to prevent performance issues." msgid_plural "%s additional commits have been omitted to prevent performance issues." msgstr[0] "" @@ -101,6 +111,9 @@ msgstr "" msgid "%{title} changes" msgstr "" +msgid "%{unstaged} unstaged and %{staged} staged changes" +msgstr "" + msgid "(checkout the %{link} for information on how to install it)." msgstr "" @@ -207,6 +220,9 @@ msgstr "" msgid "Active" msgstr "" +msgid "Active Sessions" +msgstr "" + msgid "Activity" msgstr "" @@ -315,6 +331,9 @@ msgstr "" msgid "An error occurred when toggling the notification subscription" msgstr "" +msgid "An error occurred while dismissing the alert. Refresh the page and try again." +msgstr "" + msgid "An error occurred while dismissing the feature highlight. Refresh the page and try dismissing again." msgstr "" @@ -1022,6 +1041,9 @@ msgstr "" msgid "ClusterIntegration|Environment scope" msgstr "" +msgid "ClusterIntegration|Every new Google Cloud Platform (GCP) account receives $300 in credit upon %{sign_up_link}. In partnership with Google, GitLab is able to offer an additional $200 for new GCP accounts to get started with GitLab's Google Kubernetes Engine Integration." +msgstr "" + msgid "ClusterIntegration|GitLab Integration" msgstr "" @@ -1145,6 +1167,9 @@ msgstr "" msgid "ClusterIntegration|Read our %{link_to_help_page} on Kubernetes cluster integration." msgstr "" +msgid "ClusterIntegration|Redeem up to $500 in free credit for Google Cloud Platform" +msgstr "" + msgid "ClusterIntegration|Remove Kubernetes cluster integration" msgstr "" @@ -1235,6 +1260,9 @@ msgstr "" msgid "ClusterIntegration|properly configured" msgstr "" +msgid "ClusterIntegration|sign up" +msgstr "" + msgid "Collapse" msgstr "" @@ -1359,6 +1387,9 @@ msgstr "" msgid "Configure limits for web and API requests." msgstr "" +msgid "Configure push mirrors." +msgstr "" + msgid "Configure storage path and circuit breaker settings." msgstr "" @@ -1524,6 +1555,9 @@ msgstr "" msgid "CreateTokenToCloneLink|create a personal access token" msgstr "" +msgid "Created" +msgstr "" + msgid "Cron Timezone" msgstr "" @@ -1595,6 +1629,54 @@ msgstr[1] "" msgid "Deploy Keys" msgstr "" +msgid "DeployKeys|+%{count} others" +msgstr "" + +msgid "DeployKeys|Current project" +msgstr "" + +msgid "DeployKeys|Deploy key" +msgstr "" + +msgid "DeployKeys|Enabled deploy keys" +msgstr "" + +msgid "DeployKeys|Error enabling deploy key" +msgstr "" + +msgid "DeployKeys|Error getting deploy keys" +msgstr "" + +msgid "DeployKeys|Error removing deploy key" +msgstr "" + +msgid "DeployKeys|Expand %{count} other projects" +msgstr "" + +msgid "DeployKeys|Loading deploy keys" +msgstr "" + +msgid "DeployKeys|No deploy keys found. Create one with the form above." +msgstr "" + +msgid "DeployKeys|Privately accessible deploy keys" +msgstr "" + +msgid "DeployKeys|Project usage" +msgstr "" + +msgid "DeployKeys|Publicly accessible deploy keys" +msgstr "" + +msgid "DeployKeys|Read access only" +msgstr "" + +msgid "DeployKeys|Write access allowed" +msgstr "" + +msgid "DeployKeys|You are going to remove this deploy key. Are you sure?" +msgstr "" + msgid "DeployTokens|Active Deploy Tokens (%{active_tokens})" msgstr "" @@ -1751,9 +1833,6 @@ msgstr "" msgid "Edit files in the editor and commit changes here" msgstr "" -msgid "Editing" -msgstr "" - msgid "Email" msgstr "" @@ -1793,6 +1872,9 @@ msgstr "" msgid "Enable the Performance Bar for a given group." msgstr "" +msgid "Environments" +msgstr "" + msgid "Environments|An error occurred while fetching the environments." msgstr "" @@ -2005,6 +2087,9 @@ msgstr "" msgid "GPG Keys" msgstr "" +msgid "General" +msgstr "" + msgid "Generate a default set of labels" msgstr "" @@ -2053,6 +2138,9 @@ msgstr "" msgid "Got it!" msgstr "" +msgid "Graph" +msgstr "" + msgid "Group CI/CD settings" msgstr "" @@ -2166,6 +2254,18 @@ msgstr "" msgid "Housekeeping successfully started" msgstr "" +msgid "IDE|Commit" +msgstr "" + +msgid "IDE|Edit" +msgstr "" + +msgid "IDE|Go back" +msgstr "" + +msgid "IDE|Review" +msgstr "" + msgid "If you already have files you can push them using the %{link_to_cli} below." msgstr "" @@ -2199,6 +2299,9 @@ msgstr "" msgid "Instance does not support multiple Kubernetes clusters" msgstr "" +msgid "Integrations" +msgstr "" + msgid "Interested parties can even contribute by pushing commits if they want to." msgstr "" @@ -2336,6 +2439,9 @@ msgstr "" msgid "LastPushEvent|at" msgstr "" +msgid "Latest changes" +msgstr "" + msgid "Learn more" msgstr "" @@ -2360,6 +2466,9 @@ msgstr "" msgid "Leave project" msgstr "" +msgid "List" +msgstr "" + msgid "List your GitHub repositories" msgstr "" @@ -2462,6 +2571,9 @@ msgstr "" msgid "Milestone" msgstr "" +msgid "Milestones" +msgstr "" + msgid "Milestones|Delete milestone" msgstr "" @@ -2719,6 +2831,9 @@ msgstr "" msgid "Opens in a new window" msgstr "" +msgid "Operations" +msgstr "" + msgid "Options" msgstr "" @@ -2878,25 +2993,22 @@ msgstr "" msgid "Pipelines|This project is not currently set up to run pipelines." msgstr "" -msgid "Pipeline|Existing branch name, tag" +msgid "Pipeline|Create for" msgstr "" -msgid "Pipeline|Retry pipeline" +msgid "Pipeline|Create pipeline" msgstr "" -msgid "Pipeline|Retry pipeline #%{pipelineId}?" +msgid "Pipeline|Existing branch name or tag" msgstr "" msgid "Pipeline|Run Pipeline" msgstr "" -msgid "Pipeline|Run on" -msgstr "" - -msgid "Pipeline|Run pipeline" +msgid "Pipeline|Search branches" msgstr "" -msgid "Pipeline|Search branches" +msgid "Pipeline|Specify variable values to be used in this run. The values specified in %{settings_link} will be used by default." msgstr "" msgid "Pipeline|Stop pipeline" @@ -2905,7 +3017,7 @@ msgstr "" msgid "Pipeline|Stop pipeline #%{pipelineId}?" msgstr "" -msgid "Pipeline|You’re about to retry pipeline %{pipelineId}." +msgid "Pipeline|Variables" msgstr "" msgid "Pipeline|You’re about to stop pipeline %{pipelineId}." @@ -3022,6 +3134,9 @@ msgstr "" msgid "Progress" msgstr "" +msgid "Project" +msgstr "" + msgid "Project '%{project_name}' is in the process of being deleted." msgstr "" @@ -3073,9 +3188,6 @@ msgstr "" msgid "ProjectLifecycle|Stage" msgstr "" -msgid "ProjectNetworkGraph|Graph" -msgstr "" - msgid "Projects" msgstr "" @@ -3226,6 +3338,9 @@ msgstr "" msgid "Register and see your runners for this group." msgstr "" +msgid "Registry" +msgstr "" + msgid "Related Commits" msgstr "" @@ -3268,6 +3383,9 @@ msgstr "" msgid "Repository maintenance" msgstr "" +msgid "Repository mirror settings" +msgstr "" + msgid "Repository storage" msgstr "" @@ -3363,6 +3481,9 @@ msgstr "" msgid "Search" msgstr "" +msgid "Search branches" +msgstr "" + msgid "Search branches and tags" msgstr "" @@ -3405,6 +3526,9 @@ msgstr "" msgid "Select branch/tag" msgstr "" +msgid "Select source branch" +msgstr "" + msgid "Select target branch" msgstr "" @@ -3937,6 +4061,9 @@ msgstr "" msgid "This merge request is locked." msgstr "" +msgid "This option is disabled while you still have unstaged changes" +msgstr "" + msgid "This page is unavailable because you are not allowed to read information across multiple projects." msgstr "" @@ -4253,9 +4380,6 @@ msgstr "" msgid "Verified" msgstr "" -msgid "View and edit lines" -msgstr "" - msgid "View file @ " msgstr "" @@ -4373,6 +4497,12 @@ msgstr "" msgid "WikiPageConfirmDelete|Are you sure you want to delete this page?" msgstr "" +msgid "WikiPageConfirmDelete|Delete page" +msgstr "" + +msgid "WikiPageConfirmDelete|Delete page %{pageTitle}?" +msgstr "" + msgid "WikiPageConflictMessage|Someone edited the page the same time you did. Please check out %{page_link} and make sure your changes will not unintentionally remove theirs." msgstr "" diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index f28bf430f02..98d4456b277 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -36,16 +36,17 @@ describe 'layouts/nav/sidebar/_project' do expect(rendered).to have_text 'Registry' end - it 'highlights only one tab' do + it 'highlights sidebar item and flyout' do render - expect(rendered).to have_css('.active', count: 1) + expect(rendered).to have_css('.sidebar-top-level-items > li.active', count: 1) + expect(rendered).to have_css('.is-fly-out-only > li.active', count: 1) end - it 'highlights container registry tab only' do + it 'highlights container registry tab' do render - expect(rendered).to have_css('.active', text: 'Registry') + expect(rendered).to have_css('.sidebar-top-level-items > li.active', text: 'Registry') end end end -- cgit v1.2.1 From 57f5541ac1741b16efd2694d18fba9885fb8ed82 Mon Sep 17 00:00:00 2001 From: Simon Knox Date: Wed, 9 May 2018 09:22:38 +1000 Subject: partial check for show/hide compare versions section (cherry picked from commit c06d4d0eeb9f4c360fc138c93fb513a339df5c2b) --- app/assets/javascripts/diffs/components/app.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 3d747fb8253..24b412c827c 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -99,6 +99,7 @@ export default { >
Date: Wed, 9 May 2018 12:34:09 +1000 Subject: correct compare versions content (cherry picked from commit 978d68365b338a64314f2f173493508fae4c849c) --- .../diffs/components/compare_versions.vue | 22 ++++++++---------- .../diffs/components/compare_versions_dropdown.vue | 27 +++++++++++----------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/app/assets/javascripts/diffs/components/compare_versions.vue b/app/assets/javascripts/diffs/components/compare_versions.vue index 84e19fa2c21..b89f2a62f81 100644 --- a/app/assets/javascripts/diffs/components/compare_versions.vue +++ b/app/assets/javascripts/diffs/components/compare_versions.vue @@ -1,14 +1,6 @@ diff --git a/app/controllers/projects/merge_requests/diffs_controller.rb b/app/controllers/projects/merge_requests/diffs_controller.rb index fe433828b59..a18a99bda18 100644 --- a/app/controllers/projects/merge_requests/diffs_controller.rb +++ b/app/controllers/projects/merge_requests/diffs_controller.rb @@ -73,6 +73,7 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic merge_request: @merge_request, merge_request_diff: @merge_request_diff, merge_request_diffs: @merge_request_diffs, + comparable_diffs: @comparable_diffs, start_version: @start_version, commit: @commit, latest_diff: @merge_request_diff&.latest? diff --git a/app/serializers/diffs_entity.rb b/app/serializers/diffs_entity.rb index a6cc63177d1..b301a00a946 100644 --- a/app/serializers/diffs_entity.rb +++ b/app/serializers/diffs_entity.rb @@ -9,6 +9,10 @@ class DiffsEntity < Grape::Entity options[:merge_request]&.source_branch end + expose :target_branch_name do |diffs| + options[:merge_request]&.target_branch + end + expose :commit do |diffs| options[:commit] end @@ -17,7 +21,7 @@ class DiffsEntity < Grape::Entity options[:merge_request_diff] end - expose :start_version do |diffs| + expose :start_version, using: MergeRequestDiffEntity do |diffs| options[:start_version] end @@ -58,4 +62,8 @@ class DiffsEntity < Grape::Entity expose :merge_request_diffs, using: MergeRequestDiffEntity, if: -> (_, options) { options[:merge_request_diffs].any? } do |diffs| options[:merge_request_diffs] end + + expose :comparable_diffs, using: MergeRequestDiffEntity do |diffs| + options[:comparable_diffs] + end end diff --git a/app/serializers/merge_request_diff_entity.rb b/app/serializers/merge_request_diff_entity.rb index 2840e4fd547..d194c8988f3 100644 --- a/app/serializers/merge_request_diff_entity.rb +++ b/app/serializers/merge_request_diff_entity.rb @@ -12,6 +12,8 @@ class MergeRequestDiffEntity < Grape::Entity expose :created_at expose :commits_count + expose :latest?, as: :latest + expose :short_commit_sha do |merge_request_diff| short_sha(merge_request_diff.head_commit_sha) end @@ -20,6 +22,6 @@ class MergeRequestDiffEntity < Grape::Entity merge_request = options[:merge_request] project = merge_request.source_project - merge_request_version_path(project, merge_request, merge_request_diff, merge_request_diff.head_commit_sha) + merge_request_version_path(project, merge_request, merge_request_diff, @start_sha) end end -- cgit v1.2.1 From 2052c72c0bacb39c1063a4c942c8b085ff9aa11a Mon Sep 17 00:00:00 2001 From: Simon Knox Date: Tue, 15 May 2018 11:39:51 +1000 Subject: fix latest version url (cherry picked from commit 9d82d141bef64c26cba30274dcd1835a0a834ffa) --- app/assets/javascripts/diffs/components/app.vue | 46 +++++++++++++++++++--- .../diffs/components/diff_discussions.vue | 2 +- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 6971e9c7dbf..877be0f7897 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -1,6 +1,7 @@