Add app configure link in app grid

This was asked for many times now for the wp-admin and ghost

In addtion we could make that information in the postinstall
a link as well
This commit is contained in:
Johannes
2016-11-24 13:02:20 +01:00
parent a1c83c79b2
commit 14ef7688b8
3 changed files with 20 additions and 3 deletions

View File

@@ -178,6 +178,17 @@ app.filter('applicationLink', function() {
};
});
app.filter('configureLink', function() {
return function(app) {
if (app.manifest.configurePath && app.installationState === ISTATES.INSTALLED && app.health === HSTATES.HEALTHY) {
console.log('===', app.manifest.configurePath)
return 'https://' + app.fqdn + (app.manifest.configurePath[0] !== '/' ? '/' : '') + app.manifest.configurePath;
} else {
return '';
}
};
});
app.filter('prettyHref', function () {
return function (input) {
if (!input) return input;

View File

@@ -409,10 +409,12 @@
<a href="" ng-click="showConfigure(app)" title="Configure App"><i class="fa fa-wrench scale"></i></a>
</div>
<div ng-show="hasConfigurePath(app)">
<a ng-href="{{app | configureLink}}" target="_blank" title="Configuration Page"><i class="fa fa-share scale"></i></a>
</div>
<div ng-show="hasPostInstallMessage(app)">
<a href="" ng-click="showPostInstall(app)">
<i class="fa fa-info-circle scale"></i>
</a>
<a href="" ng-click="showPostInstall(app)" title="Information"><i class="fa fa-info-circle scale"></i></a>
</div>
</div>

View File

@@ -485,6 +485,10 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
return app.manifest && app.manifest.postInstallMessage;
};
$scope.hasConfigurePath = function (app) {
return app.manifest && app.manifest.configurePath;
};
function fetchUsers() {
Client.getUsers(function (error, users) {
if (error) {