From 286fe61013674fe2d245ffc8d2233baf09923e70 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 13 Mar 2020 12:09:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/api.js | 35 -------- .../components/commit_sidebar/editor_header.vue | 30 ++----- .../ide/components/commit_sidebar/form.vue | 14 +--- .../ide/components/commit_sidebar/list.vue | 55 +++--------- .../ide/components/commit_sidebar/list_item.vue | 16 +--- .../javascripts/ide/components/file_row_extra.vue | 13 +-- .../ide/components/repo_commit_section.vue | 22 +---- .../logs/components/environment_logs.vue | 98 +++++++++++++++++----- .../logs/components/log_control_buttons.vue | 57 +++++++------ app/assets/javascripts/logs/stores/actions.js | 86 +++++++++++++------ app/assets/javascripts/logs/stores/getters.js | 10 +-- .../javascripts/logs/stores/mutation_types.js | 3 + app/assets/javascripts/logs/stores/mutations.js | 52 +++++++++--- app/assets/javascripts/logs/stores/state.js | 13 ++- app/assets/javascripts/logs/utils.js | 5 ++ .../javascripts/pages/admin/sessions/index.js | 1 + .../javascripts/releases/components/app_index.vue | 49 ++++++++--- app/assets/javascripts/releases/mount_index.js | 6 +- .../vue_shared/components/changed_file_icon.vue | 14 +--- 19 files changed, 298 insertions(+), 281 deletions(-) create mode 100644 app/assets/javascripts/pages/admin/sessions/index.js (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index c85e5b68f5f..dc6ea148047 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -492,41 +492,6 @@ const Api = { buildUrl(url) { return joinPaths(gon.relative_url_root || '', url.replace(':version', gon.api_version)); }, - - /** - * Returns pods logs for an environment with an optional pod and container - * - * @param {Object} params - * @param {Object} param.environment - Environment object - * @param {string=} params.podName - Pod name, if not set the backend assumes a default one - * @param {string=} params.containerName - Container name, if not set the backend assumes a default one - * @param {string=} params.start - Starting date to query the logs in ISO format - * @param {string=} params.end - Ending date to query the logs in ISO format - * @returns {Promise} Axios promise for the result of a GET request of logs - */ - getPodLogs({ environment, podName, containerName, search, start, end }) { - const url = this.buildUrl(environment.logs_api_path); - - const params = {}; - - if (podName) { - params.pod_name = podName; - } - if (containerName) { - params.container_name = containerName; - } - if (search) { - params.search = search; - } - if (start) { - params.start = start; - } - if (end) { - params.end = end; - } - - return axios.get(url, { params }); - }, }; export default Api; diff --git a/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue b/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue index 3398cd091ba..e618fb3daae 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue @@ -24,25 +24,19 @@ export default { discardModalTitle() { return sprintf(__('Discard changes to %{path}?'), { path: this.activeFile.path }); }, - actionButtonText() { - return this.activeFile.staged ? __('Unstage') : __('Stage'); - }, isStaged() { return !this.activeFile.changed && this.activeFile.staged; }, }, methods: { ...mapActions(['stageChange', 'unstageChange', 'discardFileChanges']), - actionButtonClicked() { - if (this.activeFile.staged) { - this.unstageChange(this.activeFile.path); - } else { - this.stageChange(this.activeFile.path); - } - }, showDiscardModal() { this.$refs.discardModal.show(); }, + discardChanges(path) { + this.unstageChange(path); + this.discardFileChanges(path); + }, }, }; @@ -65,19 +59,7 @@ export default { class="btn btn-remove btn-inverted append-right-8" @click="showDiscardModal" > - {{ __('Discard') }} - - {{ __("You will lose all changes you've made to this file. This action cannot be undone.") }} diff --git a/app/assets/javascripts/ide/components/commit_sidebar/form.vue b/app/assets/javascripts/ide/components/commit_sidebar/form.vue index 5ec3fc4041b..f6ca728defc 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/form.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/form.vue @@ -1,6 +1,6 @@ @@ -95,24 +78,6 @@ export default { {{ titleText }}
-