Commit 32c727cb authored by Filipa Lacerda's avatar Filipa Lacerda

Fix typo

parent 98a0f72d
...@@ -49,7 +49,7 @@ $(() => { ...@@ -49,7 +49,7 @@ $(() => {
return filterEnvironments(this.state.environments, 'stopped').length; return filterEnvironments(this.state.environments, 'stopped').length;
}, },
counAvailable () { countAvailable () {
return filterEnvironments(this.state.environments, 'available').length; return filterEnvironments(this.state.environments, 'available').length;
} }
}, },
...@@ -86,10 +86,10 @@ $(() => { ...@@ -86,10 +86,10 @@ $(() => {
*/ */
getQueryParameter(param) { getQueryParameter(param) {
return window.location.search.substring(1).split('&').reduce((acc, param) => { return window.location.search.substring(1).split('&').reduce((acc, param) => {
acc[param.split('=')[0]] = param.split('=')[1]; const paramSplited = param.split('=');
acc[paramSplited[0]] = paramSplited[1];
return acc; return acc;
}, {})[param]; }, {})[param];
} }
}); });
}); });
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
* @param {Array} environments List of environments. * @param {Array} environments List of environments.
* @returns {Array} Tree structured array with the received environments. * @returns {Array} Tree structured array with the received environments.
*/ */
storeEnvironments(environments) { storeEnvironments(environments = []) {
const environmentsTree = environments.reduce((acc, environment) => { const environmentsTree = environments.reduce((acc, environment) => {
const data = Object.assign({}, environment); const data = Object.assign({}, environment);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
= link_to project_environments_path(@project) do = link_to project_environments_path(@project) do
Available Available
%span.badge.js-available-environments-count %span.badge.js-available-environments-count
{{counAvailable}} {{countAvailable}}
%li{class: ('active' if @scope == 'stopped')} %li{class: ('active' if @scope == 'stopped')}
= link_to project_environments_path(@project, scope: :stopped) do = link_to project_environments_path(@project, scope: :stopped) do
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
= link_to new_namespace_project_environment_path(@project.namespace, @project), class: 'btn btn-create' do = link_to new_namespace_project_environment_path(@project.namespace, @project), class: 'btn btn-create' do
New environment New environment
.table-holder{ "v-if" => "!loading && state.environments" } .table-holder{ "v-if" => "!loading && state.environments.length" }
%table.table.ci-table.environments %table.table.ci-table.environments
%thead %thead
%th Environment %th Environment
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment