Make search page full width & remove some variables & func's in controller that is no longer needed (as will move to an overview/welcome type dashboard)
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
vm.logsLoading = false;
|
||||
|
||||
vm.page = {};
|
||||
vm.labels = {};
|
||||
|
||||
vm.logLevels = [
|
||||
{
|
||||
@@ -41,23 +40,9 @@
|
||||
vm.searches = [];
|
||||
|
||||
vm.logItems = {};
|
||||
vm.numberOfErrors = 0;
|
||||
vm.commonLogMessages = [];
|
||||
vm.commonLogMessagesCount = 10;
|
||||
vm.logOptions = {};
|
||||
vm.logOptions.orderDirection = 'Descending';
|
||||
|
||||
// ChartJS Options - for count/overview of log distribution
|
||||
vm.logTypeLabels = ["Info", "Debug", "Warning", "Error", "Critical"];
|
||||
vm.logTypeData = [0, 0, 0, 0, 0];
|
||||
vm.logTypeColors = [ '#dcdcdc', '#97bbcd', '#46bfbd', '#fdb45c', '#f7464a'];
|
||||
vm.chartOptions = {
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'left'
|
||||
}
|
||||
};
|
||||
|
||||
vm.fromDatePickerConfig = {
|
||||
pickDate: true,
|
||||
pickTime: true,
|
||||
@@ -92,7 +77,6 @@
|
||||
vm.getFilterName = getFilterName;
|
||||
vm.setLogLevelFilter = setLogLevelFilter;
|
||||
vm.toggleOrderBy = toggleOrderBy;
|
||||
vm.findMessageTemplate = findMessageTemplate;
|
||||
vm.selectSearch = selectSearch;
|
||||
vm.resetSearch = resetSearch;
|
||||
vm.findItem = findItem;
|
||||
@@ -106,6 +90,7 @@
|
||||
|
||||
var savedSearches = logViewerResource.getSavedSearches().then(function (data) {
|
||||
vm.searches = data;
|
||||
vm.loading = false;
|
||||
},
|
||||
// fallback to some defaults if error from API response
|
||||
function () {
|
||||
@@ -137,29 +122,6 @@
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
var numOfErrors = logViewerResource.getNumberOfErrors().then(function (data) {
|
||||
vm.numberOfErrors = data;
|
||||
});
|
||||
|
||||
var logCounts = logViewerResource.getLogLevelCounts().then(function (data) {
|
||||
vm.logTypeData = [];
|
||||
vm.logTypeData.push(data.Information);
|
||||
vm.logTypeData.push(data.Debug);
|
||||
vm.logTypeData.push(data.Warning);
|
||||
vm.logTypeData.push(data.Error);
|
||||
vm.logTypeData.push(data.Fatal);
|
||||
});
|
||||
|
||||
var commonMsgs = logViewerResource.getMessageTemplates().then(function(data){
|
||||
vm.commonLogMessages = data;
|
||||
});
|
||||
|
||||
//Set loading indicatior to false when these 3 queries complete
|
||||
$q.all([savedSearches, numOfErrors, logCounts, commonMsgs]).then(function(data) {
|
||||
vm.loading = false;
|
||||
});
|
||||
|
||||
//Get all logs on init load
|
||||
getLogs();
|
||||
}
|
||||
@@ -247,13 +209,6 @@
|
||||
getLogs();
|
||||
}
|
||||
|
||||
function findMessageTemplate(template){
|
||||
|
||||
//Update search box input
|
||||
vm.logOptions.filterExpression = "@MessageTemplate='" + template.MessageTemplate + "'";
|
||||
search();
|
||||
}
|
||||
|
||||
function selectSearch(searchItem){
|
||||
//Update search box input
|
||||
vm.logOptions.filterExpression = searchItem.query;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<form ng-submit="vm.search()">
|
||||
<umb-editor-sub-header>
|
||||
<umb-editor-sub-header-content-left style="width:calc(100% - 350px - 20px); line-height:30px;">
|
||||
<umb-editor-sub-header-content-left style="width:100%; line-height:30px;">
|
||||
<!-- Log Level filter -->
|
||||
<div style="position: relative;">
|
||||
<a class="btn btn-link dropdown-toggle flex" href="" ng-click="vm.page.showLevelFilter = !vm.page.showLevelFilter">
|
||||
@@ -59,7 +59,7 @@
|
||||
</umb-editor-sub-header>
|
||||
|
||||
<umb-editor-sub-header>
|
||||
<umb-editor-sub-header-content-left style="width:calc(100% - 350px - 20px);">
|
||||
<umb-editor-sub-header-content-left style="width:100%">
|
||||
|
||||
<div style="position:relative; width:100%;">
|
||||
<!-- Search/expression filter -->
|
||||
@@ -97,9 +97,9 @@
|
||||
</umb-editor-sub-header>
|
||||
</form>
|
||||
|
||||
<div class="umb-package-details" ng-if="!vm.loading">
|
||||
<div class=" ng-if="!vm.loading">
|
||||
|
||||
<div class="umb-package-details__main-content">
|
||||
<div class="">
|
||||
|
||||
<!-- Loader for the main logs content when paging -->
|
||||
<umb-load-indicator ng-if="vm.logsLoading"></umb-load-indicator>
|
||||
@@ -201,53 +201,6 @@
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__sidebar">
|
||||
|
||||
<!-- No of Errors -->
|
||||
<umb-box data-element="node-info-scheduled-publishing">
|
||||
<umb-box-header>Number of Errors</umb-box-header>
|
||||
<umb-box-content class="block-form" style="font-size: 40px; font-weight:900; text-align:center; color:#fe6561;">
|
||||
{{ vm.numberOfErrors }}
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
|
||||
<!-- Chart of diff log types -->
|
||||
<umb-box data-element="node-info-scheduled-publishing">
|
||||
<umb-box-header>Log Types</umb-box-header>
|
||||
<umb-box-content class="block-form">
|
||||
|
||||
<canvas
|
||||
chart-doughnut
|
||||
chart-data="vm.logTypeData"
|
||||
chart-labels="vm.logTypeLabels"
|
||||
chart-colors="vm.logTypeColors"
|
||||
chart-options="vm.chartOptions"></canvas>
|
||||
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
|
||||
<!-- List of top 5 common log messages -->
|
||||
<umb-box data-element="node-info-scheduled-publishing" ng-if="vm.commonLogMessages">
|
||||
<umb-box-header>Common Log Messages</umb-box-header>
|
||||
<umb-box-content class="block-form">
|
||||
<em>Total Unique Message types</em>: {{ vm.commonLogMessages.length }}
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr ng-repeat="template in vm.commonLogMessages | limitTo:vm.commonLogMessagesCount" ng-click="vm.findMessageTemplate(template)" style="cursor: pointer;">
|
||||
<td>
|
||||
{{ template.MessageTemplate }}
|
||||
</td>
|
||||
<td>
|
||||
{{ template.Count }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-primary" ng-if="vm.commonLogMessagesCount < vm.commonLogMessages.length" ng-click="vm.commonLogMessagesCount = vm.commonLogMessagesCount +10">Show More</a>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</umb-editor-container>
|
||||
|
||||
Reference in New Issue
Block a user