diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-04 14:56:27 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-04 14:56:27 +0100 |
commit | ccca73d779ae0e22a86c9586fd52b15a8600b9f3 (patch) | |
tree | 7385d9a2019bfa98affe9bc83c0afd7da2fd730d /app/assets/javascripts/vue_shared/components/pipelines_table.js | |
parent | c252c03401881fd7dbf7fab984285c402eb31d5f (diff) | |
parent | 5f7ebfb9aa023849b8b296bf9cf0f472b886d072 (diff) | |
download | gitlab-ce-ccca73d779ae0e22a86c9586fd52b15a8600b9f3.tar.gz |
Merge branch 'master' into add-sentry-js-again-with-vue
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/pipelines_table.js')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/pipelines_table.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/pipelines_table.js b/app/assets/javascripts/vue_shared/components/pipelines_table.js new file mode 100644 index 00000000000..afd8d7acf6b --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/pipelines_table.js @@ -0,0 +1,48 @@ +import PipelinesTableRowComponent from './pipelines_table_row'; + +/** + * Pipelines Table Component. + * + * Given an array of objects, renders a table. + */ +export default { + props: { + pipelines: { + type: Array, + required: true, + default: () => ([]), + }, + + service: { + type: Object, + required: true, + }, + }, + + components: { + 'pipelines-table-row-component': PipelinesTableRowComponent, + }, + + template: ` + <table class="table ci-table"> + <thead> + <tr> + <th class="js-pipeline-status pipeline-status">Status</th> + <th class="js-pipeline-info pipeline-info">Pipeline</th> + <th class="js-pipeline-commit pipeline-commit">Commit</th> + <th class="js-pipeline-stages pipeline-stages">Stages</th> + <th class="js-pipeline-date pipeline-date"></th> + <th class="js-pipeline-actions pipeline-actions"></th> + </tr> + </thead> + <tbody> + <template v-for="model in pipelines" + v-bind:model="model"> + <tr is="pipelines-table-row-component" + :pipeline="model" + :service="service"></tr> + </template> + </tbody> + </table> + `, +}; |