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
e658ca96
Commit
e658ca96
authored
Feb 27, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initPipelineDetails to pipelines build path
parent
eb08e1d1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
124 deletions
+68
-124
cycle_analytics_bundle.js
...ets/javascripts/cycle_analytics/cycle_analytics_bundle.js
+2
-2
index.js
...sets/javascripts/pages/projects/pipelines/builds/index.js
+5
-1
index.js
...assets/javascripts/pages/projects/pipelines/show/index.js
+2
-68
pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+59
-53
No files found.
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
View file @
e658ca96
...
...
@@ -14,10 +14,10 @@ import CycleAnalyticsStore from './cycle_analytics_store';
Vue
.
use
(
Translate
);
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
$
(
()
=>
{
const
OVERVIEW_DIALOG_COOKIE
=
'cycle_analytics_help_dismissed'
;
const
cycleAnalyticsApp
=
new
Vue
({
gl
.
cycleAnalyticsApp
=
new
Vue
({
el
:
'#cycle-analytics'
,
name
:
'CycleAnalytics'
,
components
:
{
...
...
app/assets/javascripts/pages/projects/pipelines/builds/index.js
View file @
e658ca96
import
initPipelineDetails
from
'~/pipelines/pipeline_details_bundle'
;
import
initPipelines
from
'../init_pipelines'
;
document
.
addEventListener
(
'DOMContentLoaded'
,
initPipelines
);
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
initPipelines
();
initPipelineDetails
();
});
app/assets/javascripts/pages/projects/pipelines/show/index.js
View file @
e658ca96
import
Vue
from
'vue'
;
import
{
__
}
from
'~/locale'
;
import
Flash
from
'~/flash'
;
import
PipelinesMediator
from
'~/pipelines/pipeline_details_mediator'
;
import
pipelineGraph
from
'~/pipelines/components/graph/graph_component.vue'
;
import
pipelineHeader
from
'~/pipelines/components/header_component.vue'
;
import
eventHub
from
'~/pipelines/event_hub'
;
import
initPipelineDetails
from
'~/pipelines/pipeline_details_bundle'
;
import
initPipelines
from
'../init_pipelines'
;
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
const
dataset
=
document
.
querySelector
(
'.js-pipeline-details-vue'
).
dataset
;
const
mediator
=
new
PipelinesMediator
({
endpoint
:
dataset
.
endpoint
});
mediator
.
fetchPipeline
();
initPipelines
();
// 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
,
},
});
},
});
// 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
(()
=>
new
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
,
},
});
},
});
initPipelineDetails
();
});
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
e658ca96
...
...
@@ -9,65 +9,71 @@ import eventHub from './event_hub';
Vue
.
use
(
Translate
);
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
export
default
()
=>
{
const
dataset
=
document
.
querySelector
(
'.js-pipeline-details-vue'
).
dataset
;
const
mediator
=
new
PipelinesMediator
({
endpoint
:
dataset
.
endpoint
});
mediator
.
fetchPipeline
();
// 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
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-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.'
)));
const
pipelineHeaderEl
=
document
.
querySelector
(
'#js-pipeline-header-vue'
);
if
(
pipelineHeaderEl
)
{
// eslint-disable-next-line
new
Vue
({
el
:
pipelineHeaderEl
,
components
:
{
pipelineHeader
,
},
data
()
{
return
{
mediator
,
};
},
},
render
(
createElement
)
{
return
createElement
(
'pipeline-header'
,
{
props
:
{
isLoading
:
this
.
mediator
.
state
.
isLoading
,
pipeline
:
this
.
mediator
.
store
.
state
.
pipeline
,
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
,
},
});
},
});
}
};
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