Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed May 30, 2023
2 parents 7f2d573 + 85b0a5d commit 498fc76
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- added tbl_commands to system database
- added command actions to myems-api
- added command feature to myems-admin

### Changed
- updated tranlations of myems-admin
- changed theme of BarChart and MultiTrendChart in myems-web
- swapped cloumns color in dashboard of myems-web
- compacted distribuition system in myems-web

### Fixed
- fixed HTTPError Deprecated Warning in myems-api
- fixed edit user issue in myems-api
- fixed save button issue of energy item dialog in myems-admin
- fixed validator issue of equipment parameter form in myems-admin
- fixed validator issue of combined equipment parameter form in myems-admin

### Removed


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ <h4 class="modal-title">{{operation | translate}}(ID:{{combinedequipmentparamete
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" ng-click="cancel()">{{'SETTING.CANCEL' | translate}}</button>
<!-- <button type="button" ng-disabled="form_combinedequipmentparameter.$invalid" class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button> -->
<button type="button" class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
<button type="button" ng-disabled="(combinedequipmentparameter.parameter_type === 'constant' && (!combinedequipmentparameter.name || !combinedequipmentparameter.constant)) ||
(combinedequipmentparameter.parameter_type === 'point' && (!combinedequipmentparameter.name || !combinedequipmentparameter.point.id)) ||
(combinedequipmentparameter.parameter_type === 'fraction' && (!combinedequipmentparameter.name || !combinedequipmentparameter.numerator_meter.uuid || !combinedequipmentparameter.denominator_meter.uuid)) "
class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
// State
// Query Parameters
const [distributionSystemList, setDistributionSystemList] = useState([]);
const [selectedDistributionSystemName, setSelectedDistributionSystemName] = useState(undefined);
const [selectedDistributionSystemID, setSelectedDistributionSystemID] = useState(undefined);

//Results
Expand Down Expand Up @@ -89,7 +88,6 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
console.log(json);
setDistributionSystemList(json);
setSelectedDistributionSystemID([json[0]].map(o => o.value));
setSelectedDistributionSystemName([json[0]].map(o => o.label));

let images = {};
json.forEach((currentValue, index) => {
Expand All @@ -110,11 +108,6 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {

let onDistributionSystemChange = (event) => {
setSelectedDistributionSystemID(event.target.value);
distributionSystemList.forEach((currentItem, index) => {
if (currentItem['value'] === event.target.value) {
setSelectedDistributionSystemName(currentItem['label']);
}
});
};

return (
Expand All @@ -127,12 +120,9 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
<Card className="bg-light mb-3">
<CardBody className="p-3">
<Form >
<Row form>
<Col xs={6} sm={3}>
<Row form style={{height:"38px"}}>
<Col xs={6} sm={3} style={{height:"37px"}}>
<FormGroup>
<Label className={labelClasses} for="distributionSystemSelect">
{t('Distribution System')}
</Label>
<CustomInput type="select" id="distributionSystemSelect" name="distributionSystemSelect"
value={selectedDistributionSystemID} onChange={onDistributionSystemChange}
>
Expand All @@ -159,7 +149,6 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
<Col lg="4" className="pr-lg-2" key={uuid()}>
<RealtimeChart
distributionSystemID={selectedDistributionSystemID}
distributionSystemName={selectedDistributionSystemName}
/>
</Col>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ class RealtimeChart extends Component {

return (
<Card className="h-100 bg-gradient">
<CardHeader className="bg-transparent">
<h5 className="text-white">{this.props.distributionSystemName}</h5>
<div className="real-time-user display-1 font-weight-normal text-white">{this.state.latestUpdateDatetime}</div>
</CardHeader>
<CardBody className="text-white fs--1">
<ListGroup flush className="mt-4">

Expand Down

0 comments on commit 498fc76

Please sign in to comment.