diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-29 11:06:00 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-29 11:06:00 +0100 |
commit | dd17a4840659467628d9390139e4430a05349175 (patch) | |
tree | 67867bf87afa1dc3daf48bc703bc32a5711858c1 /app | |
parent | 782c31a494faeda9e30ed453953b2be2f80cd5c0 (diff) | |
download | gitlab-ce-dd17a4840659467628d9390139e4430a05349175.tar.gz |
added correct help path to empty state
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/ide/components/pipelines/list.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ide/index.js | 9 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/actions.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/mutation_types.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/mutations.js | 3 | ||||
-rw-r--r-- | app/views/ide/index.html.haml | 3 |
6 files changed, 18 insertions, 4 deletions
diff --git a/app/assets/javascripts/ide/components/pipelines/list.vue b/app/assets/javascripts/ide/components/pipelines/list.vue index b8d05e95a7d..138807492eb 100644 --- a/app/assets/javascripts/ide/components/pipelines/list.vue +++ b/app/assets/javascripts/ide/components/pipelines/list.vue @@ -20,7 +20,7 @@ export default { EmptyState, }, computed: { - ...mapState(['pipelinesEmptyStateSvgPath']), + ...mapState(['pipelinesEmptyStateSvgPath', 'links']), ...mapGetters(['currentProject']), ...mapGetters('pipelines', ['jobsCount', 'failedJobsCount', 'failedStages', 'pipelineFailed']), ...mapState('pipelines', ['isLoadingPipeline', 'latestPipeline', 'stages', 'isLoadingJobs']), @@ -79,7 +79,7 @@ export default { </header> <empty-state v-if="latestPipeline === false" - help-page-path="a" + :help-page-path="links.ciHelpPagePath" :empty-state-svg-path="pipelinesEmptyStateSvgPath" :can-set-ci="true" /> diff --git a/app/assets/javascripts/ide/index.js b/app/assets/javascripts/ide/index.js index e7b98a9533f..2d74192e6b3 100644 --- a/app/assets/javascripts/ide/index.js +++ b/app/assets/javascripts/ide/index.js @@ -1,4 +1,5 @@ import Vue from 'vue'; +import { mapActions } from 'vuex'; import Translate from '~/vue_shared/translate'; import ide from './components/ide.vue'; import store from './stores'; @@ -17,12 +18,18 @@ export function initIde(el) { ide, }, created() { - this.$store.dispatch('setEmptyStateSvgs', { + this.setEmptyStateSvgs({ emptyStateSvgPath: el.dataset.emptyStateSvgPath, noChangesStateSvgPath: el.dataset.noChangesStateSvgPath, committedStateSvgPath: el.dataset.committedStateSvgPath, pipelinesEmptyStateSvgPath: el.dataset.pipelinesEmptyStateSvgPath, }); + this.setLinks({ + ciHelpPagePath: el.dataset.ciHelpPagePath, + }); + }, + methods: { + ...mapActions(['setEmptyStateSvgs', 'setLinks']), }, render(createElement) { return createElement('ide'); diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js index 2b55a09f2a6..3dc365eaead 100644 --- a/app/assets/javascripts/ide/stores/actions.js +++ b/app/assets/javascripts/ide/stores/actions.js @@ -173,6 +173,8 @@ export const setRightPane = ({ commit }, view) => { commit(types.SET_RIGHT_PANE, view); }; +export const setLinks = ({ commit }, links) => commit(types.SET_LINKS, links); + export * from './actions/tree'; export * from './actions/file'; export * from './actions/project'; diff --git a/app/assets/javascripts/ide/stores/mutation_types.js b/app/assets/javascripts/ide/stores/mutation_types.js index 27e91573510..fbfb92105d6 100644 --- a/app/assets/javascripts/ide/stores/mutation_types.js +++ b/app/assets/javascripts/ide/stores/mutation_types.js @@ -6,6 +6,7 @@ export const SET_LEFT_PANEL_COLLAPSED = 'SET_LEFT_PANEL_COLLAPSED'; export const SET_RIGHT_PANEL_COLLAPSED = 'SET_RIGHT_PANEL_COLLAPSED'; export const SET_RESIZING_STATUS = 'SET_RESIZING_STATUS'; export const SET_EMPTY_STATE_SVGS = 'SET_EMPTY_STATE_SVGS'; +export const SET_LINKS = 'SET_LINKS'; // Project Mutation Types export const SET_PROJECT = 'SET_PROJECT'; diff --git a/app/assets/javascripts/ide/stores/mutations.js b/app/assets/javascripts/ide/stores/mutations.js index 20f655f2321..eeaa7cb0ec3 100644 --- a/app/assets/javascripts/ide/stores/mutations.js +++ b/app/assets/javascripts/ide/stores/mutations.js @@ -154,6 +154,9 @@ export default { rightPane: state.rightPane === view ? null : view, }); }, + [types.SET_LINKS](state, links) { + Object.assign(state, { links }); + }, ...projectMutations, ...mergeRequestMutation, ...fileMutations, diff --git a/app/views/ide/index.html.haml b/app/views/ide/index.html.haml index 3e553fb7bd9..9f8b0acd763 100644 --- a/app/views/ide/index.html.haml +++ b/app/views/ide/index.html.haml @@ -4,7 +4,8 @@ #ide.ide-loading{ data: {"empty-state-svg-path" => image_path('illustrations/multi_file_editor_empty.svg'), "no-changes-state-svg-path" => image_path('illustrations/multi-editor_no_changes_empty.svg'), "committed-state-svg-path" => image_path('illustrations/multi-editor_all_changes_committed_empty.svg'), - "pipelines-empty-state-svg-path": image_path('illustrations/pipelines_empty.svg') } } + "pipelines-empty-state-svg-path": image_path('illustrations/pipelines_empty.svg'), + "ci-help-page-path" => help_page_path('ci/quick_start/README'), } } .text-center = icon('spinner spin 2x') %h2.clgray= _('Loading the GitLab IDE...') |