diff --git a/app/server/linux_json_api.sh b/app/server/linux_json_api.sh
index 6a90ec03..6cb524de 100755
--- a/app/server/linux_json_api.sh
+++ b/app/server/linux_json_api.sh
@@ -9,10 +9,11 @@ CAT=$(type -P cat)
HEAD=$(type -P head)
CUT=$(type -P cut)
PS=$(type -P ps)
+TAIL=$(type -P tail)
_parseAndPrint() {
while read data; do
- $ECHO -n "$data" | $SED -r "s/\"/\\\\\"/g" | $TR -d "\n";
+ $ECHO -n "$data" | $SED -r 's/\\//g' | $TR -d "\n";
done;
}
@@ -109,6 +110,18 @@ cpu_temp() {
esac
}
+# Explore sensors -u -j flags for easy output processs
+cpu_multi_temp () {
+ result=$(sensors | grep 'Core' \
+ | $SED 's/ */ /g' \
+ | $CUT -d' ' -f1-3 \
+ | $TR -d '+' \
+ | $SED "s/°C//g" \
+ | $AWK -F: '{print "\""$1"\": \""$2"\"," } ' \
+ )
+ $ECHO "{" ${result%?} "}" | _parseAndPrint
+}
+
# by Paul Colby (http://colby.id.au), no rights reserved ;)
cpu_utilization() {
diff --git a/src/js/core/features/plugin/plugin.css b/src/js/core/features/plugin/plugin.css
index a9134c3c..d119aabf 100644
--- a/src/js/core/features/plugin/plugin.css
+++ b/src/js/core/features/plugin/plugin.css
@@ -56,7 +56,7 @@
.plugin.chart-plugin {
padding: 0px;
- resize: none;
+ #resize: none;
padding-bottom: 0;
}
@@ -77,7 +77,7 @@
}
.plugin-body-short {
- height: 263px;
+ height: 294px;
}
.plugin last-update{
diff --git a/src/js/core/routes.js b/src/js/core/routes.js
index 10bbb8db..d26ab881 100644
--- a/src/js/core/routes.js
+++ b/src/js/core/routes.js
@@ -26,7 +26,7 @@ function routesFn($routeProvider) {
' ',
' ',
' ',
- ' ',
+ ' ',
' ',
' ',
' ',
diff --git a/src/js/plugins/cpu-multi-temp-chart.directive.js b/src/js/plugins/cpu-multi-temp-chart.directive.js
new file mode 100644
index 00000000..02285139
--- /dev/null
+++ b/src/js/plugins/cpu-multi-temp-chart.directive.js
@@ -0,0 +1,16 @@
+angular.module('linuxDash').directive('cpuMultiTempChart', ['server', function(server) {
+ return {
+ restrict: 'E',
+ scope: {},
+ template: '\
+ \
+ \
+ ',
+ link: function(scope) {
+ scope.units = 'ºC'
+ }
+ }
+}])