Multiple fixes for the BOINC module.
* Fixed build for sane platforms which have case sensitive VFS layers. * Fixed two issues in web/dashboard_info.js * SImplified code to determine if the connection is alive. * Simplified code so we don't use copy.deepcopy()
Austin S. Hemmelgarn committed
Jun 5, 2018 at 10:12 UTC
4f362f76d2d201aaa1a58ca52d51ee4f7756ba1c
3 files changed
+6
-14
python.d/Makefile.am
+1
-1
@@ -103,7 +103,7 @@ dist_third_party_DATA = \
103
python_modules/third_party/ordereddict.py \
104
python_modules/third_party/lm_sensors.py \
105
python_modules/third_party/mcrcon.py \
106
- python_Modules/third_party/boinc_client.py \
106
+ python_modules/third_party/boinc_client.py \
107
$(NULL)
108
109
pythonyaml2dir=$(pythonmodulesdir)/pyyaml2
python.d/boinc.chart.py
+3
-11
@@ -6,8 +6,6 @@
6
import platform
7
import socket
8
9
-from copy import deepcopy
10
-
9
from bases.FrameworkServices.SimpleService import SimpleService
10
11
from third_party import boinc_client
@@ -127,10 +125,7 @@ class Service(SimpleService):
125
self.error('Only supported on Linux.')
126
return False
127
self.connect()
130
- if self.client.connected and self.client.authorized:
131
- self.alive = True
132
- else:
133
- self.alive = False
128
+ self.alive = self.client.connected and self.client.authorized:
129
return self.alive
130
131
def connect(self):
@@ -142,10 +137,7 @@ class Service(SimpleService):
137
except socket.error:
138
pass
139
self.client.connect()
145
- if self.client.connected and self.client.authorized:
146
- self.alive = True
147
- else:
148
- self.alive = False
140
+ self.alive = self.client.connected and self.client.authorized:
141
return self.alive
142
143
def is_alive(self):
@@ -157,7 +149,7 @@ class Service(SimpleService):
149
def _get_data(self):
150
if not self.is_alive():
151
return None
160
- data = deepcopy(_DATA_TEMPLATE)
152
+ data = dict(_DATA_TEMPLATE)
153
results = []
154
try:
155
results = self.client.get_tasks()
web/dashboard_info.js
+2
-2
@@ -381,7 +381,7 @@ netdataDashboard.menu = {
381
},
382
383
'boinc': {
384
- title: 'BOINC'
384
+ title: 'BOINC',
385
icon: '<i class="fas fa-microchip"></i>',
386
info: 'Provides task counts for <b><a href="http://boinc.berkeley.edu/">BOINC</a></b> distributed computing clients.'
387
}
@@ -2129,7 +2129,7 @@ netdataDashboard.context = {
2129
},
2130
2131
'boinc.tasks': {
2132
- info: 'The total number of tasks and the number of active tasks. Active tasks are those which are either currently being processed, or are partialy processed but suspended.
2132
+ info: 'The total number of tasks and the number of active tasks. Active tasks are those which are either currently being processed, or are partialy processed but suspended.'
2133
},
2134
2135
'boinc.states': {