Prevent the logs view table from normally growing too large
This commit is contained in:
parent
ab68126d8a
commit
8db889e2d4
3 changed files with 26 additions and 6 deletions
|
@ -565,6 +565,14 @@ i.toggle-icon:hover {
|
|||
line-height: 25px;
|
||||
}
|
||||
|
||||
.logs-view-element .log .log-description code {
|
||||
max-width: 300px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.logs-view-element .log-performer {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
@ -3168,6 +3176,10 @@ p.editable:hover i {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.billing-invoices-element .invoice-title {
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
<input id="log-filter" class="form-control" placeholder="Filter Logs" type="text" ng-model="search.$">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-container">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th>Description</th>
|
||||
|
@ -77,5 +78,6 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -398,15 +398,19 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
|
||||
$provide.factory('UtilService', ['$sanitize', function($sanitize) {
|
||||
var utilService = {};
|
||||
|
||||
utilService.textToSafeHtml = function(text) {
|
||||
|
||||
utilService.escapeHtmlString = function(text) {
|
||||
var adjusted = text.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
|
||||
return $sanitize(adjusted);
|
||||
return adjusted;
|
||||
};
|
||||
|
||||
utilService.textToSafeHtml = function(text) {
|
||||
return $sanitize(utilService.escapeHtmlString(text));
|
||||
};
|
||||
|
||||
return utilService;
|
||||
|
@ -526,7 +530,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
return builderService;
|
||||
}]);
|
||||
|
||||
$provide.factory('StringBuilderService', ['$sce', function($sce) {
|
||||
$provide.factory('StringBuilderService', ['$sce', 'UtilService', function($sce, UtilService) {
|
||||
var stringBuilderService = {};
|
||||
|
||||
stringBuilderService.buildString = function(value_or_func, metadata) {
|
||||
|
@ -581,6 +585,8 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
if (key.indexOf('image') >= 0) {
|
||||
value = value.substr(0, 12);
|
||||
}
|
||||
|
||||
var safe = UtilService.escapeHtmlString(value);
|
||||
var markedDown = getMarkedDown(value);
|
||||
markedDown = markedDown.substr('<p>'.length, markedDown.length - '<p></p>'.length);
|
||||
|
||||
|
@ -589,7 +595,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
markedDown = '<i class="fa fa-' + icon + '"></i>' + markedDown;
|
||||
}
|
||||
|
||||
description = description.replace('{' + key + '}', '<code>' + markedDown + '</code>');
|
||||
description = description.replace('{' + key + '}', '<code title="' + safe + '">' + markedDown + '</code>');
|
||||
}
|
||||
}
|
||||
return $sce.trustAsHtml(description.replace('\n', '<br>'));
|
||||
|
|
Reference in a new issue