fixed PEP8 warnings and updated version number to v1.3.0

Merge branch 'develop'
pull/85/head
13621160019@163.com 2021-09-24 13:48:43 +08:00
commit 9b82828216
27 changed files with 124 additions and 86 deletions

View File

@ -16,6 +16,44 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Removed
- None.
## [v1.3.0] - 2021-09-04
### Added
- added expiration datetimes to User in Admin UI
- added expiration datetimes to user actions in API
- added expiration datetimes to user table in database
- added column ID to StoreBatch Excel Exporter in API
- added meter ID to meterbatch excel exporter in API
- added new datasource protocols to API
- added API error messages to translations.js and i18n.js
- added spinners to Dashboard of Web UI.
### Changed
- replaced Chinese with English in Excel Exporters of API
- changed start&end datetime formatter for tariff from timestamp to strftime
- changed lease start&end datetime formatter for tenant from timestamp to strftime
- changed last run datetime and next run datetime formatter for rule from timestamp to strftime
- changed last seen datetime formatter for gateway from timestamp to strftime
- changed last seen datetime formatter of datasource from timestamp to strftime
- changed upload datetime formatter of knowledgefile and offlinemeterfile from timestamp to strftime
- changed cost file upload datetime formatter from timestamp to strftime
- updated translation of Admin UI
- updated database README
- updated demo databse for database ingestion service
- updated distibutionssystem point value timeout value to 30 minutes
- updated Admin UI to make error messages more specific
- updated translations of KGCE & KGCO2E in Admin UI
- updated userlogger in API to pass HTTPError to client.
### Fixed
- fixed PEP8 warnings in API
- fixed typo in contact controller of Admin UI
- added try_files directive to avoid 404 error while refreshing pages in Web UI
- modified API error message for knowledge file cannot be removed from disk.
### Removed
- removed cookies usages from API
## [v1.2.3] - 2021-09-04
### Added
- added tbl_reports to myems_reporting_db in database.
@ -423,7 +461,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Removed
- None.
[Unreleased]: https://github.com/MyEMS/MyEMS/compare/v1.2.3...HEAD
[Unreleased]: https://github.com/MyEMS/MyEMS/compare/v1.3.0...HEAD
[v1.3.0]: https://github.com/MyEMS/MyEMS/compare/v1.2.3...v1.3.0
[v1.2.3]: https://github.com/MyEMS/MyEMS/compare/v1.2.2...v1.2.3
[v1.2.2]: https://github.com/MyEMS/MyEMS/compare/v1.2.1...v1.2.2
[v1.2.1]: https://github.com/MyEMS/MyEMS/compare/v1.2.0...v1.2.1

View File

@ -1,5 +1,5 @@
<div class="footer-login">
<div>
<strong>{{'MY_EMS_NAME' | translate}} v1.2.3 <a href="https://myems.io">https://myems.io</a> </strong>
<strong>{{'MY_EMS_NAME' | translate}} v1.3.0 <a href="https://myems.io">https://myems.io</a> </strong>
</div>
</div>

View File

@ -3,6 +3,6 @@
<strong><a href="https://myems.io">https://myems.io</a></strong>
</div>
<div>
<strong>{{'MY_EMS_NAME' | translate}} v1.2.3</strong>
<strong>{{'MY_EMS_NAME' | translate}} v1.3.0</strong>
</div>
</div>

View File

@ -1243,6 +1243,6 @@ USE `myems_system_db`;
INSERT INTO `myems_system_db`.`tbl_versions`
(`id`, `version`, `release_date`)
VALUES
(1, '1.2.4', '2021-09-11');
(1, '1.3.0', '2021-09-24');
COMMIT;

View File

@ -6,4 +6,4 @@ ALTER TABLE `myems_user_db`.`tbl_users` ADD `password_expiration_datetime_utc` D
ALTER TABLE `myems_user_db`.`tbl_users` ADD `account_expiration_datetime_utc` DATETIME NOT NULL DEFAULT '2099-12-31 16:00:00' AFTER privilege_id;
-- UPDATE VERSION NUMBER
UPDATE myems_system_db.tbl_versions SET version='1.2.4', release_date='2021-09-11' WHERE id=1;
UPDATE myems_system_db.tbl_versions SET version='1.3.0', release_date='2021-09-24' WHERE id=1;

View File

@ -262,7 +262,7 @@ curl -i -X DELETE {{base_url}}/costcenters/{id}/tariffs/{tid}
```
### Cost File
* GET an Cost File by ID
* GET a Cost File by ID
```bash
curl -i -X GET {{base_url}}/costfiles/{id}
@ -638,7 +638,7 @@ Result
```bash
curl -i -X GET {{base_url}}/equipments
```
* DELETE an Equipment by ID
* DELETE Equipment by ID
```bash
curl -i -X DELETE {{base_url}}/equipments/{id}
```
@ -654,7 +654,7 @@ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Ch
```bash
curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{}}' {{base_url}}/equipments/{id}
```
* GET All Meters of an Equipment by ID
* GET All Meters of Equipment by ID
```bash
curl -i -X GET {{base_url}}/equipments/{id}/meters
```
@ -666,11 +666,11 @@ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}'
```bash
curl -i -X DELETE {{base_url}}/equipments/{id}/meters/{mid}
```
* GET All Parameters of an Equipment by ID
* GET All Parameters of Equipment by ID
```bash
curl -i -X GET {{base_url}}/equipments/{id}/parameters
```
* GET a Parameter of an Equipment by ID
* GET a Parameter of Equipment by ID
```bash
curl -i -X GET {{base_url}}/equipments/{id}/parameters/{pid}
```
@ -704,7 +704,7 @@ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test pa
```bash
curl -i -X DELETE {{base_url}}/equipments/{id}/parameters/{pid}
```
* GET All Offline Meters of an Equipment by ID
* GET All Offline Meters of Equipment by ID
```bash
curl -i -X GET {{base_url}}/equipments/{id}/offlinemeters
```
@ -716,11 +716,11 @@ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_
```bash
curl -i -X DELETE {{base_url}}/equipments/{id}/offlinemeters/{mid}
```
* GET All Virtual Meters of an Equipment by ID
* GET All Virtual Meters of Equipment by ID
```bash
curl -i -X GET {{base_url}}/equipments/{id}/virtualmeters
```
* POST Bind an Virtual Meter to an Equipment
* POST Bind Virtual Meter to an Equipment
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/equipments/{id}/virtualmeters
```
@ -844,7 +844,7 @@ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/offlinemeters/{mid}
```bash
curl -i -X GET {{base_url}}/combinedequipments/{id}/virtualmeters
```
* POST Bind an Virtual Meter to a Combined Equipment
* POST Bind Virtual Meter to a Combined Equipment
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/combinedequipments/{id}/virtualmeters
```
@ -1321,11 +1321,11 @@ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Sh
```bash
curl -i -X GET {{base_url}}/shopfloors/{id}/equipments
```
* POST Bind an Equipment to a Shopfloor
* POST Bind Equipment to a Shopfloor
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"equipment_id":1}}' {{base_url}}/shopfloors/{id}/equipments
```
* DELETE an Equipment from Shopfloor
* DELETE Equipment from Shopfloor
```bash
curl -i -X DELETE {{base_url}}/shopfloors/{id}/equipments/{eid}
```
@ -1381,11 +1381,11 @@ curl -i -X DELETE {{base_url}}/shopfloors/{id}/sensors/{sid}
```bash
curl -i -X GET {{base_url}}/shopfloors/{id}/virtualmeters
```
* POST Bind an Virtual Meter to a Shopfloor
* POST Bind Virtual Meter to a Shopfloor
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/shopfloors/{id}/virtualmeters
```
* DELETE an Virtual Meter from Shopfloor
* DELETE Virtual Meter from Shopfloor
```bash
curl -i -X DELETE {{base_url}}/shopfloors/{id}/virtualmeters/{mid}
```
@ -1447,11 +1447,11 @@ curl -i -X DELETE {{base_url}}/spaces/{id}/combinedequipments/{eid}
```bash
curl -i -X GET {{base_url}}/spaces/{id}/equipments
```
* POST Bind an Equipment to a Space
* POST Bind Equipment to a Space
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"equipment_id":1}}' {{base_url}}/spaces/{id}/equipments
```
* DELETE an Equipment from Space
* DELETE Equipment from Space
```bash
curl -i -X DELETE {{base_url}}/spaces/{id}/equipments/{eid}
```
@ -1531,11 +1531,11 @@ curl -i -X DELETE {{base_url}}/spaces/{id}/tenants/{tid}
```bash
curl -i -X GET {{base_url}}/spaces/{id}/virtualmeters
```
* POST Bind an Virtual Meter to a Space
* POST Bind Virtual Meter to a Space
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/spaces/{id}/virtualmeters
```
* DELETE an Virtual Meter from Space
* DELETE Virtual Meter from Space
```bash
curl -i -X DELETE {{base_url}}/spaces/{id}/virtualmeters/{mid}
```
@ -1634,11 +1634,11 @@ curl -i -X DELETE {{base_url}}/stores/{id}/sensors/{sid}
```bash
curl -i -X GET {{base_url}}/stores/{id}/virtualmeters
```
* POST Bind an Virtual Meter to a Store
* POST Bind Virtual Meter to a Store
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/stores/{id}/virtualmeters
```
* DELETE an Virtual Meter from Store
* DELETE Virtual Meter from Store
```bash
curl -i -X DELETE {{base_url}}/stores/{id}/virtualmeters/{mid}
```
@ -1831,7 +1831,7 @@ curl -i -X DELETE {{base_url}}/tenants/{id}/sensors/{sid}
```bash
curl -i -X GET {{base_url}}/tenants/{id}/virtualmeters
```
* POST Bind an Virtual Meter to a Tenant
* POST Bind Virtual Meter to a Tenant
```bash
curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/tenants/{id}/virtualmeters
```
@ -1874,7 +1874,7 @@ curl -i -X DELETE {{base_url}}/tenanttypes/{id}
```
### Text Message
* GET an Text Message by ID
* GET Text Message by ID
Result in JSON
@ -1896,7 +1896,7 @@ curl -i -X GET {{base_url}}/textmessages/{id}
```bash
curl -i -X GET {{base_url}}/textmessages/from/{startdate}/to/{enddate}
```
* DELETE an Text Message by ID
* DELETE Text Message by ID
```bash
curl -i -X DELETE {{base_url}}/textmessages/{id}
```
@ -2035,7 +2035,7 @@ curl -i -X DELETE {{base_url}}/webmessages/{id}
```
### Wechat Message
* GET an Wechat Message by ID
* GET Wechat Message by ID
Result in JSON
@ -2053,11 +2053,11 @@ Result in JSON
```bash
curl -i -X GET {{base_url}}/wechatmessages/{id}
```
* GET a Wechat Messages from Startdate to Enddate
* GET Wechat Messages from Startdate to Enddate
```bash
curl -i -X GET {{base_url}}/wechatmessages/from/{startdate}/to/{enddate}
```
* DELETE a Wechat Message by ID
* DELETE Wechat Message by ID
```bash
curl -i -X DELETE {{base_url}}/wechatmessages/{id}
```

View File

@ -237,8 +237,8 @@ def generate_excel(report,
ws['B' + str(current_row_number)].font = title_font
ws['B' + str(current_row_number)] = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
current_row_number += 1
table_start_row_number = current_row_number
@ -271,8 +271,8 @@ def generate_excel(report,
pie = PieChart()
pie.title = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
labels = Reference(ws, min_col=2, min_row=table_start_row_number + 1, max_row=table_end_row_number)
pie_data = Reference(ws, min_col=3, min_row=table_start_row_number, max_row=table_end_row_number)
pie.add_data(pie_data, titles_from_data=True)

View File

@ -377,8 +377,8 @@ def generate_excel(report,
ws[col + row].border = f_border
line = LineChart()
line.title = \
'Reporting Period Income - ' + reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + ")"
line.title = 'Reporting Period Income - ' + reporting_period_data['names'][i] + \
" (" + reporting_period_data['units'][i] + ")"
labels = Reference(ws, min_col=2, min_row=table_row + 1, max_row=max_row)
line_data = Reference(ws, min_col=3 + i, min_row=table_row, max_row=max_row)
line.add_data(line_data, titles_from_data=True)

View File

@ -189,8 +189,8 @@ def generate_excel(report,
ws[col + str(current_row_number)].font = name_font
ws[col + str(current_row_number)].alignment = c_c_alignment
ws[col + str(current_row_number)].border = f_border
ws[col + str(current_row_number)] = \
reporting_period_data['names'][i] + ' ' + '(Baseline - Actual)(' + reporting_period_data['units'][i] + ")"
ws[col + str(current_row_number)] = reporting_period_data['names'][i] + ' ' + \
'(Baseline - Actual)(' + reporting_period_data['units'][i] + ")"
col = chr(ord(col) + 1)

View File

@ -234,9 +234,8 @@ def generate_excel(report,
for category_dict_name, category_dict_values in category_dict.items():
ws['B' + str(current_row_number)].font = title_font
ws['B' + str(current_row_number)] = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
ws['B' + str(current_row_number)] = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
current_row_number += 1
table_start_row_number = current_row_number
@ -268,9 +267,8 @@ def generate_excel(report,
table_end_row_number = current_row_number - 1
pie = PieChart()
pie.title = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
pie.title = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
labels = Reference(ws, min_col=2, min_row=table_start_row_number + 1, max_row=table_end_row_number)
pie_data = Reference(ws, min_col=3, min_row=table_start_row_number, max_row=table_end_row_number)
pie.add_data(pie_data, titles_from_data=True)

View File

@ -375,8 +375,8 @@ def generate_excel(report,
ws[col + row].border = f_border
line = LineChart()
line.title = \
'Reporting Period Income - ' + reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + ")"
line.title = 'Reporting Period Income - ' + reporting_period_data['names'][i] + \
" (" + reporting_period_data['units'][i] + ")"
labels = Reference(ws, min_col=2, min_row=table_row + 1, max_row=max_row)
line_data = Reference(ws, min_col=3 + i, min_row=table_row, max_row=max_row)
line.add_data(line_data, titles_from_data=True)

View File

@ -379,7 +379,8 @@ def generate_excel(report,
####################################################################################################################
for i in range(0, ca_len):
line = LineChart()
line.title = "Reporting Period Consumption" + " - " + names[i] + "(" + reporting_period_data['units'][i] + ")"
line.title = "Reporting Period Consumption" + " - " + names[i] + \
"(" + reporting_period_data['units'][i] + ")"
line.style = 10
line.height = 8.40
line.width = 24

View File

@ -252,9 +252,8 @@ def generate_excel(report,
for category_dict_name, category_dict_values in category_dict.items():
ws['B' + str(current_row_number)].font = title_font
ws['B' + str(current_row_number)] = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
ws['B' + str(current_row_number)] = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
current_row_number += 1
table_start_row_number = current_row_number
@ -286,9 +285,8 @@ def generate_excel(report,
table_end_row_number = current_row_number - 1
pie = PieChart()
pie.title = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
pie.title = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
labels = Reference(ws, min_col=2, min_row=table_start_row_number + 1, max_row=table_end_row_number)
pie_data = Reference(ws, min_col=3, min_row=table_start_row_number, max_row=table_end_row_number)
pie.add_data(pie_data, titles_from_data=True)

View File

@ -258,7 +258,8 @@ def generate_excel(report,
per_unit_area_start_row_number = 9 + ca_len * 2
ws['B' + str(per_unit_area_start_row_number)].font = title_font
ws['B' + str(per_unit_area_start_row_number)] = name + ' ' + 'Per Unit Area' + str(report['shopfloor']['area']) + ''
ws['B' + str(per_unit_area_start_row_number)] = name + ' ' + 'Per Unit Area' + \
str(report['shopfloor']['area']) + ''
category = reporting_period_data['names']

View File

@ -310,7 +310,8 @@ def generate_excel(report,
per_unit_area_start_row_number = 9 + ca_len * 2
ws['B' + str(per_unit_area_start_row_number)].font = title_font
ws['B' + str(per_unit_area_start_row_number)] = name + ' ' + 'Per Unit Area' + str(report['shopfloor']['area']) + ''
ws['B' + str(per_unit_area_start_row_number)] = name + ' ' + 'Per Unit Area' + str(report['shopfloor']['area']) + \
''
category = reporting_period_data['names']
@ -496,7 +497,8 @@ def generate_excel(report,
for i in range(0, ca_len):
line = LineChart()
line.title = "Reporting Period Consumption" + " - " + names[i] + "(" + reporting_period_data['units'][i] + ")"
line.title = "Reporting Period Consumption" + " - " + names[i] + \
"(" + reporting_period_data['units'][i] + ")"
line.style = 10
line.x_axis.majorTickMark = 'in'
line.y_axis.majorTickMark = 'in'

View File

@ -465,8 +465,8 @@ def generate_excel(report,
ws[col + row].border = f_border
line = LineChart()
line.title = \
'Reporting Period Costs - ' + reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + ")"
line.title = 'Reporting Period Costs - ' + reporting_period_data['names'][i] + \
" (" + reporting_period_data['units'][i] + ")"
labels = Reference(ws, min_col=2, min_row=table_row + 1, max_row=max_row)
line_data = Reference(ws, min_col=3 + i, min_row=table_row, max_row=max_row)
line.add_data(line_data, titles_from_data=True)

View File

@ -254,9 +254,8 @@ def generate_excel(report,
for category_dict_name, category_dict_values in category_dict.items():
ws['B' + str(current_row_number)].font = title_font
ws['B' + str(current_row_number)] = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
ws['B' + str(current_row_number)] = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
current_row_number += 1
table_start_row_number = current_row_number
@ -288,9 +287,8 @@ def generate_excel(report,
table_end_row_number = current_row_number - 1
pie = PieChart()
pie.title = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
pie.title = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
labels = Reference(ws, min_col=2, min_row=table_start_row_number + 1, max_row=table_end_row_number)
pie_data = Reference(ws, min_col=3, min_row=table_start_row_number, max_row=table_end_row_number)
pie.add_data(pie_data, titles_from_data=True)

View File

@ -393,8 +393,8 @@ def generate_excel(report,
ws[col + row].border = f_border
line = LineChart()
line.title = \
'Reporting Period Income - ' + reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + ")"
line.title = 'Reporting Period Income - ' + reporting_period_data['names'][i] + \
" (" + reporting_period_data['units'][i] + ")"
labels = Reference(ws, min_col=2, min_row=table_row + 1, max_row=max_row)
line_data = Reference(ws, min_col=3 + i, min_row=table_row, max_row=max_row)
line.add_data(line_data, titles_from_data=True)

View File

@ -461,7 +461,8 @@ def generate_excel(report, name, reporting_start_datetime_local, reporting_end_d
if has_sub_maximums_data_flag:
line = LineChart()
line.title = 'Reporting Period Maximum Load - ' + ws.cell(column=current_chart_col_number, row=table_start_number).value
line.title = 'Reporting Period Maximum Load - ' + ws.cell(column=current_chart_col_number,
row=table_start_number).value
datas = Reference(ws, min_col=current_chart_col_number, min_row=table_start_number,
max_row=table_end_number)
line.add_data(datas, titles_from_data=True)

View File

@ -494,7 +494,8 @@ def generate_excel(report,
for i in range(0, ca_len):
line = LineChart()
line.title = "Reporting Period Consumption" + " - " + names[i] + "(" + reporting_period_data['units'][i] + ")"
line.title = "Reporting Period Consumption" + " - " + names[i] + \
"(" + reporting_period_data['units'][i] + ")"
line.style = 10
line.x_axis.majorTickMark = 'in'
line.y_axis.majorTickMark = 'in'

View File

@ -252,9 +252,8 @@ def generate_excel(report,
for category_dict_name, category_dict_values in category_dict.items():
ws['B' + str(current_row_number)].font = title_font
ws['B' + str(current_row_number)] = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
ws['B' + str(current_row_number)] = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
current_row_number += 1
table_start_row_number = current_row_number
@ -286,9 +285,8 @@ def generate_excel(report,
table_end_row_number = current_row_number - 1
pie = PieChart()
pie.title = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
pie.title = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
labels = Reference(ws, min_col=2, min_row=table_start_row_number + 1, max_row=table_end_row_number)
pie_data = Reference(ws, min_col=3, min_row=table_start_row_number, max_row=table_end_row_number)
pie.add_data(pie_data, titles_from_data=True)

View File

@ -497,7 +497,8 @@ def generate_excel(report,
####################################################################################################################
for i in range(0, ca_len):
line = LineChart()
line.title = "Reporting Period Consumption" + " - " + names[i] + "(" + reporting_period_data['units'][i] + ")"
line.title = "Reporting Period Consumption" + " - " + names[i] + \
"(" + reporting_period_data['units'][i] + ")"
line.style = 10
line.x_axis.majorTickMark = 'in'
line.y_axis.majorTickMark = 'in'

View File

@ -253,9 +253,8 @@ def generate_excel(report,
for category_dict_name, category_dict_values in category_dict.items():
ws['B' + str(current_row_number)].font = title_font
ws['B' + str(current_row_number)] = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
ws['B' + str(current_row_number)] = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
current_row_number += 1
table_start_row_number = current_row_number
@ -287,9 +286,8 @@ def generate_excel(report,
table_end_row_number = current_row_number - 1
pie = PieChart()
pie.title = \
name + ' ' + category_dict_name + ' ' + '(' + reporting_period_data['units'][category_dict_values[0]] + \
') by Energy Item'
pie.title = name + ' ' + category_dict_name + ' ' + \
'(' + reporting_period_data['units'][category_dict_values[0]] + ') by Energy Item'
labels = Reference(ws, min_col=2, min_row=table_start_row_number + 1, max_row=table_end_row_number)
pie_data = Reference(ws, min_col=3, min_row=table_start_row_number, max_row=table_end_row_number)
pie.add_data(pie_data, titles_from_data=True)

View File

@ -462,7 +462,8 @@ def generate_excel(report, name, reporting_start_datetime_local, reporting_end_d
if has_sub_maximums_data_flag:
line = LineChart()
line.title = 'Reporting Period Maximum Load - ' + ws.cell(column=current_chart_col_number, row=table_start_number).value
line.title = 'Reporting Period Maximum Load - ' + ws.cell(column=current_chart_col_number,
row=table_start_number).value
datas = Reference(ws, min_col=current_chart_col_number, min_row=table_start_number,
max_row=table_end_number)
line.add_data(datas, titles_from_data=True)

View File

@ -492,7 +492,8 @@ def generate_excel(report,
for i in range(0, ca_len):
line = LineChart()
line.title = "Reporting Period Consumption" + " - " + names[i] + "(" + reporting_period_data['units'][i] + ")"
line.title = "Reporting Period Consumption" + " - " + names[i] + \
"(" + reporting_period_data['units'][i] + ")"
line.style = 10
line.x_axis.majorTickMark = 'in'
line.y_axis.majorTickMark = 'in'

4
web/package-lock.json generated vendored
View File

@ -1,12 +1,12 @@
{
"name": "myems",
"version": "1.2.3",
"version": "1.3.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "myems",
"version": "1.2.3",
"version": "1.3.0",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"@fortawesome/fontawesome-svg-core": "^1.2.30",

2
web/package.json vendored
View File

@ -1,6 +1,6 @@
{
"name": "myems",
"version": "1.2.3",
"version": "1.3.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",