Add Client.getApp that uses REST API

This commit is contained in:
Girish Ramakrishnan
2018-06-25 18:55:07 -07:00
parent a77918bef9
commit 091663afe0
3 changed files with 13 additions and 6 deletions

View File

@@ -139,7 +139,7 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
Client.refreshInstalledApps(function (error) {
if (error) return callback(error);
Client.getApp(appId, function (error, result) {
Client.getCachedApp(appId, function (error, result) {
if (error) return callback(error);
if (result.runState === 'stopped') return callback();
@@ -174,7 +174,7 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
Client.refreshInstalledApps(function (error) {
if (error) return console.error('Failed to refresh app status.', error);
Client.getApp($scope.selected.value, function (error, result) {
Client.getCachedApp($scope.selected.value, function (error, result) {
if (error) return console.error('Failed to get app status.', error);
if (result.installationState === 'installed') $scope.appBusy = false;
@@ -203,7 +203,7 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
Client.refreshInstalledApps(function (error) {
if (error) return console.error('Failed to refresh app status.', error);
Client.getApp($scope.selected.value, function (error, result) {
Client.getCachedApp($scope.selected.value, function (error, result) {
if (error) return console.error('Failed to get app status.', error);
if (result.installationState === 'installed') $scope.appBusy = false;
@@ -249,7 +249,7 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
var appId = $scope.selected.value;
Client.getApp(appId, function (error, result) {
Client.getCachedApp(appId, function (error, result) {
if (error) return console.error(error);
// we expect this to be called _after_ a reconfigure was issued
@@ -317,7 +317,7 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
// var appId = $scope.selected.value;
// Client.getApp(appId, function (error, result) {
// Client.getCachedApp(appId, function (error, result) {
// if (error) return console.error(error);
// // we expect this to be called _after_ a reconfigure was issued