diff --git a/webadmin/src/js/client.js b/webadmin/src/js/client.js index 44cbcf9e6..c72d9c948 100644 --- a/webadmin/src/js/client.js +++ b/webadmin/src/js/client.js @@ -215,7 +215,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification', Client.prototype.installApp = function (id, manifest, title, config, callback) { var that = this; - var data = { appStoreId: id, manifest: manifest, location: config.location, portBindings: config.portBindings, accessRestriction: config.accessRestriction }; + var data = { appStoreId: id, manifest: manifest, location: config.location, portBindings: config.portBindings, accessRestriction: config.accessRestriction, oauthProxy: config.oauthProxy }; $http.post(client.apiOrigin + '/api/v1/apps/install', data).success(function (data, status) { if (status !== 202 || typeof data !== 'object') return defaultErrorHandler(callback); @@ -249,7 +249,8 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification', }; Client.prototype.configureApp = function (id, password, config, callback) { - var data = { appId: id, password: password, location: config.location, portBindings: config.portBindings, accessRestriction: config.accessRestriction }; + console.log('---', config) + var data = { appId: id, password: password, location: config.location, portBindings: config.portBindings, accessRestriction: config.accessRestriction, oauthProxy: config.oauthProxy }; $http.post(client.apiOrigin + '/api/v1/apps/' + id + '/configure', data).success(function (data, status) { if (status !== 202) return callback(new ClientError(status, data)); callback(null); diff --git a/webadmin/src/views/apps.html b/webadmin/src/views/apps.html index e918647d8..c1447e179 100644 --- a/webadmin/src/views/apps.html +++ b/webadmin/src/views/apps.html @@ -38,10 +38,16 @@
+
+ +
+
Application Specific Settings
diff --git a/webadmin/src/views/apps.js b/webadmin/src/views/apps.js index 6c104201c..69bde63c5 100644 --- a/webadmin/src/views/apps.js +++ b/webadmin/src/views/apps.js @@ -19,7 +19,8 @@ angular.module('Application').controller('AppsController', ['$scope', '$location portBindings: {}, portBindingsEnabled: {}, portBindingsInfo: {}, - accessRestriction: '' + accessRestriction: '', + oauthProxy: false }; $scope.appUninstall = { @@ -53,6 +54,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location $scope.appConfigure.password = ''; $scope.appConfigure.portBindings = {}; $scope.appConfigure.accessRestriction = ''; + $scope.appConfigure.oauthProxy = false; $scope.appConfigureForm.$setPristine(); $scope.appConfigureForm.$setUntouched(); @@ -90,6 +92,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location $scope.appConfigure.app = app; $scope.appConfigure.location = app.location; $scope.appConfigure.accessRestriction = app.accessRestriction; + $scope.appConfigure.oauthProxy = app.oauthProxy; $scope.appConfigure.portBindingsInfo = app.manifest.tcpPorts || {}; // Portbinding map only for information $scope.appConfigure.portBindings = {}; // This is the actual model holding the env:port pair $scope.appConfigure.portBindingsEnabled = {}; // This is the actual model holding the enabled/disabled flag @@ -122,7 +125,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location } } - Client.configureApp($scope.appConfigure.app.id, $scope.appConfigure.password, { location: $scope.appConfigure.location || '', portBindings: finalPortBindings, accessRestriction: $scope.appConfigure.accessRestriction }, function (error) { + Client.configureApp($scope.appConfigure.app.id, $scope.appConfigure.password, { location: $scope.appConfigure.location || '', portBindings: finalPortBindings, accessRestriction: $scope.appConfigure.accessRestriction, oauthProxy: $scope.appConfigure.oauthProxy }, function (error) { if (error) { if (error.statusCode === 409 && (error.message.indexOf('is reserved') !== -1 || error.message.indexOf('is already in use') !== -1)) { $scope.appConfigure.error.port = error.message; diff --git a/webadmin/src/views/appstore.js b/webadmin/src/views/appstore.js index 2f4a4b439..2af591ea1 100644 --- a/webadmin/src/views/appstore.js +++ b/webadmin/src/views/appstore.js @@ -17,6 +17,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca location: '', portBindings: {}, accessRestriction: '', + oauthProxy: false, mediaLinks: [] }; @@ -136,6 +137,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca $scope.appInstall.location = ''; $scope.appInstall.portBindings = {}; $scope.appInstall.accessRestriction = ''; + $scope.appInstall.oauthProxy = false; $scope.appInstall.installFormVisible = false; $scope.appInstall.mediaLinks = []; $('#collapseInstallForm').collapse('hide'); @@ -165,6 +167,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca $scope.appInstall.portBindings = {}; // This is the actual model holding the env:port pair $scope.appInstall.portBindingsEnabled = {}; // This is the actual model holding the enabled/disabled flag $scope.appInstall.accessRestriction = app.accessRestriction || ''; + $scope.appInstall.oauthProxy = app.oauthProxy || false; // set default ports for (var env in $scope.appInstall.app.manifest.tcpPorts) { @@ -194,7 +197,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca } } - Client.installApp($scope.appInstall.app.id, $scope.appInstall.app.manifest, $scope.appInstall.app.title, { location: $scope.appInstall.location || '', portBindings: finalPortBindings, accessRestriction: $scope.appInstall.accessRestriction }, function (error) { + Client.installApp($scope.appInstall.app.id, $scope.appInstall.app.manifest, $scope.appInstall.app.title, { location: $scope.appInstall.location || '', portBindings: finalPortBindings, accessRestriction: $scope.appInstall.accessRestriction, oauthProxy: $scope.appInstall.oauthProxy }, function (error) { if (error) { if (error.statusCode === 409 && (error.message.indexOf('is reserved') !== -1 || error.message.indexOf('is already in use') !== -1)) { $scope.appInstall.error.port = error.message;