BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
763a3acd
Commit
763a3acd
authored
May 30, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '31349-pipeline-url-techdeb' into 'master'
Use vue file for pipelines tables components See merge request !11760
parents
7f775ee2
ad1b37c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
49 deletions
+58
-49
pipeline_url.vue
app/assets/javascripts/pipelines/components/pipeline_url.vue
+56
-47
pipelines_table_row.js
.../javascripts/vue_shared/components/pipelines_table_row.js
+1
-1
pipeline_url_spec.js
spec/javascripts/pipelines/pipeline_url_spec.js
+1
-1
No files found.
app/assets/javascripts/pipelines/components/pipeline_url.
js
→
app/assets/javascripts/pipelines/components/pipeline_url.
vue
View file @
763a3acd
<
script
>
import
userAvatarLink
from
'../../vue_shared/components/user_avatar/user_avatar_link.vue'
;
import
tooltipMixin
from
'../../vue_shared/mixins/tooltip'
;
export
default
{
props
:
[
'pipeline'
,
],
computed
:
{
user
()
{
return
!!
this
.
pipeline
.
user
;
props
:
{
pipeline
:
{
type
:
Object
,
required
:
true
,
},
},
components
:
{
userAvatarLink
,
},
template
:
`
<td>
<a
:href="pipeline.path"
class="js-pipeline-url-link">
<span class="pipeline-id">#{{pipeline.id}}</span>
</a>
<span>by</span>
<user-avatar-link
v-if="user"
class="js-pipeline-url-user"
:link-href="pipeline.user.web_url"
:img-src="pipeline.user.avatar_url"
:tooltip-text="pipeline.user.name"
/>
<span
v-if="!user"
class="js-pipeline-url-api api">
API
</span>
<span
v-if="pipeline.flags.latest"
class="js-pipeline-url-lastest label label-success has-tooltip"
title="Latest pipeline for this branch"
data-original-title="Latest pipeline for this branch">
latest
</span>
<span
v-if="pipeline.flags.yaml_errors"
class="js-pipeline-url-yaml label label-danger has-tooltip"
:title="pipeline.yaml_errors"
:data-original-title="pipeline.yaml_errors">
yaml invalid
</span>
<span
v-if="pipeline.flags.stuck"
class="js-pipeline-url-stuck label label-warning">
stuck
</span>
</td>
`
,
mixins
:
[
tooltipMixin
,
],
computed
:
{
user
()
{
return
this
.
pipeline
.
user
;
},
},
};
</
script
>
<
template
>
<td>
<a
:href=
"pipeline.path"
class=
"js-pipeline-url-link"
>
<span
class=
"pipeline-id"
>
#
{{
pipeline
.
id
}}
</span>
</a>
<span>
by
</span>
<user-avatar-link
v-if=
"user"
class=
"js-pipeline-url-user"
:link-href=
"pipeline.user.web_url"
:img-src=
"pipeline.user.avatar_url"
:tooltip-text=
"pipeline.user.name"
/>
<span
v-if=
"!user"
class=
"js-pipeline-url-api api"
>
API
</span>
<span
v-if=
"pipeline.flags.latest"
class=
"js-pipeline-url-lastest label label-success"
title=
"Latest pipeline for this branch"
ref=
"tooltip"
>
latest
</span>
<span
v-if=
"pipeline.flags.yaml_errors"
class=
"js-pipeline-url-yaml label label-danger"
:title=
"pipeline.yaml_errors"
ref=
"tooltip"
>
yaml invalid
</span>
<span
v-if=
"pipeline.flags.stuck"
class=
"js-pipeline-url-stuck label label-warning"
>
stuck
</span>
</td>
</
template
>
app/assets/javascripts/vue_shared/components/pipelines_table_row.js
View file @
763a3acd
...
...
@@ -4,7 +4,7 @@ import PipelinesActionsComponent from '../../pipelines/components/pipelines_acti
import
PipelinesArtifactsComponent
from
'../../pipelines/components/pipelines_artifacts'
;
import
ciBadge
from
'./ci_badge_link.vue'
;
import
PipelinesStageComponent
from
'../../pipelines/components/stage.vue'
;
import
PipelinesUrlComponent
from
'../../pipelines/components/pipeline_url'
;
import
PipelinesUrlComponent
from
'../../pipelines/components/pipeline_url
.vue
'
;
import
PipelinesTimeagoComponent
from
'../../pipelines/components/time_ago'
;
import
CommitComponent
from
'./commit'
;
...
...
spec/javascripts/pipelines/pipeline_url_spec.js
View file @
763a3acd
import
Vue
from
'vue'
;
import
pipelineUrlComp
from
'~/pipelines/components/pipeline_url'
;
import
pipelineUrlComp
from
'~/pipelines/components/pipeline_url
.vue
'
;
describe
(
'Pipeline Url Component'
,
()
=>
{
let
PipelineUrlComponent
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment