diff --git a/src/js/client.js b/src/js/client.js index 840382b40..34ede214d 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -80,6 +80,12 @@ var TASK_TYPES = { TASK_SYNC_DNS_RECORDS: 'syncDnsRecords', }; +const APP_TYPES = { + APP: 'app', //default + LINK: 'link', + PROXIED: 'proxied' +}; + var SECRET_PLACEHOLDER = String.fromCharCode(0x25CF).repeat(8); // ---------------------------------------------- @@ -621,7 +627,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }; Client.prototype.installApp = function (id, manifest, title, config, callback) { - var that = this; var data = { appStoreId: id + '@' + manifest.version, subdomain: config.subdomain, @@ -1853,7 +1858,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout // amend properties to mimick full app data.applinks.forEach(function (applink) { - applink.type = 'applink'; + applink.type = APP_TYPES.LINK; applink.fqdn = applink.upstreamUri; // this fqdn may contain the protocol! applink.manifest = { addons: {}}; applink.installationState = ISTATES.INSTALLED; diff --git a/src/js/index.js b/src/js/index.js index cc3a140c9..a6ee76fc3 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -2,7 +2,7 @@ /* global angular:false */ /* global $:false */ -/* global ERROR,ISTATES,HSTATES,RSTATES */ +/* global ERROR,ISTATES,HSTATES,RSTATES,APP_TYPES */ // deal with accessToken in the query, this is passed for example on password reset and account setup upon invite var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {}); @@ -324,6 +324,7 @@ app.filter('installationStateLabel', function () { return 'Recovery Mode'; } else if (app.runState === 'running') { if (!app.health) return 'Starting...'; // no data yet + if (app.type === APP_TYPES.LINK) return ''; if (app.health === HSTATES.HEALTHY) return 'Running'; return 'Not responding'; // dead/exit/unhealthy } else if (app.runState === 'stopped') return 'Stopped';