Set the url for the log download button
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<select class="form-control" ng-options="log.name for log in logs track by log.value" ng-model="selected"></select>
|
||||
</div>
|
||||
<div class="pagination pull-right">
|
||||
<button class="btn btn-default btn-outline" ng-click=""><i class="fa fa-download"></i> Download </button>
|
||||
<a class="btn btn-default btn-outline" ng-href="{{ selected.url }}&format=short&lines=800"><i class="fa fa-download"></i> Download </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,12 +13,12 @@ angular.module('Application').controller('LogsController', ['$scope', '$location
|
||||
}
|
||||
|
||||
$scope.populateLogTypes = function () {
|
||||
$scope.logs.push({ name: 'System (All)', type: 'platform', value: 'all' });
|
||||
$scope.logs.push({ name: 'Box', type: 'platform', value: 'box' });
|
||||
$scope.logs.push({ name: 'Mail', type: 'platform', value: 'mail' });
|
||||
$scope.logs.push({ name: 'System (All)', type: 'platform', value: 'all', url: Client.makeURL('/api/v1/cloudron/logs?units=all') });
|
||||
$scope.logs.push({ name: 'Box', type: 'platform', value: 'box', url: Client.makeURL('/api/v1/cloudron/logs?units=box') });
|
||||
$scope.logs.push({ name: 'Mail', type: 'platform', value: 'mail', url: Client.makeURL('/api/v1/cloudron/logs?units=mail') });
|
||||
|
||||
Client.getInstalledApps().forEach(function (app) {
|
||||
$scope.logs.push({ name: app.fqdn, type: 'app', value: app.id });
|
||||
$scope.logs.push({ name: app.fqdn, type: 'app', value: app.id, url: Client.makeURL('/api/v1/apps/' + app.id + '/logs') });
|
||||
});
|
||||
|
||||
$scope.selected = $scope.logs[0];
|
||||
|
||||
Reference in New Issue
Block a user