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
c287c018
Commit
c287c018
authored
Feb 27, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary element checks
parent
e658ca96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
57 deletions
+51
-57
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+51
-57
No files found.
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
c287c018
...
...
@@ -16,64 +16,58 @@ export default () => {
mediator
.
fetchPipeline
();
const
pipelineGraphEl
=
document
.
querySelector
(
'
#js-pipeline-graph-vue
'
);
if
(
pipelineGraphEl
)
{
// eslint-disable-next-line
new
Vue
({
el
:
pipelineGraphEl
,
components
:
{
pipelineGraph
,
},
data
()
{
return
{
mediator
,
};
},
render
(
createElement
)
{
return
createElement
(
'
pipeline-graph
'
,
{
props
:
{
isLoading
:
this
.
mediator
.
state
.
isLoading
,
pipeline
:
this
.
mediator
.
store
.
state
.
pipeline
,
},
});
},
});
}
// eslint-disable-next-line
new
Vue
({
el
:
'
#js-pipeline-graph-vue
'
,
components
:
{
pipelineGraph
,
},
data
()
{
return
{
mediator
,
};
},
render
(
createElement
)
{
return
createElement
(
'
pipeline-graph
'
,
{
props
:
{
isLoading
:
this
.
mediator
.
state
.
isLoading
,
pipeline
:
this
.
mediator
.
store
.
state
.
pipeline
,
},
});
},
});
const
pipelineHeaderEl
=
document
.
querySelector
(
'
#js-pipeline-header-vue
'
);
if
(
pipelineHeaderEl
)
{
// eslint-disable-next-line
new
Vue
({
el
:
pipelineHeaderEl
,
components
:
{
pipelineHeader
,
},
data
()
{
return
{
mediator
,
};
// eslint-disable-next-line
new
Vue
({
el
:
'
#js-pipeline-header-vue
'
,
components
:
{
pipelineHeader
,
},
data
()
{
return
{
mediator
,
};
},
created
()
{
eventHub
.
$on
(
'
headerPostAction
'
,
this
.
postAction
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
headerPostAction
'
,
this
.
postAction
);
},
methods
:
{
postAction
(
action
)
{
this
.
mediator
.
service
.
postAction
(
action
.
path
)
.
then
(()
=>
this
.
mediator
.
refreshPipeline
())
.
catch
(()
=>
Flash
(
__
(
'
An error occurred while making the request.
'
)));
},
created
()
{
eventHub
.
$on
(
'
headerPostAction
'
,
this
.
postAction
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
headerPostAction
'
,
this
.
postAction
);
},
methods
:
{
postAction
(
action
)
{
this
.
mediator
.
service
.
postAction
(
action
.
path
)
.
then
(()
=>
this
.
mediator
.
refreshPipeline
())
.
catch
(()
=>
Flash
(
__
(
'
An error occurred while making the request.
'
)));
},
render
(
createElement
)
{
return
createElement
(
'
pipeline-header
'
,
{
props
:
{
isLoading
:
this
.
mediator
.
state
.
isLoading
,
pipeline
:
this
.
mediator
.
store
.
state
.
pipeline
,
},
},
render
(
createElement
)
{
return
createElement
(
'
pipeline-header
'
,
{
props
:
{
isLoading
:
this
.
mediator
.
state
.
isLoading
,
pipeline
:
this
.
mediator
.
store
.
state
.
pipeline
,
},
});
},
});
}
});
},
});
};
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