Commit df3d4764 authored by Filipa Lacerda's avatar Filipa Lacerda

Adds documentation link to the autodevops popover

parent 1fb2c1ca
...@@ -35,6 +35,7 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -35,6 +35,7 @@ document.addEventListener('DOMContentLoaded', () => {
propsData: { propsData: {
endpoint: pipelineTableViewEl.dataset.endpoint, endpoint: pipelineTableViewEl.dataset.endpoint,
helpPagePath: pipelineTableViewEl.dataset.helpPagePath, helpPagePath: pipelineTableViewEl.dataset.helpPagePath,
autoDevopsHelpPath: pipelineTableViewEl.dataset.helpAutoDevopsPath,
}, },
}).$mount(); }).$mount();
pipelineTableViewEl.appendChild(table.$el); pipelineTableViewEl.appendChild(table.$el);
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
type: String, type: String,
required: true, required: true,
}, },
autoDevopsHelpPath: {
type: String,
required: true,
},
}, },
mixins: [ mixins: [
pipelinesMixin, pipelinesMixin,
...@@ -95,6 +99,7 @@ ...@@ -95,6 +99,7 @@
<pipelines-table-component <pipelines-table-component
:pipelines="state.pipelines" :pipelines="state.pipelines"
:update-graph-dropdown="updateGraphDropdown" :update-graph-dropdown="updateGraphDropdown"
:auto-devops-help-path="autoDevopsHelpPath"
/> />
</div> </div>
</div> </div>
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
type: Object, type: Object,
required: true, required: true,
}, },
autoDevopsHelpPath: {
type: String,
required: true,
},
}, },
components: { components: {
userAvatarLink, userAvatarLink,
...@@ -25,7 +29,7 @@ ...@@ -25,7 +29,7 @@
return '<div class="autodevops-title">This pipeline makes use of a predefined CI/CD configuration enabled by <b>Auto DevOps.</b></div>'; return '<div class="autodevops-title">This pipeline makes use of a predefined CI/CD configuration enabled by <b>Auto DevOps.</b></div>';
}, },
autoDevOpsContent() { autoDevOpsContent() {
return '<a class="autodevops-link" href="">Learn more about Auto DevOps</a>'; return `<a class="autodevops-link" href="${this.autoDevopsHelpPath}" target="_blank" rel="noopener noreferrer nofollow">Learn more about Auto DevOps</a>`;
}, },
}, },
}; };
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
endpoint: pipelinesData.endpoint, endpoint: pipelinesData.endpoint,
cssClass: pipelinesData.cssClass, cssClass: pipelinesData.cssClass,
helpPagePath: pipelinesData.helpPagePath, helpPagePath: pipelinesData.helpPagePath,
autoDevopsPath: pipelinesData.helpautoDevopsPath,
newPipelinePath: pipelinesData.newPipelinePath, newPipelinePath: pipelinesData.newPipelinePath,
canCreatePipeline: pipelinesData.canCreatePipeline, canCreatePipeline: pipelinesData.canCreatePipeline,
allPath: pipelinesData.allPath, allPath: pipelinesData.allPath,
...@@ -200,6 +201,7 @@ ...@@ -200,6 +201,7 @@
<pipelines-table-component <pipelines-table-component
:pipelines="state.pipelines" :pipelines="state.pipelines"
:update-graph-dropdown="updateGraphDropdown" :update-graph-dropdown="updateGraphDropdown"
:auto-devops-help-path="autoDevopsPath"
/> />
</div> </div>
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
required: false, required: false,
default: false, default: false,
}, },
autoDevopsHelpPath: {
type: String,
required: true,
},
}, },
components: { components: {
pipelinesTableRowComponent, pipelinesTableRowComponent,
...@@ -54,6 +58,7 @@ ...@@ -54,6 +58,7 @@
:key="model.id" :key="model.id"
:pipeline="model" :pipeline="model"
:update-graph-dropdown="updateGraphDropdown" :update-graph-dropdown="updateGraphDropdown"
:auto-devops-help-path="autoDevopsHelpPath"
/> />
</div> </div>
</template> </template>
...@@ -25,6 +25,10 @@ export default { ...@@ -25,6 +25,10 @@ export default {
required: false, required: false,
default: false, default: false,
}, },
autoDevopsHelpPath: {
type: String,
required: true,
},
}, },
components: { components: {
asyncButtonComponent, asyncButtonComponent,
...@@ -218,7 +222,10 @@ export default { ...@@ -218,7 +222,10 @@ export default {
</div> </div>
</div> </div>
<pipeline-url :pipeline="pipeline" /> <pipeline-url
:pipeline="pipeline"
:auto-devops-help-path="autoDevopsHelpPath"
/>
<div class="table-section section-25"> <div class="table-section section-25">
<div <div
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#commit-pipeline-table-view{ data: { disable_initialization: disable_initialization, #commit-pipeline-table-view{ data: { disable_initialization: disable_initialization,
endpoint: endpoint, endpoint: endpoint,
"help-page-path" => help_page_path('ci/quick_start/README'), "help-page-path" => help_page_path('ci/quick_start/README'),
"help-auto-devops-path" => help_page_path('topics/autodevops/index.md'),
} } } }
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#pipelines-list-vue{ data: { endpoint: project_pipelines_path(@project, format: :json), #pipelines-list-vue{ data: { endpoint: project_pipelines_path(@project, format: :json),
"css-class" => container_class, "css-class" => container_class,
"help-page-path" => help_page_path('ci/quick_start/README'), "help-page-path" => help_page_path('ci/quick_start/README'),
"help-auto-devops-path" => help_page_path('topics/autodevops/index.md'),
"new-pipeline-path" => new_project_pipeline_path(@project), "new-pipeline-path" => new_project_pipeline_path(@project),
"can-create-pipeline" => can?(current_user, :create_pipeline, @project).to_s, "can-create-pipeline" => can?(current_user, :create_pipeline, @project).to_s,
"all-path" => project_pipelines_path(@project), "all-path" => project_pipelines_path(@project),
......
...@@ -29,6 +29,7 @@ describe('Pipelines table in Commits and Merge requests', () => { ...@@ -29,6 +29,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
propsData: { propsData: {
endpoint: 'endpoint', endpoint: 'endpoint',
helpPagePath: 'foo', helpPagePath: 'foo',
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
}); });
...@@ -64,6 +65,7 @@ describe('Pipelines table in Commits and Merge requests', () => { ...@@ -64,6 +65,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
propsData: { propsData: {
endpoint: 'endpoint', endpoint: 'endpoint',
helpPagePath: 'foo', helpPagePath: 'foo',
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
}); });
...@@ -115,6 +117,7 @@ describe('Pipelines table in Commits and Merge requests', () => { ...@@ -115,6 +117,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
propsData: { propsData: {
endpoint: 'endpoint', endpoint: 'endpoint',
helpPagePath: 'foo', helpPagePath: 'foo',
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
element.appendChild(this.component.$el); element.appendChild(this.component.$el);
...@@ -136,6 +139,7 @@ describe('Pipelines table in Commits and Merge requests', () => { ...@@ -136,6 +139,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
propsData: { propsData: {
endpoint: 'endpoint', endpoint: 'endpoint',
helpPagePath: 'foo', helpPagePath: 'foo',
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
}); });
......
...@@ -16,6 +16,7 @@ describe('Pipeline Url Component', () => { ...@@ -16,6 +16,7 @@ describe('Pipeline Url Component', () => {
path: 'foo', path: 'foo',
flags: {}, flags: {},
}, },
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
...@@ -30,6 +31,7 @@ describe('Pipeline Url Component', () => { ...@@ -30,6 +31,7 @@ describe('Pipeline Url Component', () => {
path: 'foo', path: 'foo',
flags: {}, flags: {},
}, },
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
...@@ -50,6 +52,7 @@ describe('Pipeline Url Component', () => { ...@@ -50,6 +52,7 @@ describe('Pipeline Url Component', () => {
path: '/', path: '/',
}, },
}, },
autoDevopsHelpPath: 'foo',
}; };
const component = new PipelineUrlComponent({ const component = new PipelineUrlComponent({
...@@ -73,6 +76,7 @@ describe('Pipeline Url Component', () => { ...@@ -73,6 +76,7 @@ describe('Pipeline Url Component', () => {
path: 'foo', path: 'foo',
flags: {}, flags: {},
}, },
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
...@@ -91,6 +95,7 @@ describe('Pipeline Url Component', () => { ...@@ -91,6 +95,7 @@ describe('Pipeline Url Component', () => {
stuck: true, stuck: true,
}, },
}, },
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
...@@ -112,6 +117,7 @@ describe('Pipeline Url Component', () => { ...@@ -112,6 +117,7 @@ describe('Pipeline Url Component', () => {
auto_devops: true, auto_devops: true,
}, },
}, },
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
......
...@@ -9,7 +9,7 @@ describe('Pipelines Table Row', () => { ...@@ -9,7 +9,7 @@ describe('Pipelines Table Row', () => {
el: document.querySelector('.test-dom-element'), el: document.querySelector('.test-dom-element'),
propsData: { propsData: {
pipeline, pipeline,
service: {}, autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
}; };
......
...@@ -22,6 +22,7 @@ describe('Pipelines Table', () => { ...@@ -22,6 +22,7 @@ describe('Pipelines Table', () => {
component = new PipelinesTableComponent({ component = new PipelinesTableComponent({
propsData: { propsData: {
pipelines: [], pipelines: [],
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
}); });
...@@ -47,6 +48,7 @@ describe('Pipelines Table', () => { ...@@ -47,6 +48,7 @@ describe('Pipelines Table', () => {
const component = new PipelinesTableComponent({ const component = new PipelinesTableComponent({
propsData: { propsData: {
pipelines: [], pipelines: [],
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
expect(component.$el.querySelectorAll('.commit.gl-responsive-table-row').length).toEqual(0); expect(component.$el.querySelectorAll('.commit.gl-responsive-table-row').length).toEqual(0);
...@@ -58,6 +60,7 @@ describe('Pipelines Table', () => { ...@@ -58,6 +60,7 @@ describe('Pipelines Table', () => {
const component = new PipelinesTableComponent({ const component = new PipelinesTableComponent({
propsData: { propsData: {
pipelines: [pipeline], pipelines: [pipeline],
autoDevopsHelpPath: 'foo',
}, },
}).$mount(); }).$mount();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment