From f46acfc7abd72342bbd07cd9e87b0d5a3740a8b6 Mon Sep 17 00:00:00 2001 From: Regis Date: Tue, 25 Oct 2016 16:00:38 -0600 Subject: integrate vue components, use intance variables to pass data to vue --- app/views/projects/pipelines/index.html.haml | 52 +++++++++++++++++++--------- 1 file changed, 36 insertions(+), 16 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 4bc49072f35..8bd9afd05ce 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -36,21 +36,41 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - %div.content-list.pipelines - - stages = @pipelines.stages - - if @pipelines.blank? - %div - .nothing-here-block No pipelines to show - - else - .table-holder - %table.table.ci-table - %thead - %th Status - %th Pipeline - %th Commit - %th Stages - %th - %th.hidden-xs - = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages + .app + -# %div.content-list.pipelines + -# - stages = @pipelines.stages + -# - if @pipelines.blank? + -# %div + -# .nothing-here-block No pipelines to show + -# - else + -# .table-holder + -# %table.table.ci-table + -# %thead + -# %th Status + -# %th Pipeline + -# %th Commit + -# %th Stages + -# %th + -# %th.hidden-xs + -# = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages = paginate @pipelines, theme: 'gitlab' + +:javascript + var VuePipeLines = gl.VuePipeLines + var VuePipeLine = gl.VuePipeLine + + Vue.component('vue-pipelines', VuePipeLines) + Vue.component('vue-pipeline', VuePipeLine) + + new Vue({ + el: ".app", + data:{ + pipelines: JSON.parse('#{@pipelines.to_json}'), + count: JSON.parse('#{@pipeline_count.to_json}') + }, + template: "" + + "
" + + "" + + "
" + }) -- cgit v1.2.3 From e1ad87c70d10c6a329586c8553442e69e258fff2 Mon Sep 17 00:00:00 2001 From: Regis Date: Wed, 26 Oct 2016 12:47:35 -0600 Subject: follow eslint in HAML file as well --- app/views/projects/pipelines/index.html.haml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 8bd9afd05ce..c6f0ab87f8d 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -57,20 +57,17 @@ = paginate @pipelines, theme: 'gitlab' :javascript - var VuePipeLines = gl.VuePipeLines - var VuePipeLine = gl.VuePipeLine - - Vue.component('vue-pipelines', VuePipeLines) - Vue.component('vue-pipeline', VuePipeLine) + Vue.component('vue-pipelines', gl.VuePipeLines); + Vue.component('vue-pipeline', gl.VuePipeLine); new Vue({ el: ".app", data:{ pipelines: JSON.parse('#{@pipelines.to_json}'), - count: JSON.parse('#{@pipeline_count.to_json}') + count: JSON.parse('#{@pipeline_count.to_json}'), }, template: "" + "
" + "" - + "
" + + "", }) -- cgit v1.2.3 From 50b4c2dc0f2844c7017a352a1df0b919f2bcc51d Mon Sep 17 00:00:00 2001 From: Regis Date: Thu, 27 Oct 2016 15:53:29 -0600 Subject: getting somewhere - now need to fix loop --- app/views/projects/pipelines/index.html.haml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index c6f0ab87f8d..085bef11338 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -36,22 +36,16 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - .app - -# %div.content-list.pipelines - -# - stages = @pipelines.stages - -# - if @pipelines.blank? - -# %div - -# .nothing-here-block No pipelines to show - -# - else - -# .table-holder - -# %table.table.ci-table - -# %thead - -# %th Status - -# %th Pipeline - -# %th Commit - -# %th Stages - -# %th - -# %th.hidden-xs + %div.content-list.pipelines + - stages = @pipelines.stages + - if @pipelines.blank? + %div + .nothing-here-block No pipelines to show + - else + .table-holder + %table.table.ci-table + %thead + %tbody.app -# = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages = paginate @pipelines, theme: 'gitlab' -- cgit v1.2.3 From dc476fe6ff1c55a992fce8483b9f8a4762e302fa Mon Sep 17 00:00:00 2001 From: Regis Date: Sat, 29 Oct 2016 13:50:08 -0600 Subject: stashing --- app/views/projects/pipelines/index.html.haml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 085bef11338..30625e399b0 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -44,15 +44,11 @@ - else .table-holder %table.table.ci-table - %thead %tbody.app - -# = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages - - = paginate @pipelines, theme: 'gitlab' :javascript Vue.component('vue-pipelines', gl.VuePipeLines); - Vue.component('vue-pipeline', gl.VuePipeLine); + Vue.component('vue-runner-status', gl.VueRunnerStatus); new Vue({ el: ".app", -- cgit v1.2.3 From 66727f74b806a978c4bf76a8e9bd4b86c6443651 Mon Sep 17 00:00:00 2001 From: Regis Date: Sun, 30 Oct 2016 01:28:57 -0600 Subject: change architecture - add store - make api call by default --- app/views/projects/pipelines/index.html.haml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 30625e399b0..7cb77f2034b 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -47,17 +47,20 @@ %tbody.app :javascript - Vue.component('vue-pipelines', gl.VuePipeLines); - Vue.component('vue-runner-status', gl.VueRunnerStatus); + Vue.use(VueResource); - new Vue({ + var vm = new Vue({ el: ".app", data:{ - pipelines: JSON.parse('#{@pipelines.to_json}'), - count: JSON.parse('#{@pipeline_count.to_json}'), + scope: "#{@project.id}", + store: new gl.PipelineStore(), + }, + components: { + 'vue-commit-link': gl.VueCommitLink, + 'vue-pipelines': gl.VuePipeLines, }, template: "" + "
" - + "" + + "" + "
", }) -- cgit v1.2.3 From 384ea58f72d73c858769b22c81e5345e9e3e09bc Mon Sep 17 00:00:00 2001 From: Regis Date: Sun, 30 Oct 2016 14:46:31 -0600 Subject: change to more component like structure for reusable components --- app/views/projects/pipelines/index.html.haml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 7cb77f2034b..6309de51409 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -56,7 +56,6 @@ store: new gl.PipelineStore(), }, components: { - 'vue-commit-link': gl.VueCommitLink, 'vue-pipelines': gl.VuePipeLines, }, template: "" -- cgit v1.2.3 From 1439b9b8d688e5650be565bd6ffe890ba4393c82 Mon Sep 17 00:00:00 2001 From: Regis Date: Sun, 30 Oct 2016 22:11:57 -0600 Subject: can grab commits prior to pipelines - might need more custom API --- app/views/projects/pipelines/index.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 6309de51409..718e6b73c93 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -53,6 +53,7 @@ el: ".app", data:{ scope: "#{@project.id}", + commits: "#{@commit}", store: new gl.PipelineStore(), }, components: { -- cgit v1.2.3 From 5ed18942685d70d556f035d6eb00d374cf0a7606 Mon Sep 17 00:00:00 2001 From: Regis Date: Sun, 30 Oct 2016 22:14:15 -0600 Subject: remove non existant commit value --- app/views/projects/pipelines/index.html.haml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 718e6b73c93..6309de51409 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -53,7 +53,6 @@ el: ".app", data:{ scope: "#{@project.id}", - commits: "#{@commit}", store: new gl.PipelineStore(), }, components: { -- cgit v1.2.3 From a42140d08fea03acf406c64db5de67beee4b8107 Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 31 Oct 2016 13:02:34 -0600 Subject: page specific js - remove inline js - refactor --- app/views/projects/pipelines/index.html.haml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 6309de51409..d7aebe584f8 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -42,24 +42,8 @@ %div .nothing-here-block No pipelines to show - else - .table-holder + .table-holder{"data-project-id": "#{@project.id}"} %table.table.ci-table - %tbody.app + %tbody.vue-pipelines-index -:javascript - Vue.use(VueResource); - - var vm = new Vue({ - el: ".app", - data:{ - scope: "#{@project.id}", - store: new gl.PipelineStore(), - }, - components: { - 'vue-pipelines': gl.VuePipeLines, - }, - template: "" - + "
" - + "" - + "
", - }) += page_specific_javascript_tag('vue_pipelines_index/index.js') \ No newline at end of file -- cgit v1.2.3 From c659ffcbc52c433879c4108276175f28f1105e6f Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 31 Oct 2016 17:17:29 -0600 Subject: breaking more HTML out of template --- app/views/projects/pipelines/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index d7aebe584f8..8bd718749e4 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -44,6 +44,6 @@ - else .table-holder{"data-project-id": "#{@project.id}"} %table.table.ci-table - %tbody.vue-pipelines-index + %tbody#vue-pipelines-index = page_specific_javascript_tag('vue_pipelines_index/index.js') \ No newline at end of file -- cgit v1.2.3 From 9fab5805baf993f0ae466d42ac98a9c1b6b6b213 Mon Sep 17 00:00:00 2001 From: Regis Date: Tue, 1 Nov 2016 18:16:51 -0600 Subject: remove fragment warning - formatting --- app/views/projects/pipelines/index.html.haml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 8bd718749e4..a7d837227d5 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -36,14 +36,12 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - %div.content-list.pipelines + %div.content-list.pipelines{"data-project-id": "#{@project.id}"} - stages = @pipelines.stages - if @pipelines.blank? %div .nothing-here-block No pipelines to show - else - .table-holder{"data-project-id": "#{@project.id}"} - %table.table.ci-table - %tbody#vue-pipelines-index + .vue-pipelines-index = page_specific_javascript_tag('vue_pipelines_index/index.js') \ No newline at end of file -- cgit v1.2.3 From 5ba83d961a7cf8bebea9f9e9814354be769041e9 Mon Sep 17 00:00:00 2001 From: Regis Date: Tue, 1 Nov 2016 18:48:45 -0600 Subject: extracted Commit Column to vue component --- app/views/projects/pipelines/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index a7d837227d5..bd649a4fa2e 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -44,4 +44,4 @@ - else .vue-pipelines-index -= page_specific_javascript_tag('vue_pipelines_index/index.js') \ No newline at end of file += page_specific_javascript_tag('vue_pipelines_index/index.js') -- cgit v1.2.3 From 77b0d6058ead2f42200c8a69dcd0e31561deae9e Mon Sep 17 00:00:00 2001 From: Regis Date: Wed, 2 Nov 2016 22:41:51 -0600 Subject: count passing through - last page known --- app/views/projects/pipelines/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index bd649a4fa2e..7bf727be930 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -36,7 +36,7 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - %div.content-list.pipelines{"data-project-id": "#{@project.id}"} + %div.content-list.pipelines{"data-project-id": "#{@project.id}", "data-count": "#{@pipelines_count}"} - stages = @pipelines.stages - if @pipelines.blank? %div -- cgit v1.2.3 From d8c73e3ee73601f94310efa792a51250254108f3 Mon Sep 17 00:00:00 2001 From: Regis Date: Thu, 3 Nov 2016 15:38:51 -0600 Subject: conditional render to have running - branches - tags be HAML --- app/views/projects/pipelines/index.html.haml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 7bf727be930..0e3cec4aa07 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -41,6 +41,19 @@ - if @pipelines.blank? %div .nothing-here-block No pipelines to show + - elsif @scope == 'branches' || @scope == 'tags' || @scope == 'running' + .table-holder + %table.table.ci-table + %thead + %th Status + %th Pipeline + %th Commit + %th Stages + %th + %th.hidden-xs + + = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages + = paginate @pipelines, theme: 'gitlab' - else .vue-pipelines-index -- cgit v1.2.3 From 35066c8558398e5d2dc096801b93e5c693e080fd Mon Sep 17 00:00:00 2001 From: Regis Date: Sat, 5 Nov 2016 16:36:33 -0600 Subject: making reusable status and status icons components --- app/views/projects/pipelines/index.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 0e3cec4aa07..a09f23b2fde 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -57,4 +57,6 @@ - else .vue-pipelines-index += page_specific_javascript_tag('vue_icons/index.js') += page_specific_javascript_tag('vue_pipelines_status/index.js') = page_specific_javascript_tag('vue_pipelines_index/index.js') -- cgit v1.2.3 From fd10ff30bbd4b24889fc0c79fbe35af95f9b5666 Mon Sep 17 00:00:00 2001 From: Regis Date: Sun, 6 Nov 2016 11:27:27 -0700 Subject: extract pagination into own folder and precompile in application.rb --- app/views/projects/pipelines/index.html.haml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index a09f23b2fde..6f70b239826 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -58,5 +58,8 @@ .vue-pipelines-index = page_specific_javascript_tag('vue_icons/index.js') +-# ^^ this component loads Vue so the rest don't +-# this will no longer be an issue once Vue2 is global += page_specific_javascript_tag('vue_pagination/index.js') = page_specific_javascript_tag('vue_pipelines_status/index.js') = page_specific_javascript_tag('vue_pipelines_index/index.js') -- cgit v1.2.3 From 6f6119b7389ef7b5e13f2800611d5d7a806e41a5 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 10 Nov 2016 15:32:23 +0100 Subject: Support pipelines API Pass `updated_at` to get only incremental changes since last update --- app/views/projects/ci/pipelines/_pipeline.html.haml | 7 ++++--- app/views/projects/commit/_pipeline.html.haml | 2 +- app/views/projects/commit/_pipelines_list.haml | 2 +- app/views/projects/pipelines/index.html.haml | 3 +-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 2a2d24be736..50817f28d78 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -43,9 +43,10 @@ - stages_status = pipeline.statuses.latest.stages_status %td.stage-cell - - stages.each do |stage| - - status = stages_status[stage] - - tooltip = "#{stage.titleize}: #{status || 'not found'}" + - pipeline.statuses.latest.stages_status.each do |stage| + - name = stage.first + - status = stage.last + - tooltip = "#{name.titleize}: #{status || 'not found'}" - if status .stage-container = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, anchor: stage), class: "has-tooltip ci-status-icon-#{status}", title: tooltip do diff --git a/app/views/projects/commit/_pipeline.html.haml b/app/views/projects/commit/_pipeline.html.haml index d6916fb7f1a..516893fc6e5 100644 --- a/app/views/projects/commit/_pipeline.html.haml +++ b/app/views/projects/commit/_pipeline.html.haml @@ -66,5 +66,5 @@ - if pipeline.project.build_coverage_enabled? %th Coverage %th - - pipeline.statuses.relevant.stages.each do |stage| + - pipeline.stages.each do |stage| = render 'projects/commit/ci_stage', stage: stage, statuses: pipeline.statuses.relevant.where(stage: stage) diff --git a/app/views/projects/commit/_pipelines_list.haml b/app/views/projects/commit/_pipelines_list.haml index 2dc91a9b762..7f42fde0fea 100644 --- a/app/views/projects/commit/_pipelines_list.haml +++ b/app/views/projects/commit/_pipelines_list.haml @@ -12,4 +12,4 @@ %th Stages %th %th - = render pipelines, commit_sha: true, stage: true, allow_retry: true, stages: pipelines.stages, show_commit: false + = render pipelines, commit_sha: true, stage: true, allow_retry: true, show_commit: false diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 6f70b239826..4f9fb699abc 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -37,7 +37,6 @@ %span CI Lint %div.content-list.pipelines{"data-project-id": "#{@project.id}", "data-count": "#{@pipelines_count}"} - - stages = @pipelines.stages - if @pipelines.blank? %div .nothing-here-block No pipelines to show @@ -52,7 +51,7 @@ %th %th.hidden-xs - = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages + = render @pipelines, commit_sha: true, stage: true, allow_retry: true = paginate @pipelines, theme: 'gitlab' - else .vue-pipelines-index -- cgit v1.2.3 From f2e64fddc66e456029928c094d1af19ed88c7ab6 Mon Sep 17 00:00:00 2001 From: Regis Date: Thu, 10 Nov 2016 09:51:45 -0700 Subject: attemp --- app/views/projects/pipelines/index.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 4f9fb699abc..1515728c563 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -35,8 +35,7 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - - %div.content-list.pipelines{"data-project-id": "#{@project.id}", "data-count": "#{@pipelines_count}"} + %div.content-list.pipelines{data: {url: namespace_project_pipelines_path(@project.namespace, @project, format: :json), "data-count": "#{@pipelines_count}"}} - if @pipelines.blank? %div .nothing-here-block No pipelines to show -- cgit v1.2.3 From 38bb34889c5180b9dad301f3a8d478e271fb2aaf Mon Sep 17 00:00:00 2001 From: Regis Date: Thu, 10 Nov 2016 12:46:29 -0700 Subject: re-wire count for pagination - refactor --- app/views/projects/pipelines/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 1515728c563..569219b7669 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -35,7 +35,7 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - %div.content-list.pipelines{data: {url: namespace_project_pipelines_path(@project.namespace, @project, format: :json), "data-count": "#{@pipelines_count}"}} + %div.content-list.pipelines{data: {url: namespace_project_pipelines_path(@project.namespace, @project, format: :json)}} - if @pipelines.blank? %div .nothing-here-block No pipelines to show -- cgit v1.2.3 From c07180f379417328486a083972680ad352dd7aa2 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 15 Nov 2016 15:20:37 +0100 Subject: Fix broken pipeline rendering [ci skip] --- app/views/projects/ci/pipelines/_pipeline.html.haml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 50817f28d78..41189724f65 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -41,16 +41,13 @@ - else Cant find HEAD commit for this branch - - stages_status = pipeline.statuses.latest.stages_status %td.stage-cell - - pipeline.statuses.latest.stages_status.each do |stage| - - name = stage.first - - status = stage.last - - tooltip = "#{name.titleize}: #{status || 'not found'}" - - if status + - pipeline.stages_with_statuses.each do |stage| + - if stage.status + - tooltip = "#{stage.name.titleize}: #{stage.status || 'not found'}" .stage-container - = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, anchor: stage), class: "has-tooltip ci-status-icon-#{status}", title: tooltip do - = ci_icon_for_status(status) + = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, anchor: stage.name), class: "has-tooltip ci-status-icon-#{stage.status}", title: tooltip do + = ci_icon_for_status(stage.status) %td - if pipeline.duration -- cgit v1.2.3 From 18cfacc9450f69c8f2a898e5b31bb4651ab13ddc Mon Sep 17 00:00:00 2001 From: Regis Date: Tue, 15 Nov 2016 13:45:05 -0700 Subject: more fine tuning - catching edge cases - progress in testing - [ci skip] --- app/views/projects/pipelines/index.html.haml | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 569219b7669..3185f1573c6 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -56,8 +56,6 @@ .vue-pipelines-index = page_specific_javascript_tag('vue_icons/index.js') --# ^^ this component loads Vue so the rest don't --# this will no longer be an issue once Vue2 is global = page_specific_javascript_tag('vue_pagination/index.js') = page_specific_javascript_tag('vue_pipelines_status/index.js') = page_specific_javascript_tag('vue_pipelines_index/index.js') -- cgit v1.2.3 From c55ba05228c719bf1e05818fb91200b3d60da990 Mon Sep 17 00:00:00 2001 From: Regis Date: Thu, 1 Dec 2016 18:08:34 -0700 Subject: add svg to pipeline index haml - prep for commit comp change - [ci skip] --- app/views/projects/pipelines/index.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 3185f1573c6..4025a6859f2 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -53,6 +53,8 @@ = render @pipelines, commit_sha: true, stage: true, allow_retry: true = paginate @pipelines, theme: 'gitlab' - else + .commit-icon-svg.hidden + = custom_icon("icon_commit") .vue-pipelines-index = page_specific_javascript_tag('vue_icons/index.js') -- cgit v1.2.3 From 312c504f618513a87d817cad74c059506fac7a49 Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 5 Dec 2016 13:17:23 -0700 Subject: can render all tabs for pipelines - remove uneeded properties - [ci skip] --- app/views/projects/pipelines/index.html.haml | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 4025a6859f2..10f1a88b65d 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -39,19 +39,6 @@ - if @pipelines.blank? %div .nothing-here-block No pipelines to show - - elsif @scope == 'branches' || @scope == 'tags' || @scope == 'running' - .table-holder - %table.table.ci-table - %thead - %th Status - %th Pipeline - %th Commit - %th Stages - %th - %th.hidden-xs - - = render @pipelines, commit_sha: true, stage: true, allow_retry: true - = paginate @pipelines, theme: 'gitlab' - else .commit-icon-svg.hidden = custom_icon("icon_commit") -- cgit v1.2.3 From a62e5219a56e24cefef09b4466cbe42882098220 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 6 Dec 2016 13:20:46 +0100 Subject: Fix exception related to pipeline stages in view --- app/views/projects/pipelines/_with_tabs.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 3464e155a1b..ac139797a89 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -50,5 +50,5 @@ - if pipeline.project.build_coverage_enabled? %th Coverage %th - - pipeline.statuses.relevant.stages.each do |stage| + - pipeline.stages.each do |stage| = render 'projects/commit/ci_stage', stage: stage, statuses: pipeline.statuses.relevant.where(stage: stage) -- cgit v1.2.3 From 62b3b28b0b1522ff57e76b1a68fb2c77e0930abe Mon Sep 17 00:00:00 2001 From: Regis Date: Tue, 6 Dec 2016 09:03:45 -0700 Subject: remove all files related to Vue SVG rendering - use dynamic svg loading --- app/views/projects/pipelines/index.html.haml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 10f1a88b65d..132c21fea00 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -42,9 +42,23 @@ - else .commit-icon-svg.hidden = custom_icon("icon_commit") + .canceled-icon-svg.hidden + = custom_icon("icon_status_canceled") + .running-icon-svg.hidden + = custom_icon("icon_status_running") + .skipped-icon-svg.hidden + = custom_icon("icon_status_skipped") + .created-icon-svg.hidden + = custom_icon("icon_status_created") + .pending-icon-svg.hidden + = custom_icon("icon_status_pending") + .success-icon-svg.hidden + = custom_icon("icon_status_success") + .failed-icon-svg.hidden + = custom_icon("icon_status_failed") + .warning-icon-svg.hidden + = custom_icon("icon_status_warning") .vue-pipelines-index -= page_specific_javascript_tag('vue_icons/index.js') = page_specific_javascript_tag('vue_pagination/index.js') -= page_specific_javascript_tag('vue_pipelines_status/index.js') = page_specific_javascript_tag('vue_pipelines_index/index.js') -- cgit v1.2.3 From c9b6392452f586eafc08605b71f6c696a5ca12d7 Mon Sep 17 00:00:00 2001 From: Regis Date: Wed, 7 Dec 2016 10:05:39 -0700 Subject: conform to status object for svg icon names --- app/views/projects/pipelines/index.html.haml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 132c21fea00..fd1baa6195b 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -42,21 +42,21 @@ - else .commit-icon-svg.hidden = custom_icon("icon_commit") - .canceled-icon-svg.hidden + .icon_status_canceled.hidden = custom_icon("icon_status_canceled") - .running-icon-svg.hidden + .icon_status_running.hidden = custom_icon("icon_status_running") - .skipped-icon-svg.hidden + .icon_status_skipped.hidden = custom_icon("icon_status_skipped") - .created-icon-svg.hidden + .icon_status_created.hidden = custom_icon("icon_status_created") - .pending-icon-svg.hidden + .icon_status_pending.hidden = custom_icon("icon_status_pending") - .success-icon-svg.hidden + .icon_status_success.hidden = custom_icon("icon_status_success") - .failed-icon-svg.hidden + .icon_status_failed.hidden = custom_icon("icon_status_failed") - .warning-icon-svg.hidden + .icon_status_warning.hidden = custom_icon("icon_status_warning") .vue-pipelines-index -- cgit v1.2.3 From 562df3a3fb6d41c83180b3b3c519920c9e156de5 Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 12 Dec 2016 12:11:28 -0700 Subject: pass svg as prop to commit component --- app/views/projects/pipelines/index.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index fd1baa6195b..565dfa36e8e 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -40,8 +40,8 @@ %div .nothing-here-block No pipelines to show - else - .commit-icon-svg.hidden - = custom_icon("icon_commit") + .pipeline-svgs{"data" => {"commit-icon-svg" => custom_icon("icon_commit")} } + .icon_status_canceled.hidden = custom_icon("icon_status_canceled") .icon_status_running.hidden -- cgit v1.2.3 From 13798c003eb7c2f2f6ccc1ec5a8728b1ed1a130e Mon Sep 17 00:00:00 2001 From: Regis Date: Tue, 13 Dec 2016 09:54:18 -0700 Subject: dynamic API consumption for SVGs --- app/views/projects/pipelines/index.html.haml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 565dfa36e8e..0822480ae14 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -40,24 +40,17 @@ %div .nothing-here-block No pipelines to show - else - .pipeline-svgs{"data" => {"commit-icon-svg" => custom_icon("icon_commit")} } + .pipeline-svgs{"data" => {"commit_icon_svg" => custom_icon("icon_commit"), + "icon_status_canceled" => custom_icon("icon_status_canceled"), + "icon_status_running" => custom_icon("icon_status_running"), + "icon_status_skipped" => custom_icon("icon_status_skipped"), + "icon_status_created" => custom_icon("icon_status_created"), + "icon_status_pending" => custom_icon("icon_status_pending"), + "icon_status_success" => custom_icon("icon_status_success"), + "icon_status_failed" => custom_icon("icon_status_failed"), + "icon_status_warning" => custom_icon("icon_status_warning"), + } } - .icon_status_canceled.hidden - = custom_icon("icon_status_canceled") - .icon_status_running.hidden - = custom_icon("icon_status_running") - .icon_status_skipped.hidden - = custom_icon("icon_status_skipped") - .icon_status_created.hidden - = custom_icon("icon_status_created") - .icon_status_pending.hidden - = custom_icon("icon_status_pending") - .icon_status_success.hidden - = custom_icon("icon_status_success") - .icon_status_failed.hidden - = custom_icon("icon_status_failed") - .icon_status_warning.hidden - = custom_icon("icon_status_warning") .vue-pipelines-index = page_specific_javascript_tag('vue_pagination/index.js') -- cgit v1.2.3 From e98cdf4b2070c27da76cfa4ba3d5e2022ff08b19 Mon Sep 17 00:00:00 2001 From: Regis Date: Fri, 16 Dec 2016 16:12:52 -0700 Subject: all svgs from index haml --- app/views/projects/pipelines/index.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 9b47c9b19e0..5d7ffce78df 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -49,6 +49,8 @@ "icon_status_success" => custom_icon("icon_status_success"), "icon_status_failed" => custom_icon("icon_status_failed"), "icon_status_warning" => custom_icon("icon_status_warning"), + "icon_play" => custom_icon("icon_play"), + "icon_timer" => custom_icon("icon_timer"), } } .vue-pipelines-index -- cgit v1.2.3 From e077cebe5003ff93671a147aad8266e5b0dbd04d Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 26 Dec 2016 16:09:27 -0700 Subject: add borderless svgs --- app/views/projects/pipelines/index.html.haml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 5d7ffce78df..64d3665594e 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -49,6 +49,14 @@ "icon_status_success" => custom_icon("icon_status_success"), "icon_status_failed" => custom_icon("icon_status_failed"), "icon_status_warning" => custom_icon("icon_status_warning"), + "stage_icon_status_canceled" => custom_icon("icon_status_canceled_borderless"), + "stage_icon_status_running" => custom_icon("icon_status_running_borderless"), + "stage_icon_status_skipped" => custom_icon("icon_status_skipped_borderless"), + "stage_icon_status_created" => custom_icon("icon_status_created_borderless"), + "stage_icon_status_pending" => custom_icon("icon_status_pending_borderless"), + "stage_icon_status_success" => custom_icon("icon_status_success_borderless"), + "stage_icon_status_failed" => custom_icon("icon_status_failed_borderless"), + "stage_icon_status_warning" => custom_icon("icon_status_warning_borderless"), "icon_play" => custom_icon("icon_play"), "icon_timer" => custom_icon("icon_timer"), } } -- cgit v1.2.3 From 71d50042f45e9f04e80d1b54d310f0f8fb03bda4 Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 26 Dec 2016 16:50:57 -0700 Subject: add manual icon to svgs --- app/views/projects/pipelines/index.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 64d3665594e..e423fc8c471 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -59,6 +59,7 @@ "stage_icon_status_warning" => custom_icon("icon_status_warning_borderless"), "icon_play" => custom_icon("icon_play"), "icon_timer" => custom_icon("icon_timer"), + "icon_status_manual" => custom_icon("icon_status_manual"), } } .vue-pipelines-index -- cgit v1.2.3 From 9cfefbad0ea50e8b550fcd95caa38e5ea7ff11f9 Mon Sep 17 00:00:00 2001 From: Regis Date: Mon, 2 Jan 2017 16:26:41 -0700 Subject: fix haml_lint complaints --- app/views/projects/pipelines/index.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index b0ba7824514..abea6932567 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -35,12 +35,12 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - %div.content-list.pipelines{data: {url: namespace_project_pipelines_path(@project.namespace, @project, format: :json)}} + .content-list.pipelines{ data: { url: namespace_project_pipelines_path(@project.namespace, @project, format: :json) } } - if @pipelines.blank? %div .nothing-here-block No pipelines to show - else - .pipeline-svgs{"data" => {"commit_icon_svg" => custom_icon("icon_commit"), + .pipeline-svgs{ "data" => {"commit_icon_svg" => custom_icon("icon_commit"), "icon_status_canceled" => custom_icon("icon_status_canceled"), "icon_status_running" => custom_icon("icon_status_running"), "icon_status_skipped" => custom_icon("icon_status_skipped"), -- cgit v1.2.3