Add Client.getApp that uses REST API
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user