mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 18:28:55 +00:00
Formatting OS info in manager and agent tabs
Formatting os name
This commit is contained in:
commit
898443f547
@ -166,8 +166,22 @@ app.controller('agentsController', function ($scope, $q, DataFactory, Notifier,
|
||||
$scope.agentInfo = data.data;
|
||||
if(angular.isUndefined($scope.agentInfo.version))
|
||||
$scope.agentInfo.version = "Unknown";
|
||||
if(angular.isUndefined($scope.agentInfo.os))
|
||||
$scope.agentInfo.os = "Unknown";
|
||||
if(angular.isUndefined($scope.agentInfo.os)) {
|
||||
$scope.agentOs = "Unknown";
|
||||
}
|
||||
else {
|
||||
if(!angular.isUndefined($scope.agentInfo.os.name)) {
|
||||
$scope.agentOs = $scope.agentInfo.os.name + ' ' + $scope.agentInfo.os.version;
|
||||
}
|
||||
else {
|
||||
if(!angular.isUndefined($scope.agentInfo.os.uname)){
|
||||
$scope.agentOs = $scope.agentInfo.os.uname;
|
||||
}
|
||||
else {
|
||||
$scope.agentOs = "Unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(angular.isUndefined($scope.agentInfo.lastKeepAlive))
|
||||
$scope.agentInfo.lastKeepAlive = "Unknown";
|
||||
|
||||
|
@ -978,6 +978,13 @@ md-select-menu.md-default-theme md-content md-option:not([disabled]):focus, md-s
|
||||
.metric-vis .metric-value {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.managerConfigurationArrow {
|
||||
float: right;
|
||||
margin-top: 6px;
|
||||
|
@ -5,28 +5,29 @@
|
||||
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(7)'><div></div></div>
|
||||
<div ng-show='hideRing(7) && results && !loading' ng-if="tabView == 'panels'">
|
||||
<md-content class="no-legend" layout="row">
|
||||
<md-card class="text-centered" flex layout="column">
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
<div class="metric-value ng-binding" style="font-size: 14pt;">{{agentInfo.name}}</div>
|
||||
<div class="ng-binding">Name</div>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
<md-card class="text-centered" flex="10" layout="column">
|
||||
<md-card flex="10" layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
<div class="metric-value ng-binding" style="font-size: 14pt;">{{agentInfo.ip}}</div>
|
||||
<div class="ng-binding">IP Address</div>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
<md-card class="text-centered" flex="10" layout="column">
|
||||
<md-card flex="10" layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
<div class="metric-value ng-binding" style="font-size: 14pt;">{{agentInfo.version}}</div>
|
||||
<div class="metric-value ng-binding" style="font-size: 14pt;">{{ agentInfo.version | limitTo: 12 }}{{agentInfo.version.length > 12 ? '...' : ''}}</div>
|
||||
<md-tooltip md-direction="bottom">{{ agentInfo.version }}</md-tooltip>
|
||||
<div class="ng-binding">Version</div>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
<md-card flex layout="column">
|
||||
<md-card-content style="text-align: center;">
|
||||
<div class="metric-value ng-binding" class="legend-value-title ng-binding legend-value-truncate" style="font-size: 14pt;">{{ agentInfo.os | limitTo: 70 }}{{agentInfo.os.length > 70 ? '...' : ''}}</div>
|
||||
<md-tooltip md-direction="bottom">{{ agentInfo.os }}</md-tooltip>
|
||||
<div class="metric-value ng-binding" class="legend-value-title ng-binding legend-value-truncate" style="font-size: 14pt;">{{ agentOs }}</div>
|
||||
<md-tooltip md-direction="bottom">{{ agentOs }}</md-tooltip>
|
||||
<div class="ng-binding">OS</div>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
|
@ -120,7 +120,7 @@
|
||||
</span>
|
||||
<span layout="row">
|
||||
<p style="font-weight: bold; min-width: 150px" >Operating system</p>
|
||||
<p class="right-text">{{agentInfo.os ? agentInfo.os : '-'}}</p>
|
||||
<p class="right-text">{{agentInfo.os.name ? agentInfo.os.name + agentInfo.os.version : agentInfo.os.uname ? agentInfo.os.uname : '-'}}</p>
|
||||
</span>
|
||||
</div>
|
||||
</md-card-content>
|
||||
|
Loading…
Reference in New Issue
Block a user