Add an icon to show account info

part of #19
This commit is contained in:
Girish Ramakrishnan
2016-09-07 02:34:17 -07:00
parent 1a0f3f687a
commit dd91de8cf6
2 changed files with 12 additions and 7 deletions

View File

@@ -208,7 +208,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ Account information for appAccounts.app.fqdn }}</h4>
<h4 class="modal-title">Account information for {{ appAccounts.app.fqdn }}</h4>
</div>
<div class="modal-body">
<div class="appstore-install-description">
@@ -366,11 +366,6 @@
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ app.progress }}%"></div>
</div>
</div>
<div>
<a href="" ng-click="showAccounts(app)" ng-style="{ 'visibility': (app | installationActive) ? 'visible' : 'hidden' }">
<i class="fa fa-users scale"></i>
</a>
</div>
</div>
</div>
</div>
@@ -405,6 +400,12 @@
<div ng-show="app.installationState === 'installed' || app.installationState === 'pending_configure' || (app | installError)">
<a href="" ng-click="showConfigure(app)" title="Configure App"><i class="fa fa-wrench scale"></i></a>
</div>
<div ng-show="hasAccountInfo(app)">
<a href="" ng-click="showAccounts(app)">
<i class="fa fa-question scale"></i>
</a>
</div>
</div>
<!-- we check the version here because the box updater does not know when an app gets updated -->

View File

@@ -284,7 +284,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.reset();
$scope.appAccounts.app = app;
$scope.appAccounts.info = app.manifest.description;
$scope.appAccounts.info = app.manifest.description.match(/### Accounts([\s\S]*?)###/m)[1];
$('#appAccountsModal').modal('show');
@@ -481,6 +481,10 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
window.history.back();
};
$scope.hasAccountInfo = function (app) {
return app.manifest && app.manifest.description.match(/### Accounts/) !== null;
};
function fetchUsers() {
Client.getUsers(function (error, users) {
if (error) {