Shorten app ids in eventlog
This commit is contained in:
@@ -311,14 +311,18 @@ app.filter('eventLogDetails', function() {
|
||||
var data = eventLog.data;
|
||||
var errorMessage = data.errorMessage;
|
||||
|
||||
function shortenId(id) {
|
||||
return id.slice(0, 8) + '...';
|
||||
}
|
||||
|
||||
switch (eventLog.action) {
|
||||
case ACTION_ACTIVATE: return 'Cloudron activated';
|
||||
case ACTION_APP_CONFIGURE: return 'App ' + data.appId + ' was configured';
|
||||
case ACTION_APP_INSTALL: return 'App ' + data.manifest.id + '@' + data.manifest.version + ' installed at ' + data.location + ' with id ' + data.appId;
|
||||
case ACTION_APP_RESTORE: return 'App ' + data.appId + ' restored';
|
||||
case ACTION_APP_UNINSTALL: return 'App ' + data.appId + ' uninstalled';
|
||||
case ACTION_APP_UPDATE: return 'App ' + data.appId + ' updated to version ' + data.toManifest.id + '@' + data.toManifest.version;
|
||||
case ACTION_APP_LOGIN: return 'App ' + data.appId + ' logged in';
|
||||
case ACTION_APP_CONFIGURE: return 'App ' + shortenId(data.appId) + ' was configured';
|
||||
case ACTION_APP_INSTALL: return 'App ' + data.manifest.id + '@' + data.manifest.version + ' installed at ' + data.location + '.' + data.domain + ' with id ' + shortenId(data.appId);
|
||||
case ACTION_APP_RESTORE: return 'App ' + shortenId(data.appId) + ' restored';
|
||||
case ACTION_APP_UNINSTALL: return 'App ' + shortenId(data.appId) + ' uninstalled';
|
||||
case ACTION_APP_UPDATE: return 'App ' + shortenId(data.appId) + ' updated to version ' + data.toManifest.id + '@' + data.toManifest.version;
|
||||
case ACTION_APP_LOGIN: return 'App ' + shortenId(data.appId) + ' logged in';
|
||||
case ACTION_BACKUP_START: return 'Backup started';
|
||||
case ACTION_BACKUP_FINISH: return 'Backup finished. ' + (errorMessage ? ('error: ' + errorMessage) : ('id: ' + data.filename));
|
||||
case ACTION_BACKUP_CLEANUP: return 'Backup ' + data.backup.id + ' removed';
|
||||
|
||||
Reference in New Issue
Block a user