diff --git a/nutcase/app/app/poller/poller.py b/nutcase/app/app/poller/poller.py index b5876ef..764a5ec 100644 --- a/nutcase/app/app/poller/poller.py +++ b/nutcase/app/app/poller/poller.py @@ -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 diff --git a/nutcase/app/app/static/js/chart_battery_charge.js b/nutcase/app/app/static/js/chart_battery_charge.js index 9e0a02e..85ff599 100644 --- a/nutcase/app/app/static/js/chart_battery_charge.js +++ b/nutcase/app/app/static/js/chart_battery_charge.js @@ -13,7 +13,7 @@ const chart_battery_charge_data = { ], datasets: [ { - label: 'Output Power', + label: 'Battery charge', data: [ 0 ], fill: { target: 'origin', @@ -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 }, @@ -74,9 +74,9 @@ const chart_battery_charge_data = { } } }; - + const chart_battery_charge_scales = { - y: { + y: { // position: 'right', title: { display: true, @@ -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); - \ No newline at end of file diff --git a/nutcase/app/config.py b/nutcase/app/config.py index 908f1ed..2d331de 100755 --- a/nutcase/app/config.py +++ b/nutcase/app/config.py @@ -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/" @@ -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