X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=afm-client%2Fapp%2FFrontend%2Fpages%2FDashboard%2FDashboardModule.js;h=a52e5b6de1a3f4c25f342a44c28ba0626783a9c3;hb=9966df615382815fb6169c9ecd9e3e696f8fa615;hp=0114a264162e6fa748618915ec045f681383aaff;hpb=1a4ed39bf86b2115eb0f1387d1e988462b492776;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 0114a26..a52e5b6 100644 --- a/afm-client/app/Frontend/pages/Dashboard/DashboardModule.js +++ b/afm-client/app/Frontend/pages/Dashboard/DashboardModule.js @@ -21,6 +21,9 @@ angular.module('DashboardModule', ['SubmitButton', 'TokenRefresh', 'AppliButton' scope.request = action; scope.errcode = response.status; if (response.data) scope.response = response.data; + + // On app was removed let's update runnable list + if (action === "uninstall") scope.GetRunnables(); }; scope.GetRunnables = function() { @@ -46,9 +49,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