X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=afm-client%2Fapp%2FFrontend%2Fpages%2FDashboard%2FDashboardModule.js;h=f4330cf214192f039f23068cdb1e529207ac8070;hb=be83a8f382cf2fea98161bfd6d51719aacbf9aa9;hp=83408a5610efbe2775358536a4288bc495bb438a;hpb=3d6f539592cb2171ed67b3c2b0246fd72ddfaa0d;p=src%2Fapp-framework-demo.git diff --git a/afm-client/app/Frontend/pages/Dashboard/DashboardModule.js b/afm-client/app/Frontend/pages/Dashboard/DashboardModule.js index 83408a5..f4330cf 100644 --- a/afm-client/app/Frontend/pages/Dashboard/DashboardModule.js +++ b/afm-client/app/Frontend/pages/Dashboard/DashboardModule.js @@ -46,9 +46,10 @@ angular.module('DashboardModule', ['SubmitButton', 'TokenRefresh', 'AppliButton' // loop on runnable application to prepare for display var appliIDs=[]; - for (var idx=0; idx < response.data.response.length; idx ++) { - appliIDs[idx] = response.data.response [idx].id; - scope.appliStore [response.data.response [idx].id] = response.data.response [idx]; + var runnables = response.data.response.runnables; + for (var idx=0; idx < runnables.length; idx ++) { + appliIDs[idx] = runnables [idx].id; + scope.appliStore [runnables [idx].id] = runnables [idx]; } scope.appliIDs = appliIDs; // avoid partial update to limit UI refresh @@ -57,8 +58,8 @@ angular.module('DashboardModule', ['SubmitButton', 'TokenRefresh', 'AppliButton' scope.FileUploaded = function (response) { console.log ("file Uploaded"); - // Cannot display post results as GetRunnable will overload them - scope.request = "/api/afm-main/runnable"; + // Cannot display post results as GetRunnable will overload them aynchronously + scope.request = "/api/afm-main/install"; scope.response = response.headers; scope.errcode = response.status;