Skip to content

Commit

Permalink
Merge pull request #628 from guydavis/integration
Browse files Browse the repository at this point in the history
v0.7.1
  • Loading branch information
guydavis authored Apr 2, 2022
2 parents a2bb7d9 + f87b8c4 commit 95741d0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format
## [0.7.1] - 2022-04-02
- Drive monitoring using Smartctl (WebUI status currently, alerting to come soon)
- Dutch translations (nl_NL) provided by Bernie Deprez. Thanks!
- Updates to various fork blockchains and tools including BTCGreen, HDDCoin, Madmax, MMX and Shibgreen
- Updates to various fork blockchains and tools including BTCGreen, Flax, HDDCoin, Madmax, MMX and Shibgreen
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/1.3.1) - v1.3.1 patch release
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/1.3.2) - v1.3.2 patch release

Expand Down
10 changes: 5 additions & 5 deletions api/models/drives.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ def set_info_attributes(self, data):
self.power_on_hours = None
self.temperature = None
for line in data:
if line.startswith('Model Family'):
if line.strip().startswith('Model Family'):
# Example: "Model Family: Seagate BarraCuda 3.5"
self.model_family = line.split(':')[1].strip()
elif line.startswith('Device Model'):
elif line.strip().startswith('Device Model'):
# Example: "Device Model: ST8000DM004-2CX188"
self.device_model = line.split(':')[1].strip()
elif line.startswith('Serial Number'):
elif line.strip().startswith('Serial Number'):
# Example: "Serial Number: ZR106HWB"
self.serial_number = line.split(':')[1].strip()
elif line.startswith('User Capacity'):
elif line.strip().startswith('User Capacity'):
# Example: "User Capacity: 8,001,563,222,016 bytes [8.00 TB]""
size = line.split(':')[1].strip()
self.size_gibs = round(float(int(size.split('bytes')[0].strip().replace(',', '')) / 1024 / 1024 / 1024), 3)
self.capacity = size.split('bytes')[1].strip()[1:-1] # Drop square brackets
elif line.startswith('SMART overall-health self-assessment test result:'):
elif line.strip().startswith('SMART overall-health self-assessment test result:'):
# Example: "SMART overall-health self-assessment test result: PASSED"
self.status = line.split(':')[1].strip()
elif 'Power_On_Hours' in line:
Expand Down
20 changes: 10 additions & 10 deletions web/translations/pt_PT/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ msgstr "Workers"

#: templates/base.html:90 templates/drives.html:30
msgid "Drives"
msgstr ""
msgstr "Discos"

#: templates/base.html:96 templates/connections.html:25
#: templates/connections.html:59 templates/summary.html:25
Expand Down Expand Up @@ -590,41 +590,41 @@ msgstr "Este worker do Machinaris é controlado de:"

#: templates/drives.html:9
msgid "Smartctl Status"
msgstr ""
msgstr "Smartctl - Estado"

#: templates/drives.html:57
#, fuzzy
msgid "Device"
msgstr "Serviço"
msgstr "Disco"

#: templates/drives.html:58
#, fuzzy
msgid "Model"
msgstr "Modo"
msgstr "Modelo"

#: templates/drives.html:59
msgid "Serial #"
msgstr ""
msgstr "Num série"

#: templates/drives.html:60
msgid "Capacity"
msgstr ""
msgstr "Capacidade"

#: templates/drives.html:62
msgid "Temperature"
msgstr ""
msgstr "Temperatura"

#: templates/drives.html:82 templates/drives.html:134
msgid "Passed"
msgstr ""
msgstr "Passou"

#: templates/drives.html:169
msgid "No drives accessible to smartctl inside the Machinaris containers."
msgstr ""
msgstr "Nenhum disco acessivel pelo smartctl dentro do container do Machinaris"

#: templates/drives.html:170
msgid "Please configure Docker to allow smartctl access to host devices."
msgstr ""
msgstr "Por favor configure o Docker para permitir ao smartctl aceder aos discos."

#: templates/drives.html:171 templates/workers.html:106
#, python-format
Expand Down

0 comments on commit 95741d0

Please sign in to comment.