From 4a0acc7b47b3043979dd024f6e4b2582ffebf8a1 Mon Sep 17 00:00:00 2001 From: Floran Brutel Date: Wed, 25 Nov 2015 13:30:28 +0100 Subject: [PATCH] WebUI : Use hostname for title --- glances/outputs/static/html/index.html | 2 +- glances/outputs/static/js/app.js | 3 +++ glances/outputs/static/js/stats_controller.js | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/glances/outputs/static/html/index.html b/glances/outputs/static/html/index.html index d0272694..9b71caaf 100644 --- a/glances/outputs/static/html/index.html +++ b/glances/outputs/static/html/index.html @@ -4,7 +4,7 @@ - Glances + Glances diff --git a/glances/outputs/static/js/app.js b/glances/outputs/static/js/app.js index 4186b40b..179a168d 100644 --- a/glances/outputs/static/js/app.js +++ b/glances/outputs/static/js/app.js @@ -10,4 +10,7 @@ var glancesApp = angular.module('glancesApp', ['ngRoute']) }); $locationProvider.html5Mode(true); +}) +.run(function($rootScope) { + $rootScope.title = "Glances"; }); diff --git a/glances/outputs/static/js/stats_controller.js b/glances/outputs/static/js/stats_controller.js index 42cfbaff..6198a476 100644 --- a/glances/outputs/static/js/stats_controller.js +++ b/glances/outputs/static/js/stats_controller.js @@ -1,4 +1,4 @@ -glancesApp.controller('statsController', function ($scope, $interval, $routeParams, GlancesStats) { +glancesApp.controller('statsController', function ($scope, $rootScope, $interval, $routeParams, GlancesStats) { $scope.refreshTime = 3; $scope.sorter = { column: "cpu_percent", @@ -78,6 +78,8 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara $scope.statsSystem = GlancesStats.getPlugin('system'); $scope.statsUptime = GlancesStats.getPlugin('uptime'); + $rootScope.title = $scope.statsSystem.hostname + ' - Glances'; + $scope.is_disconnected = false; $scope.dataLoaded = true; }, function() {