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:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user