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
ba53ee78
Commit
ba53ee78
authored
Feb 16, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes after review
parent
8ca90a68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
app/assets/javascripts/environments/components/environment.js.es6
...ts/javascripts/environments/components/environment.js.es6
+2
-2
app/assets/javascripts/environments/folder/environments_folder_view.js.es6
...ripts/environments/folder/environments_folder_view.js.es6
+6
-5
app/assets/javascripts/lib/utils/common_utils.js.es6
app/assets/javascripts/lib/utils/common_utils.js.es6
+6
-6
No files found.
app/assets/javascripts/environments/components/environment.js.es6
View file @
ba53ee78
...
...
@@ -5,7 +5,7 @@ const Vue = require('vue');
Vue.use(require('vue-resource'));
const EnvironmentsService = require('../services/environments_service');
const EnvironmentTable = require('./environments_table');
const Store = require('../stores/environments_store');
const
Environments
Store = require('../stores/environments_store');
require('../../vue_shared/components/table_pagination');
require('../../lib/utils/common_utils');
...
...
@@ -18,7 +18,7 @@ module.exports = Vue.component('environment-component', {
data() {
const environmentsData = document.querySelector('#environments-list-view').dataset;
const store = new Store();
const store = new
Environments
Store();
return {
store,
...
...
app/assets/javascripts/environments/folder/environments_folder_view.js.es6
View file @
ba53ee78
...
...
@@ -5,7 +5,7 @@ const Vue = require('vue');
Vue.use(require('vue-resource'));
const EnvironmentsService = require('../services/environments_service');
const EnvironmentTable = require('../components/environments_table');
const Store = require('../stores/environments_store');
const
Environments
Store = require('../stores/environments_store');
require('../../vue_shared/components/table_pagination');
require('../../lib/utils/common_utils');
...
...
@@ -18,9 +18,10 @@ module.exports = Vue.component('environment-folder-view', {
data() {
const environmentsData = document.querySelector('#environments-folder-list-view').dataset;
const store = new Store();
const endpoint = `${window.location.pathname}.json`;
const folderName = window.location.pathname.substr(window.location.pathname.lastIndexOf('/') + 1);
const store = new EnvironmentsStore();
const pathname = window.location.pathname;
const endpoint = `${pathname}.json`;
const folderName = pathname.substr(pathname.lastIndexOf('/') + 1);
return {
store,
...
...
@@ -99,7 +100,7 @@ module.exports = Vue.component('environment-folder-view', {
this.store.storeAvailableCount(response.body.available_count);
this.store.storeStoppedCount(response.body.stopped_count);
this.store.storeEnvironments(response.body.environments);
this.store.s
tore
Pagination(response.headers);
this.store.s
et
Pagination(response.headers);
})
.then(() => {
this.isLoading = false;
...
...
app/assets/javascripts/lib/utils/common_utils.js.es6
View file @
ba53ee78
...
...
@@ -256,19 +256,19 @@
*/
w.gl.utils.setParamInURL = (param, value) => {
let search;
const locationSearch = window.location.search;
if (
window.location.s
earch.length === 0) {
if (
locationS
earch.length === 0) {
search = `?${param}=${value}`;
}
if (
window.location.s
earch.indexOf(param) !== -1) {
if (
locationS
earch.indexOf(param) !== -1) {
const regex = new RegExp(param + '=\\d');
search =
window.location.s
earch.replace(regex, `${param}=${value}`);
search =
locationS
earch.replace(regex, `${param}=${value}`);
}
if (window.location.search.length &&
window.location.search.indexOf(param) === -1) {
search = `${window.location.search}&${param}=${value}`;
if (locationSearch.length && locationSearch.indexOf(param) === -1) {
search = `${locationSearch}&${param}=${value}`;
}
return search;
...
...
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