Skip to content

Commit

Permalink
V0.4.0.1_release
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurMitchell42 committed Aug 11, 2024
1 parent 6245ee4 commit e521f3c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 4 additions & 2 deletions nutcase/app/app/poller/poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ def Check_Status(Previous_Data, Current_Data):
Log_Event_Message(Log_Info)
if "CHRG" in Current_Data['ups.status'] and "CHRG" not in Previous_Data['ups.status']:
Log_Info['title'] = "Charging started"
Log_Info['detail'] = "Device {} on server {} started to charge.".format(
Current_Data['device'], Current_Data['server_address'])
Log_Info['detail'] = "Device {} on server {} started to charge. Battery {}%".format(
Current_Data['device'],
Current_Data['server_address'],
Current_Data['battery.charge'])
Log_Info['server'] = Current_Data['server_address']
Log_Info['device'] = Current_Data['device']
Log_Info['category'] = Log_Category.Battery.name
Expand Down
13 changes: 6 additions & 7 deletions nutcase/app/app/static/js/chart_battery_charge.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const chart_battery_charge_data = {
],
datasets: [
{
label: 'Output Power',
label: 'Battery charge',
data: [ 0 ],
fill: {
target: 'origin',
Expand All @@ -40,7 +40,7 @@ const chart_battery_charge_data = {
text: 'Battery Charge',
// display: false,
display: true,
align: Chart_Title_Align,
align: Chart_Title_Align,
font: { size: Chart_Title_Size },
color: Chart_Battery_Charge_Title_Colour
},
Expand Down Expand Up @@ -74,9 +74,9 @@ const chart_battery_charge_data = {
}
}
};

const chart_battery_charge_scales = {
y: {
y: {
// position: 'right',
title: {
display: true,
Expand Down Expand Up @@ -108,14 +108,13 @@ const chart_battery_charge_data = {
plugins: chart_battery_charge_plugins,
scales: chart_battery_charge_scales,
};

const chart_battery_charge_config = {
type: 'line',
data: chart_battery_charge_data,
options: chart_battery_charge_options,
// plugins: [plugin],
};

const chart_battery_charge_canvas = document.getElementById('chart_battery_charge').getContext('2d');
var chart_battery_charge_obj = new Chart(chart_battery_charge_canvas, chart_battery_charge_config);

4 changes: 2 additions & 2 deletions nutcase/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Config(object):
# region Core info
# ===================================================================================
APP_NAME = 'NUTCase'
APP_VERSION = '0.4.0.0'
APP_VERSION = '0.4.0.1'
UPDATE_HTML = ''
GITHUB_API_URL = "https://api.github.com/repos/ArthurMitchell42/nutcase/"

Expand Down Expand Up @@ -59,7 +59,7 @@ class Config(object):
# ===================================================================================
DOWNLOAD_TIMESTAMP_FORMAT = "%Y-%m-%d_%H-%M-%S"

CONFIG_MOD_TIME = int
CONFIG_MOD_TIME = 0.0
CONFIG_FULLNAME = ''

ORDER_METRICS = True
Expand Down

0 comments on commit e521f3c

Please sign in to comment.