Commit 9fab5805 authored by Regis's avatar Regis

remove fragment warning - formatting

parent 2bb7b476
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
//= require ./pipelines.vue.js.es6 //= require ./pipelines.vue.js.es6
(() => { (() => {
const project = document.querySelector('.table-holder'); const project = document.querySelector('.pipelines');
Vue.use(VueResource); Vue.use(VueResource);
// Vue.config.silent = true; // Vue.config.silent = true;
return new Vue({ return new Vue({
el: '#vue-pipelines-index', el: '.vue-pipelines-index',
data: { data: {
scope: project.dataset.projectId, scope: project.dataset.projectId,
store: new gl.PipelineStore(), store: new gl.PipelineStore(),
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
'vue-pipelines': gl.VuePipeLines, 'vue-pipelines': gl.VuePipeLines,
}, },
template: ` template: `
<vue-pipelines :scope='scope' :store='store'></vue-pipelines> <div>
<vue-pipelines :scope='scope' :store='store'></vue-pipelines>
</div>
`, `,
}); });
})(); })();
...@@ -36,100 +36,107 @@ ...@@ -36,100 +36,107 @@
}, },
}, },
template: ` template: `
<thead> <div class="table-holder">
<tr> <table class="table ci-table">
<th>Status</th> <thead>
<th>Pipeline</th> <tr>
<th>Commit</th> <th>Status</th>
<th>Stages</th> <th>Pipeline</th>
<th></th> <th>Commit</th>
<th class="hidden-xs"></th> <th>Stages</th>
</tr> <th></th>
</thead> <th class="hidden-xs"></th>
<tbody v-for='pipeline in pipelines'> </tr>
<tr class="commit"> </thead>
<td class="commit-link" v-if="pipeline.status === 'running'"> <tbody v-for='pipeline in pipelines'>
<vue-running-pipeline :pipe='pipeline'></vue-running-pipeline> <tr class="commit">
</td> <td class="commit-link" v-if="pipeline.status === 'running'">
<td> <vue-running-pipeline :pipe='pipeline'></vue-running-pipeline>
<a href="pipelines/{{pipeline.id}}"> </td>
<span class="pipeline-id">#{{pipeline.id}}</span> <td>
</a> <a href="pipelines/{{pipeline.id}}">
<span>by</span> <span class="pipeline-id">#{{pipeline.id}}</span>
<span class="api monospace">{{pipeline.user}}</span> </a>
</td> <span>by</span>
<td class="branch-commit"> <span class="api monospace">{{pipeline.user}}</span>
<div class="icon-container"> </td>
<i class="fa fa-code-fork"></i> <td class="branch-commit">
</div> <div class="icon-container">
<!-- <i class="fa fa-code-fork"></i>
I need to know which branch things are comming from </div>
--> <!--
<a class="monospace branch-name" href="./commits/master">master</a> I need to know which branch things are comming from
<div class="icon-container commit-icon"> -->
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"> <a class="monospace branch-name" href="./commits/master">master</a>
<path fill="#8F8F8F" fill-rule="evenodd" d="M28.7769836,18 C27.8675252,13.9920226 24.2831748,11 20,11 C15.7168252,11 12.1324748,13.9920226 11.2230164,18 L4.0085302,18 C2.90195036,18 2,18.8954305 2,20 C2,21.1122704 2.8992496,22 4.0085302,22 L11.2230164,22 C12.1324748,26.0079774 15.7168252,29 20,29 C24.2831748,29 27.8675252,26.0079774 28.7769836,22 L35.9914698,22 C37.0980496,22 38,21.1045695 38,20 C38,18.8877296 37.1007504,18 35.9914698,18 L28.7769836,18 L28.7769836,18 Z M20,25 C22.7614237,25 25,22.7614237 25,20 C25,17.2385763 22.7614237,15 20,15 C17.2385763,15 15,17.2385763 15,20 C15,22.7614237 17.2385763,25 20,25 L20,25 Z"></path> <div class="icon-container commit-icon">
</svg> <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">
</div> <path fill="#8F8F8F" fill-rule="evenodd" d="M28.7769836,18 C27.8675252,13.9920226 24.2831748,11 20,11 C15.7168252,11 12.1324748,13.9920226 11.2230164,18 L4.0085302,18 C2.90195036,18 2,18.8954305 2,20 C2,21.1122704 2.8992496,22 4.0085302,22 L11.2230164,22 C12.1324748,26.0079774 15.7168252,29 20,29 C24.2831748,29 27.8675252,26.0079774 28.7769836,22 L35.9914698,22 C37.0980496,22 38,21.1045695 38,20 C38,18.8877296 37.1007504,18 35.9914698,18 L28.7769836,18 L28.7769836,18 Z M20,25 C22.7614237,25 25,22.7614237 25,20 C25,17.2385763 22.7614237,15 20,15 C17.2385763,15 15,17.2385763 15,20 C15,22.7614237 17.2385763,25 20,25 L20,25 Z"></path>
<a </svg>
class="commit-id monospace" </div>
href="./commit/{{pipeline.sha}}">{{shortSha(pipeline)}} <a
</a> class="commit-id monospace"
<p class="commit-title"> href="./commit/{{pipeline.sha}}">{{shortSha(pipeline)}}
<a </a>
href="mailto:james@jameslopez.es" <p class="commit-title">
> <a
href="mailto:james@jameslopez.es"
>
<!--
need Author Name
need Plural Version of Author Name: Rails has this built in
need gravatar HASH for author
need authors email
-->
<img
class="avatar has-tooltip s20 hidden-xs"
alt="James Lopez's avatar"
title="James Lopez"
data-container="body"
src="http://www.gravatar.com/avatar/80d3b651b4be1f1db39435c2d11f1f23?s=40&amp;d=identicon"
>
</a>
<a
class="commit-row-message"
href="./commit/{{pipeline.sha}}"
>
<!--
need commit message/title for SHA
-->
fix broken repo 500 errors in UI and added relevant specs
</a>
</p>
</td>
<td class="stage-cell">
<!-- <!--
need Author Name Need Stages Array:
need Plural Version of Author Name: Rails has this built in ex: stage status per element as well as build name
need gravatar HASH for author
need authors email
-->
<img
class="avatar has-tooltip s20 hidden-xs"
alt="James Lopez's avatar"
title="James Lopez"
data-container="body"
src="http://www.gravatar.com/avatar/80d3b651b4be1f1db39435c2d11f1f23?s=40&amp;d=identicon"
>
</a>
<a
class="commit-row-message"
href="./commit/{{pipeline.sha}}"
>
<!--
need commit message/title for SHA
-->
fix broken repo 500 errors in UI and added relevant specs
</a>
</p>
</td>
<td class="stage-cell">
<!--
Need Stages Array:
ex: stage status per element as well as build name
Why I need it: Why I need it:
title="Prepare: failed" href="pipelines#prepare" title="Prepare: failed" href="pipelines#prepare"
title="Notify Build: success" href="pipelines#notify_build" title="Notify Build: success" href="pipelines#notify_build"
title="Post Test: failed" href="pipelines#post-test" title="Post Test: failed" href="pipelines#post-test"
How I would solve it once I have the data: How I would solve it once I have the data:
title="Prepare: {{stage.status}}" title="Prepare: {{stage.status}}"
href="pipelines#{{stage.title}}" href="pipelines#{{stage.title}}"
this way I can pass it as a prop to this way I can pass it as a prop to
ex: <vue-stages :stages='stages'> ex:
--> <td class="stage-cell" v-for='stage in pipelines.stages'>
<vue-stages></vue-stages> <vue-stage :stage='stage'>
</td> </td>
<td></td> -->
<td class="pipeline-actions hidden-xs"> <vue-stages></vue-stages>
<!-- will need to pass builds info and have v-if's for icons --> </td>
<vue-pipeline-actions></vue-pipeline-actions> <td></td>
</td> <td class="pipeline-actions hidden-xs">
</tr> <!-- will need to pass builds info and have v-if's for icons -->
</tbody> <vue-pipeline-actions></vue-pipeline-actions>
</td>
</tr>
</tbody>
</table>
</div>
`, `,
}); });
})(window.gl || (window.gl = {})); })(window.gl || (window.gl = {}));
...@@ -36,14 +36,12 @@ ...@@ -36,14 +36,12 @@
= link_to ci_lint_path, class: 'btn btn-default' do = link_to ci_lint_path, class: 'btn btn-default' do
%span CI Lint %span CI Lint
%div.content-list.pipelines %div.content-list.pipelines{"data-project-id": "#{@project.id}"}
- stages = @pipelines.stages - stages = @pipelines.stages
- if @pipelines.blank? - if @pipelines.blank?
%div %div
.nothing-here-block No pipelines to show .nothing-here-block No pipelines to show
- else - else
.table-holder{"data-project-id": "#{@project.id}"} .vue-pipelines-index
%table.table.ci-table
%tbody#vue-pipelines-index
= page_specific_javascript_tag('vue_pipelines_index/index.js') = page_specific_javascript_tag('vue_pipelines_index/index.js')
\ No newline at end of file
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