@@ -29,13 +29,16 @@
|
||||
<div class="row animateMeOpacity">
|
||||
<div class="col-lg-12">
|
||||
<h3>Logs</h3>
|
||||
Select the log to download
|
||||
<br/>
|
||||
<br/>
|
||||
<form name="logsForm">
|
||||
<div class="form-group">
|
||||
<select class="form-control" name="type" style="width: 50%;" ng-model="logs.selectedUrl" required>
|
||||
<option ng-repeat="log in logs.types" ng-value="log.url">{{ log.name }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<a class="btn btn-primary" ng-href="{{logs.selectedUrl}}" target="_self"> Download </a>
|
||||
<a class="btn btn-primary" ng-disabled="!logs.selectedUrl" ng-href="{{logs.selectedUrl}}&format=short&lines=800" target="_self"> Download </a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,13 +65,13 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
|
||||
|
||||
$scope.populateLogTypes = function () {
|
||||
$scope.logs.types = [
|
||||
{ id: 'system', name: 'System', url: Client.makeURL('/api/v1/cloudron/logs?unit=all') },
|
||||
{ id: 'box', name: 'Box', url: Client.makeURL('/api/v1/cloudron/logs?unit=box') },
|
||||
{ id: 'mail', name: 'Mail', url: Client.makeURL('/api/v1/cloudron/logs?unit=mail') }
|
||||
{ name: 'System (All)', url: Client.makeURL('/api/v1/cloudron/logs?units=all') },
|
||||
{ name: 'Box', url: Client.makeURL('/api/v1/cloudron/logs?units=box') },
|
||||
{ name: 'Mail', url: Client.makeURL('/api/v1/cloudron/logs?units=mail') }
|
||||
];
|
||||
|
||||
Client.getInstalledApps().forEach(function (app) {
|
||||
$scope.logs.types.push({ id: app.id, name: app.fqdn, url: Client.makeURL('/api/v1/apps/' + app.id + '/logs') });
|
||||
$scope.logs.types.push({ name: app.fqdn, url: Client.makeURL('/api/v1/apps/' + app.id + '/logs') });
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user