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
Tatuya Kamada
gitlab-ce
Commits
d5093ef5
Commit
d5093ef5
authored
Feb 05, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use webpack to require files
Changes after review
parent
d97b9622
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
43 additions
and
44 deletions
+43
-44
app/assets/javascripts/commit/pipelines/pipelines_bundle.js.es6
...sets/javascripts/commit/pipelines/pipelines_bundle.js.es6
+0
-2
app/assets/javascripts/commit/pipelines/pipelines_service.js.es6
...ets/javascripts/commit/pipelines/pipelines_service.js.es6
+1
-1
app/assets/javascripts/commit/pipelines/pipelines_store.js.es6
...ssets/javascripts/commit/pipelines/pipelines_store.js.es6
+4
-1
app/assets/javascripts/commit/pipelines/pipelines_table.js.es6
...ssets/javascripts/commit/pipelines/pipelines_table.js.es6
+6
-3
app/assets/javascripts/lib/utils/common_utils.js.es6
app/assets/javascripts/lib/utils/common_utils.js.es6
+3
-0
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+26
-30
app/assets/javascripts/vue_shared/components/commit.js.es6
app/assets/javascripts/vue_shared/components/commit.js.es6
+0
-2
app/assets/javascripts/vue_shared/components/pipelines_table.js.es6
.../javascripts/vue_shared/components/pipelines_table.js.es6
+0
-1
app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6
...ascripts/vue_shared/components/pipelines_table_row.js.es6
+0
-1
app/views/projects/commit/_pipelines_list.haml
app/views/projects/commit/_pipelines_list.haml
+1
-1
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+1
-2
config/webpack.config.js
config/webpack.config.js
+1
-0
No files found.
app/assets/javascripts/commit/pipelines/pipelines_bundle.js.es6
View file @
d5093ef5
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
/* global Vue, CommitsPipelineStore, PipelinesService, Flash */
/* global Vue, CommitsPipelineStore, PipelinesService, Flash */
window.Vue = require('vue');
window.Vue = require('vue');
require('./pipelines_store');
require('./pipelines_service');
require('./pipelines_table');
require('./pipelines_table');
/**
/**
* Commits View > Pipelines Tab > Pipelines Table.
* Commits View > Pipelines Tab > Pipelines Table.
...
...
app/assets/javascripts/commit/pipelines/pipelines_service.js.es6
View file @
d5093ef5
...
@@ -18,7 +18,7 @@ class PipelinesService {
...
@@ -18,7 +18,7 @@ class PipelinesService {
*
*
* @return {Promise}
* @return {Promise}
*/
*/
get
() {
all
() {
return this.pipelines.get();
return this.pipelines.get();
}
}
}
}
...
...
app/assets/javascripts/commit/pipelines/pipelines_store.js.es6
View file @
d5093ef5
...
@@ -44,4 +44,7 @@ class PipelinesStore {
...
@@ -44,4 +44,7 @@ class PipelinesStore {
}
}
}
}
return PipelinesStore;
window.gl = window.gl || {};
gl.commits = gl.commits || {};
gl.commits.pipelines = gl.commits.pipelines || {};
gl.commits.pipelines.PipelinesStore = PipelinesStore;
app/assets/javascripts/commit/pipelines/pipelines_table.js.es6
View file @
d5093ef5
...
@@ -3,9 +3,12 @@
...
@@ -3,9 +3,12 @@
window.Vue = require('vue');
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
window.Vue.use(require('vue-resource'));
require('../../lib/utils/common_utils');
require('../../vue_shared/vue_resource_interceptor');
require('../../vue_shared/vue_resource_interceptor');
require('../../vue_shared/components/pipelines_table');
require('../../vue_shared/components/pipelines_table');
require('../vue_realtime_listener/index');
require('../../vue_realtime_listener/index');
require('./pipelines_service');
require('./pipelines_store');
/**
/**
*
*
...
@@ -62,10 +65,10 @@ require('../vue_realtime_listener/index');
...
@@ -62,10 +65,10 @@ require('../vue_realtime_listener/index');
*
*
*/
*/
created() {
created() {
gl.pipelines.pipelinesService = new
PipelinesService(this.endpoint);
const pipelinesService = new gl.commits.pipelines.
PipelinesService(this.endpoint);
this.isLoading = true;
this.isLoading = true;
return
gl.pipelines.
pipelinesService.all()
return pipelinesService.all()
.then(response => response.json())
.then(response => response.json())
.then((json) => {
.then((json) => {
this.store.storePipelines(json);
this.store.storePipelines(json);
...
...
app/assets/javascripts/lib/utils/common_utils.js.es6
View file @
d5093ef5
...
@@ -233,6 +233,9 @@
...
@@ -233,6 +233,9 @@
/**
/**
* Transforms a DOMStringMap into a plain object.
* Transforms a DOMStringMap into a plain object.
*
* @param {DOMStringMap} DOMStringMapObject
* @returns {Object}
*/
*/
w.gl.utils.DOMStringMapToObject = DOMStringMapObject => Object.keys(DOMStringMapObject).reduce((acc, element) => {
w.gl.utils.DOMStringMapToObject = DOMStringMapObject => Object.keys(DOMStringMapObject).reduce((acc, element) => {
acc[element] = DOMStringMapObject[element];
acc[element] = DOMStringMapObject[element];
...
...
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
d5093ef5
...
@@ -2,39 +2,35 @@
...
@@ -2,39 +2,35 @@
/* global Vue, VueResource, gl */
/* global Vue, VueResource, gl */
window.Vue = require('vue');
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
window.Vue.use(require('vue-resource'));
require('../lib/utils/common_utils');
require('../vue_shared/vue_resource_interceptor');
require('../vue_shared/vue_resource_interceptor');
require('./pipelines');
require('./pipelines');
$(() => {
$(() => new Vue({
return new Vue({
el: document.querySelector('.vue-pipelines-index'),
el: document.querySelector('.vue-pipelines-index'),
data() {
data() {
const project = document.querySelector('.pipelines');
const project = document.querySelector('.pipelines');
const svgs = document.querySelector('.pipeline-svgs').dataset;
const svgs = document.querySelector('.pipeline-svgs').dataset;
// Transform svgs DOMStringMap to a plain Object.
// Transform svgs DOMStringMap to a plain Object.
const svgsObject = Object.keys(svgs).reduce((acc, element) => {
const svgsObject = gl.utils.DOMStringMapToObject(svgs);
acc[element] = svgs[element];
return acc;
}, {});
return {
return {
scope: project.dataset.url,
scope: project.dataset.url,
store: new gl.PipelineStore(),
store: new gl.PipelineStore(),
svgs: svgsObject,
svgs: svgsObject,
};
};
},
},
components: {
components: {
'vue-pipelines': gl.VuePipelines,
'vue-pipelines': gl.VuePipelines,
},
},
template: `
template: `
<vue-pipelines
<vue-pipelines
:scope='scope'
:scope='scope'
:store='store'
:store='store'
:svgs='svgs'
:svgs='svgs'
>
>
</vue-pipelines>
</vue-pipelines>
`,
`,
});
}));
});
app/assets/javascripts/vue_shared/components/commit.js.es6
View file @
d5093ef5
/* global Vue */
/* global Vue */
window.Vue = require('vue');
(() => {
(() => {
window.gl = window.gl || {};
window.gl = window.gl || {};
...
...
app/assets/javascripts/vue_shared/components/pipelines_table.js.es6
View file @
d5093ef5
/* eslint-disable no-param-reassign */
/* eslint-disable no-param-reassign */
/* global Vue */
/* global Vue */
window.Vue = require('vue');
require('./pipelines_table_row');
require('./pipelines_table_row');
/**
/**
* Pipelines Table Component.
* Pipelines Table Component.
...
...
app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6
View file @
d5093ef5
/* eslint-disable no-param-reassign */
/* eslint-disable no-param-reassign */
/* global Vue */
/* global Vue */
window.Vue = require('vue');
require('../../vue_pipelines_index/status');
require('../../vue_pipelines_index/status');
require('../../vue_pipelines_index/pipeline_url');
require('../../vue_pipelines_index/pipeline_url');
require('../../vue_pipelines_index/stage');
require('../../vue_pipelines_index/stage');
...
...
app/views/projects/commit/_pipelines_list.haml
View file @
d5093ef5
...
@@ -22,4 +22,4 @@
...
@@ -22,4 +22,4 @@
}
}
}
}
-
content_for
:page_specific_javascripts
do
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_
tag
(
'commit/pipelines/pipelines_bundle.j
s'
)
=
page_specific_javascript_
bundle_tag
(
'commit_pipeline
s'
)
app/views/projects/pipelines/index.html.haml
View file @
d5093ef5
...
@@ -60,5 +60,4 @@
...
@@ -60,5 +60,4 @@
.vue-pipelines-index
.vue-pipelines-index
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'vue_pipelines'
)
=
page_specific_javascript_tag
(
'vue_pipelines_index/index.js'
)
config/webpack.config.js
View file @
d5093ef5
...
@@ -19,6 +19,7 @@ var config = {
...
@@ -19,6 +19,7 @@ var config = {
boards
:
'
./boards/boards_bundle.js
'
,
boards
:
'
./boards/boards_bundle.js
'
,
boards_test
:
'
./boards/test_utils/simulate_drag.js
'
,
boards_test
:
'
./boards/test_utils/simulate_drag.js
'
,
cycle_analytics
:
'
./cycle_analytics/cycle_analytics_bundle.js
'
,
cycle_analytics
:
'
./cycle_analytics/cycle_analytics_bundle.js
'
,
commit_pipelines
:
'
./commit/pipelines/pipelines_bundle.js
'
,
diff_notes
:
'
./diff_notes/diff_notes_bundle.js
'
,
diff_notes
:
'
./diff_notes/diff_notes_bundle.js
'
,
environments
:
'
./environments/environments_bundle.js
'
,
environments
:
'
./environments/environments_bundle.js
'
,
filtered_search
:
'
./filtered_search/filtered_search_bundle.js
'
,
filtered_search
:
'
./filtered_search/filtered_search_bundle.js
'
,
...
...
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