Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/xcjs/blur-monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
xcjs committed Sep 13, 2016
2 parents 3a7441f + b0e249a commit be0cf33
Show file tree
Hide file tree
Showing 21 changed files with 263 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Currently the tool can be used to monitor the following information:

* Processor model
* Processor clock speed on variable clock speed models
* Processor Utilization
* Processor utilization
* Memory utilization
* Swap utilization
* Mount points and disk utilization
Expand Down
9 changes: 1 addition & 8 deletions blurmonitor/routes/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ function getRoutes() {

var promise = new Promise(function (resolve) {
lsbRelease.getRelease.then(function (release) {
release = lsbRelease.parse(release);

response.distro = {};
response.distro.id = release.DISTRIB_ID;
response.distro.release = release.DISTRIB_RELEASE;
response.distro.codeName = release.DISTRIB_CODENAME;
response.distro.description = release.DISTRIB_DESCRIPTION;

response.distro = lsbRelease.parse(release);
resolve(response);
});
});
Expand Down
9 changes: 8 additions & 1 deletion blurmonitor/services/lsb-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@ function parseRelease(stdout) {
}
});

return lsbRelease;
var parsedRelease = {
id: lsbRelease.DISTRIB_ID,
release: lsbRelease.DISTRIB_RELEASE,
codeName: lsbRelease.DISTRIB_CODENAME,
description: lsbRelease.DISTRIB_DESCRIPTION
};

return parsedRelease;
}
2 changes: 1 addition & 1 deletion gulp/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ gulp.task('fonts', function () {

gulp.task('other', ['copyVendorImages'], function () {
var fileFilter = $.filter(function (file) {
return file.stat.isFile();
return file.stat.isFile() || file.stat.isSymbolicLink();
});

return gulp.src([
Expand Down
19 changes: 14 additions & 5 deletions src/app/pages/processes/processes.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
vm.treeConfig = {
core: {
multiple: false,
worker: true
worker: false
},
types: {
process: {
Expand Down Expand Up @@ -45,10 +45,11 @@
});

getProcesses(false);
getProcesses(true);

vm.interval = $interval(function() {
getProcesses(false);
}, refreshInterval);
}, refreshInterval * 999999);
});

$scope.$on("$destroy", function() {
Expand All @@ -60,7 +61,7 @@
vm.processes = response;

if(updateTree) {
mapProcessesToTree(vm.processes);
mapProcessesToTree(vm.processes);
} else {
// Update top lists instead.
getTopCpuProcesses();
Expand All @@ -81,7 +82,11 @@
});

angular.forEach(vm.topCpuProcesses, function(process) {
process.displayName = process.command.length <= 50 ? process.command : process.command.substring(0, 50) + '...'
var iconName = getTreeTypeFromCommand(process.command);

process.displayName = process.command;
process.icon = '/assets/img/app/apps/' + iconName + '.svg';
process.iconFont = iconName === 'process';
});
}

Expand All @@ -97,7 +102,11 @@
});

angular.forEach(vm.topMemoryProcesses, function(process) {
process.displayName = process.command.length <= 50 ? process.command : process.command.substring(0, 50) + '...'
var iconName = getTreeTypeFromCommand(process.command);

process.displayName = process.command;
process.icon = '/assets/img/app/apps/' + iconName + '.svg';
process.iconFont = iconName === 'process';
});
}

Expand Down
23 changes: 12 additions & 11 deletions src/app/pages/processes/processes.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<div class="row">
<div class="col-md-6">
<div ng-if="vm.topCpuProcesses.length > 0" ba-panel ba-panel-title="Top Processor Intensive Tasks" ba-panel-class="with-scroll">
<ol class="half-height">
<ol class="ordered-process-list half-height">
<li ng-repeat="process in vm.topCpuProcesses" title="{{process.command}}">
<i class="ion-gear-a"></i>
{{process.displayName}}
({{process.processorUtilization}}%)
<i ng-if="process.iconFont" class="list-icon ion-gear-a"></i>
<i ng-if="!process.iconFont" class="list-icon" style="background-image: url({{process.icon}});"></i>
<span class="process-name">{{process.displayName}}</span>
<span class="process-util">({{process.processorUtilization}}%)</span>
</li>
</ol>
</div>
</div>

<div class="col-md-6">
<div ng-if="vm.topMemoryProcesses.length > 0" ba-panel ba-panel-title="Top Memory Intensive Tasks" ba-panel-class="with-scroll">
<ol class="half-height">
<ol class="ordered-process-list half-height">
<li ng-repeat="process in vm.topMemoryProcesses" title="{{process.command}}">
<i class="ion-gear-a"></i>
{{process.displayName}}
({{process.memoryUtilization}})%
<i ng-if="process.iconFont" class="list-icon ion-gear-a"></i>
<i ng-if="!process.iconFont" class="list-icon" style="background-image: url({{process.icon}});"></i>
<span class="process-name">{{process.displayName}}</span>
<span class="process-util">({{process.memoryUtilization}})%</span>
</li>
</ol>
</div>
Expand All @@ -26,12 +28,11 @@

<div class="row">
<div class="col-md-12">
<div ba-panel ba-panel-title="Process Tree" ba-panel-class="with-scroll tree-panel">
<div ng-if="vm.treeProcesses.length > 0" ba-panel ba-panel-title="Process Tree" ba-panel-class="with-scroll tree-panel">
<div class="button-wrapper">
<button type="button" class="btn btn-primary btn-raised btn-with-icon" ng-click="vm.getProcesses(true)">
<i class="ion-loop"></i>
<span ng-if="vm.treeProcesses.length === 0">Load Full Process Tree</span>
<span ng-if="vm.treeProcesses.length > 0">Refresh Tree</span>
Refresh Tree
</button>
</div>
<div js-tree="vm.treeConfig" ng-model="vm.treeProcesses"></div>
Expand Down
1 change: 1 addition & 0 deletions src/assets/img/app/apps/Plex DLNA Server.svg
1 change: 1 addition & 0 deletions src/assets/img/app/apps/Plex Media Server.svg
1 change: 1 addition & 0 deletions src/assets/img/app/apps/Plex.svg
1 change: 1 addition & 0 deletions src/assets/img/app/apps/SCREEN.svg
1 change: 1 addition & 0 deletions src/assets/img/app/apps/chrome.svg
81 changes: 81 additions & 0 deletions src/assets/img/app/apps/gulp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/app/apps/node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/app/apps/nodejs.svg
10 changes: 10 additions & 0 deletions src/assets/img/app/apps/plex.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit be0cf33

Please sign in to comment.