Commit 5e9f0bea authored by Filipa Lacerda's avatar Filipa Lacerda

Changes after review

parent 5cad1401
......@@ -132,8 +132,6 @@ export default Vue.component('environment-component', {
.then(resp => resp.json())
.then((response) => {
this.store.setfolderContent(folder, response.environments);
})
.then(() => {
this.isLoadingFolderContent = false;
})
.catch(() => {
......
......@@ -73,15 +73,15 @@ export default {
</td>
</tr>
<tr v-if="!isLoadingFolderContent"
is="environment-item"
<template v-else>
<tr is="environment-item"
v-for="children in model.children"
:model="children"
:can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment"
:service="service"></tr>
<tr v-if="!isLoadingFolderContent">
<tr>
<td colspan="6" class="text-center">
<a :href="folderUrl(model)" class="btn btn-default">
Show all
......@@ -89,7 +89,7 @@ export default {
</td>
</tr>
</template>
</template>
</template>
</tbody>
</table>
......
......@@ -7,6 +7,7 @@ Vue.use(VueResource);
export default class EnvironmentsService {
constructor(endpoint) {
this.environments = Vue.resource(endpoint);
this.folderResults = 3;
}
get(scope, page) {
......@@ -18,7 +19,6 @@ export default class EnvironmentsService {
}
getFolderContent(folderUrl) {
const results = 3;
return Vue.http.get(`${folderUrl}.json?per_page=${results}`);
return Vue.http.get(`${folderUrl}.json?per_page=${this.folderResults}`);
}
}
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