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