Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Jan 1, 2024
2 parents 7e848e4 + 749d3a2 commit e0b4567
Show file tree
Hide file tree
Showing 43 changed files with 106 additions and 607 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- updated demo tariffs in database
- updated view models in myems-admin
- resized svg editor in myems-admin
- updated translation of 'Description' in myems-admin
### Fixed
- fixed non-standard actions of microgrid in myems-api and myems-admin
- fixed empty qrcode issue when creating objects in myems-admin
Expand Down
494 changes: 25 additions & 469 deletions myems-admin/app/translations.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th class="text-center">{{'COMBINED_EQUIPMENT.COST_CENTER' | translate}}</th>
<th class="text-center">{{'COMBINED_EQUIPMENT.SVG' | translate}}</th>
<th class="text-center">{{'COMBINED_EQUIPMENT.CAMERA_URL' | translate}}</th>
<th class="text-center">{{'COMBINED_EQUIPMENT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{combinedequipment.id}})</
<textarea ng-model="combinedequipment.camera_url" rows="5" cols="50" name="combinedequipmentcameraurl" class="form-control"></textarea>
</div>
</div>
<div class="form-group"><label class="col-sm-3 control-label">{{'COMBINED_EQUIPMENT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-9"><input ng-model="combinedequipment.description" type="text" name="combinedequipmentdescription" class="form-control" >
<div class="m-t-xs" ng-show="form_combinedequipment.combinedequipmentdescription.$invalid && form_combinedequipment.combinedequipmentdescription.$dirty">
<small class="text-danger" ng-show="form_combinedequipment.combinedequipmentdescription.$error.required">{{'COMBINED_EQUIPMENT.INPUT_DESCRIPTION' | translate}}</small>
<small class="text-danger" ng-show="form_combinedequipment.combinedequipmentdescription.$error.required">{{'SETTING.INPUT_DESCRIPTION' | translate}}</small>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions myems-admin/views/settings/command/command.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{command.id}})</h4>
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-3 control-label">{{'COMMAND.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-9">
<input ng-model="command.description" type="text" name="commanddescription" class="form-control">
<div class="m-t-xs" ng-show="form_command.commanddescription.$invalid && form_command.commanddescription.$dirty">
<small class="text-danger" ng-show="form_command.commanddescription.$error.required">{{'COMMAND.INPUT_DESCRIPTION' | translate}}</small>
<small class="text-danger" ng-show="form_command.commanddescription.$error.required">{{'SETTING.INPUT_DESCRIPTION' | translate}}</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion myems-admin/views/settings/contact/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<th class="text-center">{{'SETTING.NAME' | translate}}</th>
<th class="text-center">{{'CONTACT.EMAIL' | translate}}</th>
<th class="text-center">{{'CONTACT.PHONE' | translate}}</th>
<th class="text-center">{{'CONTACT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
4 changes: 2 additions & 2 deletions myems-admin/views/settings/contact/contact.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{contact.id}})</h4>
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-3 control-label">{{'CONTACT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-9"><input ng-model="contact.description" type="text" name="contactdescription" class="form-control" >
<div class="m-t-xs" ng-show="form_contact.description.$invalid && form_contact.description.$dirty">
<small class="text-danger" ng-show="form_contact.description.$error.required">{{'CONTACT.INPUT_DESCRIPTION' | translate}}</small>
<small class="text-danger" ng-show="form_contact.description.$error.required">{{'SETTING.INPUT_DESCRIPTION' | translate}}</small>
<small class="text-danger" ng-show="form_contact.description.$error">{{'SETTING.INVALID_FORMAT' | translate}}</small>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions myems-admin/views/settings/datasource/datasource.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th class="text-center">{{'DATA_SOURCE.PROTOCOL' | translate}}</th>
<th class="text-center">{{'DATA_SOURCE.CONNECTION' | translate}}</th>
<th class="text-center">{{'DATA_SOURCE.LAST_SEEN_DATETIME' | translate}}</th>
<th class="text-center">{{'DATA_SOURCE.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down Expand Up @@ -82,7 +82,7 @@
<th class="text-center">{{'POINT.IS_TREND' | translate}}</th>
<th class="text-center">{{'POINT.IS_VIRTUAL' | translate}}</th>
<th class="text-center">{{'POINT.ADDRESS' | translate}}</th>
<th class="text-center">{{'POINT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
4 changes: 2 additions & 2 deletions myems-admin/views/settings/datasource/datasource.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{datasource.id}})</h4>
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-2 control-label">{{'DATA_SOURCE.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-2 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-10"><input ng-model="datasource.description" type="text" name="datasourcedescription" class="form-control" >
<div class="m-t-xs" ng-show="form_datasource.datasourcedescription.$invalid && form_datasource.datasourceprotocol.$dirty">
<small class="text-danger" ng-show="form_datasource.datasourcdescription.$error.required">{{'DATA_SOURCE.INPUT_DESCRIPTION' | translate}}</small>
<small class="text-danger" ng-show="form_datasource.datasourcdescription.$error.required">{{'SETTING.INPUT_DESCRIPTION' | translate}}</small>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions myems-admin/views/settings/datasource/point.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{point.id}})</h4>
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-4 control-label">{{'POINT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-8">
<input ng-model="point.description" type="text" name="pointdescription" class="form-control">
<div class="m-t-xs" ng-show="form_point.pointdescription.$invalid && form_point.pointdescription.$dirty">
<small class="text-danger" ng-show="form_point.pointdescription.$error.required">{{'POINT.INPUT_DESCRIPTION' | translate}}</small>
<small class="text-danger" ng-show="form_point.pointdescription.$error.required">{{'SETTING.INPUT_DESCRIPTION' | translate}}</small>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<th class="text-center" data-type="numeric">{{'SETTING.ID' | translate}}</th>
<th class="text-center">{{'SETTING.NAME' | translate}}</th>
<th class="text-center">{{'DISTRIBUTION_SYSTEM.SVG' | translate}}</th>
<th class="text-center">{{'DISTRIBUTION_SYSTEM.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{distributionsystem.id}})<
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-2 control-label">{{'DISTRIBUTION_SYSTEM.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-2 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-10"><input ng-model="distributionsystem.description" type="text" name="distributionsystemdescription" class="form-control" >
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th class="text-center">{{'ENERGY_STORAGE_CONTAINER.CAPACITY' | translate}}(kW)</th>
<th class="text-center">{{'SETTING.CONTACT' | translate}}</th>
<th class="text-center">{{'SETTING.COSTCENTER' | translate}}</th>
<th class="text-center">{{'ENERGY_STORAGE_CONTAINER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,10 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{energystoragecontainer.id
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-2 control-label">{{'ENERGY_STORAGE_CONTAINER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-10">
<input ng-model="energystoragecontainer.description" type="text" name="energystoragecontainerdescription" class="form-control">
<div class="m-t-xs" ng-show="form_energystoragecontainer.energystoragecontainerdescription.$invalid && form_energystoragecontainer.energystoragecontainerdescription.$dirty">
<small class="text-danger" ng-show="form_energystoragecontainer.energystoragecontainerdescription.$error.required">{{'ENERGY_STORAGE_CONTAINER.INPUT_DESCRIPTION' | translate}}</small>
</div>
</div>
<div class="form-group"><label class="col-sm-2 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-10">
<input ng-model="energystoragecontainer.description" type="text" name="energystoragecontainerdescription" class="form-control">
</div>
</div>
<div class="form-group" ng-show="energystoragecontainer.qrcode"><label class="col-sm-2 control-label">{{'COMMON.QR_CODE' | translate}} </label>
<div class="col-sm-10">
Expand Down
2 changes: 1 addition & 1 deletion myems-admin/views/settings/equipment/equipment.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<th class="text-center">{{'EQUIPMENT.COST_CENTER' | translate}}</th>
<th class="text-center">{{'EQUIPMENT.SVG' | translate}}</th>
<th class="text-center">{{'EQUIPMENT.CAMERA_URL' | translate}}</th>
<th class="text-center">{{'EQUIPMENT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
8 changes: 3 additions & 5 deletions myems-admin/views/settings/equipment/equipment.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{equipment.id}})</h4>
<textarea ng-model="equipment.camera_url" rows="5" cols="50" name="equipmentcameraurl" class="form-control"></textarea>
</div>
</div>
<div class="form-group"><label class="col-sm-3 control-label">{{'EQUIPMENT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-9"><input ng-model="equipment.description" type="text" name="equipmentdescription" class="form-control" >
<div class="m-t-xs" ng-show="form_equipment.equipmentdescription.$invalid && form_equipment.equipmentdescription.$dirty">
<small class="text-danger" ng-show="form_equipment.equipmentdescription.$error.required">{{'EQUIPMENT.INPUT_DESCRIPTION' | translate}}</small>
</div>
<div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-9">
<input ng-model="equipment.description" type="text" name="equipmentdescription" class="form-control" >
</div>
</div>
<div class="form-group" ng-show="equipment.qrcode"><label class="col-sm-3 control-label">{{'COMMON.QR_CODE' | translate}} </label>
Expand Down
2 changes: 1 addition & 1 deletion myems-admin/views/settings/gateway/gateway.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<th class="text-center">{{'SETTING.NAME' | translate}}</th>
<th class="text-center">{{'GATEWAY.TOKEN' | translate}}</th>
<th class="text-center">{{'GATEWAY.LAST_SEEN_DATETIME' | translate}}</th>
<th class="text-center">{{'GATEWAY.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
8 changes: 3 additions & 5 deletions myems-admin/views/settings/gateway/gateway.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{gateway.id}})</h4>
</div>
</div>
</div>
<div class="form-group"><label class="col-sm-4 control-label">{{'GATEWAY.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>

<div class="col-sm-8"><input ng-model="gateway.description" type="text" name="gatewaydescription" class="form-control" >
<div class="m-t-xs" ng-show="form_gateway.gatewaydescription.$invalid && form_gateway.gatewayname.$dirty">
<small class="text-danger" ng-show="form_gateway.gatewaydescription.$error.required">{{'GATEWAY.INPUT_DESCRIPTION' | translate}}</small>
</div>
<div class="col-sm-8">
<input ng-model="gateway.description" type="text" name="gatewaydescription" class="form-control" >
</div>
</div>
</form>
Expand Down
8 changes: 4 additions & 4 deletions myems-admin/views/settings/meter/meter.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<th class="text-center">{{'METER.HOURLY_HIGH_LIMIT' | translate}}</th>
<th class="text-center">{{'SETTING.COSTCENTER' | translate}}</th>
<th class="text-center">{{'METER.MASTER_METER' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'METER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>

</tr>
Expand Down Expand Up @@ -179,7 +179,7 @@ <h5>{{'SETTING.POINT_LIST' | translate}}</h5>
<th class="text-center">{{'METER.HOURLY_HIGH_LIMIT' | translate}}</th>
<th class="text-center">{{'SETTING.COSTCENTER' | translate}}</th>
<th class="text-center">{{'METER.MASTER_METER' | translate}}</th>
<th class="text-center">{{'METER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -228,7 +228,7 @@ <h5>{{'SETTING.POINT_LIST' | translate}}</h5>
<th class="text-center">{{'SETTING.ENERGY_ITEM' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.IS_INPUT_COUNTED' | translate}}</th>
<th class="text-center">{{'SETTING.COSTCENTER' | translate}}</th>
<th class="text-center">{{'METER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down Expand Up @@ -278,7 +278,7 @@ <h5>{{'SETTING.POINT_LIST' | translate}}</h5>
<th class="text-center">{{'METER.HOURLY_LOW_LIMIT' | translate}}</th>
<th class="text-center">{{'METER.HOURLY_HIGH_LIMIT' | translate}}</th>
<th class="text-center">{{'SETTING.COSTCENTER' | translate}}</th>
<th class="text-center">{{'METER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</th>
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
</tr>
</thead>
Expand Down
5 changes: 1 addition & 4 deletions myems-admin/views/settings/meter/meter.model.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,9 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{meter.id}})</h4>
</div>
</div>

<div class="form-group"><label class="col-sm-4 control-label">{{'METER.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
<div class="col-sm-8">
<input ng-model="meter.description" type="text" name="meterdescription" class="form-control" >
<div class="m-t-xs" ng-show="form_meter.meterdescription.$invalid && form_meter.meterdescription.$dirty">
<small class="text-danger" ng-show="form_meter.meterdescription.$error.required">{{'METER.INPUT_DESCRIPTION' | translate}}</small>
</div>
</div>
</div>
<div class="form-group" ng-show="meter.qrcode"><label class="col-sm-4 control-label">{{'COMMON.QR_CODE' | translate}} </label>
Expand Down
Loading

0 comments on commit e0b4567

Please sign in to comment.