From df6c872a0533adee821edad6974175d00c737f7d Mon Sep 17 00:00:00 2001 From: malbarral Date: Thu, 10 Aug 2017 14:27:07 +0200 Subject: [PATCH 1/2] Centering cards in agent tab --- public/less/main.less | 10 ++++++++++ public/templates/agents-overview.html | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/public/less/main.less b/public/less/main.less index 4144eb69e..4f1f5d4cc 100644 --- a/public/less/main.less +++ b/public/less/main.less @@ -3,6 +3,16 @@ body{ width:100%; } +md-card.text-centered { + position: relative; +} + +md-card.text-centered md-card-content { + position: absolute; + top: 50%; left: 50%; + transform: translate(-50%,-50%); +} + @-webkit-keyframes uil-ring-anim { 0% { -webkit-transform: rotate(0deg); diff --git a/public/templates/agents-overview.html b/public/templates/agents-overview.html index ee2c2d17a..b357fa672 100644 --- a/public/templates/agents-overview.html +++ b/public/templates/agents-overview.html @@ -5,19 +5,19 @@
- +
{{agentInfo.name}}
Name
- +
{{agentInfo.ip}}
IP Address
- +
{{agentInfo.version}}
Version
From 6e92b63aa3c83791d8ad25144b7a0fba005e3eb7 Mon Sep 17 00:00:00 2001 From: malbarral Date: Thu, 10 Aug 2017 16:34:37 +0200 Subject: [PATCH 2/2] Formatting OS info in manager and agent tabs --- public/controllers/agents.js | 18 ++++++++++++++++-- public/less/main.less | 17 +++++++---------- public/templates/agents-overview.html | 13 +++++++------ public/templates/manager-status.html | 2 +- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/public/controllers/agents.js b/public/controllers/agents.js index f129a8205..f655b209e 100644 --- a/public/controllers/agents.js +++ b/public/controllers/agents.js @@ -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"; diff --git a/public/less/main.less b/public/less/main.less index 4f1f5d4cc..6b80925c9 100644 --- a/public/less/main.less +++ b/public/less/main.less @@ -3,16 +3,6 @@ body{ width:100%; } -md-card.text-centered { - position: relative; -} - -md-card.text-centered md-card-content { - position: absolute; - top: 50%; left: 50%; - transform: translate(-50%,-50%); -} - @-webkit-keyframes uil-ring-anim { 0% { -webkit-transform: rotate(0deg); @@ -978,6 +968,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; diff --git a/public/templates/agents-overview.html b/public/templates/agents-overview.html index b357fa672..fa19bd268 100644 --- a/public/templates/agents-overview.html +++ b/public/templates/agents-overview.html @@ -5,28 +5,29 @@
- +
{{agentInfo.name}}
Name
- +
{{agentInfo.ip}}
IP Address
- + -
{{agentInfo.version}}
+
{{ agentInfo.version | limitTo: 12 }}{{agentInfo.version.length > 12 ? '...' : ''}}
+ {{ agentInfo.version }}
Version
-
{{ agentInfo.os | limitTo: 70 }}{{agentInfo.os.length > 70 ? '...' : ''}}
- {{ agentInfo.os }} +
{{ agentOs }}
+ {{ agentOs }}
OS
diff --git a/public/templates/manager-status.html b/public/templates/manager-status.html index 3a5c812b3..173bb6745 100644 --- a/public/templates/manager-status.html +++ b/public/templates/manager-status.html @@ -120,7 +120,7 @@

Operating system

-

{{agentInfo.os ? agentInfo.os : '-'}}

+

{{agentInfo.os.name ? agentInfo.os.name + agentInfo.os.version : agentInfo.os.uname ? agentInfo.os.uname : '-'}}