Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
ad1b37c4
Commit
ad1b37c4
authored
May 29, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use vue file for pipelines tables components
parent
e5226177
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
58 deletions
+67
-58
app/assets/javascripts/pipelines/components/pipeline_url.js
app/assets/javascripts/pipelines/components/pipeline_url.js
+0
-56
app/assets/javascripts/pipelines/components/pipeline_url.vue
app/assets/javascripts/pipelines/components/pipeline_url.vue
+65
-0
app/assets/javascripts/vue_shared/components/pipelines_table_row.js
.../javascripts/vue_shared/components/pipelines_table_row.js
+1
-1
spec/javascripts/pipelines/pipeline_url_spec.js
spec/javascripts/pipelines/pipeline_url_spec.js
+1
-1
No files found.
app/assets/javascripts/pipelines/components/pipeline_url.js
deleted
100644 → 0
View file @
e5226177
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
export
default
{
props
:
[
'
pipeline
'
,
],
computed
:
{
user
()
{
return
!!
this
.
pipeline
.
user
;
},
},
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>
`
,
};
app/assets/javascripts/pipelines/components/pipeline_url.vue
0 → 100644
View file @
ad1b37c4
<
script
>
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
tooltipMixin
from
'
../../vue_shared/mixins/tooltip
'
;
export
default
{
props
:
{
pipeline
:
{
type
:
Object
,
required
:
true
,
},
},
components
:
{
userAvatarLink
,
},
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 @
ad1b37c4
...
...
@@ -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 @
ad1b37c4
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