Merge remote-tracking branch 'origin/develop' into develop
commit
515125a169
641
CHANGELOG.md
641
CHANGELOG.md
|
@ -5,394 +5,477 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- None.
|
||||
- None.
|
||||
|
||||
### Changed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
### Fixed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
## [v1.2.1] - 2021-08-19
|
||||
|
||||
## [v1.3.0] - 2021-09-04
|
||||
### Added
|
||||
- Added Missing Error Messages Words of API to Web UI i18n
|
||||
- Added rule_id to messages tables of fdd database
|
||||
- added version tags to images in Dockerfile
|
||||
- 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
|
||||
- renamed virtualmeter.model.html in Admin UI
|
||||
- replaced stateChangeStart with transitions.onStart in Admin UI
|
||||
- added filters for jstree action types of menu and space in Admin UI
|
||||
- updated README of Web UI
|
||||
- replaced href with ng-href in Admin UI
|
||||
- upgraded Highcharts JS to v9.1.2
|
||||
- upgraded jquery-ui to v1.12.1
|
||||
- updated Admin UI translations for Error Messages of API
|
||||
- upgraded ocLazyLoad to v1.0.10 in Admin UI
|
||||
- updated Dockerfiles to add pip mirrors
|
||||
- upgraded AngularJS to v1.8.2
|
||||
- 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
|
||||
- removed unnecessary jc.jsextend library from Admin UI
|
||||
- fixed debugging code issues in Admin UI
|
||||
- fixed unused code issues in Admin UI
|
||||
- fixed self assignment error in Web UI
|
||||
- fixed 'Clear-text logging of sensitive information' in API
|
||||
- fixed 'The variable binary_file_data does not seem to be defined for all execution paths' in API
|
||||
- replaced == with === to avoid casting in Admin UI
|
||||
- fixed response body of Restore actions
|
||||
- fixed typos in database
|
||||
- fixed typo in API
|
||||
- fixed typo in demo data of database
|
||||
- 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 unused logs
|
||||
- removed diff-match-patch library from Admin UI
|
||||
- removed jeditable library from Admin UI
|
||||
- removed js plugins codemirror and summernote from Admin UI
|
||||
- removed 'unused import' from API
|
||||
- removed uncessary pass from acquisition.py of myems-modbus-tcp
|
||||
- removed unused import from meterbatch.py of API
|
||||
- removed unnecessary library mathjax from Admin UI
|
||||
- removed unnecessary libraries d3, and3, nvd3 and c3 from Admin UI
|
||||
- removed unnecessary library nggrid from Admin UI
|
||||
- removed cookies usages from API
|
||||
|
||||
## [v1.2.0] - 2021-08-08
|
||||
## [v1.2.3] - 2021-09-04
|
||||
### Added
|
||||
- Added demo data to database
|
||||
- added tbl_reports to myems_reporting_db in database.
|
||||
- added trusted-host to Dockerfiles
|
||||
|
||||
### Changed
|
||||
- Replaced every_day_* to periodic_* in excelexporters of API
|
||||
- Updated Dockerfiles
|
||||
- updated README.
|
||||
- renamed language cn to zh-cn in Admin UI
|
||||
|
||||
### Fixed
|
||||
- Replaced every_day_* to periodic_* in excelexporters of API
|
||||
- Fixed data issues of tbl_menus in database
|
||||
- fixed Local Storage conflicts in Admin UI and Web UI .
|
||||
- fixed issues in database demo script
|
||||
|
||||
### Removed
|
||||
- Deleted unnecessary words in translations of Admin UI
|
||||
- None.
|
||||
|
||||
## [v1.1.6] - 2021-08-02
|
||||
## [v1.2.2] - 2021-08-28
|
||||
### Added
|
||||
- Added Meter Batch Analysis Report
|
||||
- Added Child Space Share Pies for SpaceCost in Web UI
|
||||
- Added Web UI & Admin UI Installation Guide on Apache Web Server
|
||||
- Added Dockerfiles
|
||||
- Added Customized Menus in Web UI, API and Admin UI
|
||||
- added user log to UserLogin, ChangePassword and ResetPassword in API
|
||||
- implemented user_logger decorators in API
|
||||
- added default passwords to README.
|
||||
|
||||
### Changed
|
||||
- None.
|
||||
- updated myems_user_db.tbl_logs in database
|
||||
- updated i18n of WebUI
|
||||
- changed user token hash algorithm from sha1 to sha256 in API
|
||||
- upgraded dropzone js library in Admin UI
|
||||
- moved css files for dropzone from js folder to css folder in Admin UI
|
||||
|
||||
### Fixed
|
||||
- Upgraded jquery to v2.2.4 in Admin UI
|
||||
- fixed code style warnings in README
|
||||
- fixed PEP8 warnings in API
|
||||
- fixed code style warnings in API
|
||||
- fixed translation errors in Admin UI
|
||||
- fixed issues of markdown in README files
|
||||
- fixed typeof issue of dropzone js in Admin UI
|
||||
- fixed issue of 'typeof' expression compared to 'null' in Web UI
|
||||
- fixed toaster issues for uploading file in Admin UI
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- removed unnecessary dropzone-amd-module library from Admin UI
|
||||
|
||||
## [v1.1.5] - 2021-07-20
|
||||
## [v1.2.1] - 2021-08-19
|
||||
### Added
|
||||
- None.
|
||||
- Added Missing Error Messages Words of API to Web UI i18n
|
||||
- Added rule_id to messages tables of fdd database
|
||||
- added version tags to images in Dockerfile
|
||||
|
||||
### Changed
|
||||
- changed all worksheet names of Excel exporters in API
|
||||
- renamed virtualmeter.model.html in Admin UI
|
||||
- replaced stateChangeStart with transitions.onStart in Admin UI
|
||||
- added filters for jstree action types of menu and space in Admin UI
|
||||
- updated README of Web UI
|
||||
- replaced href with ng-href in Admin UI
|
||||
- upgraded Highcharts JS to v9.1.2
|
||||
- upgraded jquery-ui to v1.12.1
|
||||
- updated Admin UI translations for Error Messages of API
|
||||
- upgraded ocLazyLoad to v1.0.10 in Admin UI
|
||||
- updated Dockerfiles to add pip mirrors
|
||||
- upgraded AngularJS to v1.8.2
|
||||
|
||||
### Fixed
|
||||
- updated upgrade1.1.4 sql
|
||||
- fixed issue of gitignore in Admin UI
|
||||
- removed unnecessary jc.jsextend library from Admin UI
|
||||
- fixed debugging code issues in Admin UI
|
||||
- fixed unused code issues in Admin UI
|
||||
- fixed self assignment error in Web UI
|
||||
- fixed 'Clear-text logging of sensitive information' in API
|
||||
- fixed 'The variable binary_file_data does not seem to be defined for all execution paths' in API
|
||||
- replaced == with === to avoid casting in Admin UI
|
||||
- fixed response body of Restore actions
|
||||
- fixed typos in database
|
||||
- fixed typo in API
|
||||
- fixed typo in demo data of database
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- removed unused logs
|
||||
- removed diff-match-patch library from Admin UI
|
||||
- removed jeditable library from Admin UI
|
||||
- removed js plugins codemirror and summernote from Admin UI
|
||||
- removed 'unused import' from API
|
||||
- removed uncessary pass from acquisition.py of myems-modbus-tcp
|
||||
- removed unused import from meterbatch.py of API
|
||||
- removed unnecessary library mathjax from Admin UI
|
||||
- removed unnecessary libraries d3, and3, nvd3 and c3 from Admin UI
|
||||
- removed unnecessary library nggrid from Admin UI
|
||||
|
||||
## [v1.1.4] - 2021-07-19
|
||||
## [v1.2.0] - 2021-08-08
|
||||
### Added
|
||||
- added tbl_email_messages to myems_reporting_db
|
||||
- added data sort to FDD messages in Admin UI
|
||||
- added new category to FDD rule in API & Admin UI
|
||||
- added Search Input for meters in Web UI
|
||||
- added last year data to dashboard
|
||||
- added ChildSpaceProportion SharePies to Space Energy Category report of Web UI
|
||||
- added ORDER BY utc_date_time to all digital parameters data in API
|
||||
- added the pagination for meter realtime page
|
||||
- added pagination to MeterRealtime in Web UI
|
||||
- added internationalization of Vertical Navigation Bar in Web UI
|
||||
- added Equipment Batch Analysis report API
|
||||
- added Cost File to API and Admin UI
|
||||
- added restore button to offline meter file in API and Admin UI
|
||||
- Added demo data to database
|
||||
|
||||
### Changed
|
||||
- changed GET Data Source Point Collection to order by ID
|
||||
- changed equipment and combined equipment associated points name to parameters name in reports API
|
||||
- updated validate expression of rule in API
|
||||
- updated i18n in Web UI
|
||||
- upgraded Web UI library to 2.10.2
|
||||
- Replaced every_day_* to periodic_* in excelexporters of API
|
||||
- Updated Dockerfiles
|
||||
|
||||
### Fixed
|
||||
- fixed typo for deleting email messages in Admin UI
|
||||
- fixed issues of deleting text message and wechat message in Admin UI
|
||||
- fixed base period cost units issue of Dashboard API
|
||||
- fixed selected meter issues in onSearchMeter of Web UI
|
||||
- fixed wrong HTTP Status Code issues in API
|
||||
- fixed Child Space Share Pie issue in excel exporter of spaceenergycategory
|
||||
- Replaced every_day_* to periodic_* in excelexporters of API
|
||||
- Fixed data issues of tbl_menus in database
|
||||
|
||||
### Removed
|
||||
- Drop table tbl_sms_recipients from myems_fdd_db
|
||||
- deleted parameters data from Dashboard
|
||||
- Deleted unnecessary words in translations of Admin UI
|
||||
|
||||
## [v1.1.3] - 2021-05-25
|
||||
## [v1.1.6] - 2021-08-02
|
||||
### Added
|
||||
- added Combined Equipment Batch Analysis Report
|
||||
- added Shopfloor Batch Analysis Report
|
||||
- added Store Batch Analysis Report
|
||||
- added Tenant Batch Analysis Report
|
||||
- implemented virtual point calculating in myems-normalization service
|
||||
- added is_virtual to tbl_points in database
|
||||
- added gateway process to myems-modbus-tcp service
|
||||
- added gateway process to myems-bacnet service
|
||||
- added procedure to update last seen datetime of data source in myems-modbus service
|
||||
- added last seen datetime to data source setting in Admin UI
|
||||
- added last seen datetime to Gateway Setting in Admin UI
|
||||
- added excel exporter of spaceefficiency report in API
|
||||
- Added Meter Batch Analysis Report
|
||||
- Added Child Space Share Pies for SpaceCost in Web UI
|
||||
- Added Web UI & Admin UI Installation Guide on Apache Web Server
|
||||
- Added Dockerfiles
|
||||
- Added Customized Menus in Web UI, API and Admin UI
|
||||
|
||||
### Changed
|
||||
- updated Dashboard in web to display energy data of this year
|
||||
- updated tbl_expressions in database
|
||||
- added start value and end value to metertracking report
|
||||
- updated comments and log messages in myems-modbust-tcp service
|
||||
- improved theme of energyflowdiagram in Web UI
|
||||
- None.
|
||||
|
||||
### Fixed
|
||||
- updated metertracking report to reduce duplicated meters
|
||||
- fixed detailed value missing issue in SpaceEfficiency report in Web UI
|
||||
- Upgraded jquery to v2.2.4 in Admin UI
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
## [v1.1.2] - 2021-04-23
|
||||
## [v1.1.5] - 2021-07-20
|
||||
### Added
|
||||
- added associated parameters data to excel exporter of shopfloorstatistics in API
|
||||
- added associated parameters data to excel exporter of shopfloorsaving in API
|
||||
- added associated parameters data to excel exporter of shopfloorload in API
|
||||
- added associated parameters data to excel exporter of shopfloorenergyitem in API
|
||||
- added associated parameters data to excel exporter of shopfloorenergycategory in API
|
||||
- added associated parameters data to excel exporter of shopfloorcost in API
|
||||
- added associated parameters data to excel exporter of storestatistics in API
|
||||
- added associated parameters data to excel exporter of storesaving in API
|
||||
- added associated parameters data to excel exporter of storeload in API
|
||||
- added associated parameters data to storeenergyitem in API
|
||||
- added associated parameters data to excel exporter of storeenergycategory in API
|
||||
- added associated parameters data to excel exporter of storecost in API
|
||||
- added associated parameters data to excel exporter of spacestatistics in API
|
||||
- added associated parameters data to excel exporter of spacesaving in API
|
||||
- added associated parameters data to excel exporter of spaceoutput in API
|
||||
- added associated parameters data to excel exporter of spaceload in API
|
||||
- added associated parameters data to excel exporter of spaceincome in API
|
||||
- added associated parameters data to excel exporter of spaceenergyitem in API
|
||||
- added associated parameters data to excel exporter of spaceenergycategory in API
|
||||
- added associated parameters data to excel export of spacecost in API
|
||||
- added associated parameters data to excel exporter of metertrend in API
|
||||
- added associated parameters data to excel exporter of meterenergy in API
|
||||
- added associated parameters data to excel exporter of metersubmetersbalance in API
|
||||
- added parameters data to excel exporter of metercost in API
|
||||
- added associated parameters data to excel exporter of tenantstatistics in API
|
||||
- added associated parameters data to excel exporter of tenantsaving in API
|
||||
- added associated parameters data to excel exporter of tenantload in API
|
||||
- added associated parameters data to excel exporter of tenantenergyitem in API
|
||||
- added associated parameters data to excel exporter of tenantenergycategory in API
|
||||
- added associated parameters data to excel exporter of tenantcost in API
|
||||
- added associated parameters data to excel exporter of combinedequipmentstatistics in API
|
||||
- added associated parameters data to combinedequipmentsaving in API
|
||||
- added associated parameters data to combinedequipmentload in API
|
||||
- added associated parameters data to combinedequipmentoutput in API
|
||||
- added associated parameters data to combinedequipmentincome in API
|
||||
- added associated parameters data to combinedequipmentenergyitem in API
|
||||
- added associated parameters data to combinedequipmentenergycategory in API
|
||||
- added associated parameters data to combinedequipmentcost in API
|
||||
- added quickmode to HTTP request parameters of MeterTrend report in API
|
||||
- added parameter data to excel exporter of EquipmentStatistics in API
|
||||
- added parameter data to excel exporter of EquipmentSaving in API
|
||||
- added parameter data to excel exporter of EquipmentOutput in API
|
||||
- added parameter data to excel exporter of EquipmentLoad in API
|
||||
- added parameters data to excel exporter of EquipmentEnergyItem in API
|
||||
- added parameters data to excel exporter of EquipmentEnergyCategory in API
|
||||
- None.
|
||||
|
||||
### Changed
|
||||
- updated README
|
||||
- updated excel exporter of metersubmetersbalance in API
|
||||
- updated excel exporter of meterenergy in API
|
||||
- updated excel exporter of metercost in API
|
||||
- updated panel width and height of costcenter in Admin UI
|
||||
- updated panel width and height of combinedequipment view in Admin UI
|
||||
- updated panel width and height of equipment view in Admin UI
|
||||
- changed query form column width from auto to xs={6} sm={3} in Web UI
|
||||
- changed all worksheet names of Excel exporters in API
|
||||
|
||||
### Fixed
|
||||
- fixed issues in excel exporters of combinedequipment in API
|
||||
- added parameters validator to statistics_hourly_data_by_period in API
|
||||
- added code to validate parameters of averaging_hourly_data_by_period in API
|
||||
- fixed issue in excel exporter of equipmentincome in API
|
||||
- fixed unit issue in CombinedEquipmentCost report in API
|
||||
|
||||
- updated upgrade1.1.4 sql
|
||||
- fixed issue of gitignore in Admin UI
|
||||
|
||||
### Removed
|
||||
- deleted slim-scroll from and added maxheight to panel of views in Admin UI
|
||||
- None.
|
||||
|
||||
|
||||
## [v1.1.1] - 2021-03-31
|
||||
## [v1.1.4] - 2021-07-19
|
||||
### Added
|
||||
- added associated equipment data to CombinedEquipmentCost report in API
|
||||
- added associated equipment data to CombinedEquipmentStatistics report in API
|
||||
- added associated equipment data to CombinedEquipmentSaving report in API
|
||||
- added associated equipment data to CombinedEquipmentOutput report in API
|
||||
- added associated equipment data to CombinedEquipmentLoad report in API
|
||||
- added associated equipment data to CombinedEquipmentIncome report in API
|
||||
- added associated equipment data to CombinedEquipmentEnergyItem report in API
|
||||
- added associated equipment data to CombinedEquipmentEnergyCategory report in API
|
||||
- added quickmode parameter to combinedequipmentefficiency report in API
|
||||
- added associated equipment data to CombinedEquipmentStatistics in Web UI
|
||||
- added associated equipment data to CombinedEquipmentLoad in Web UI
|
||||
- added excel exporter of equipmentcost reporter in API
|
||||
- added associated equipment data to CombinedEquipmentEnergyItem report in API
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentIncome Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentSaving Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentOutput Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentIncome Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentCost Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentEnergyCategory Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentEnergyItem Report in web UI
|
||||
- added last_run_datetime and next_run_datetime to rule in API
|
||||
- added Deutsch (German) login language list in admin UI
|
||||
- added tbl_email_messages to myems_reporting_db
|
||||
- added data sort to FDD messages in Admin UI
|
||||
- added new category to FDD rule in API & Admin UI
|
||||
- added Search Input for meters in Web UI
|
||||
- added last year data to dashboard
|
||||
- added ChildSpaceProportion SharePies to Space Energy Category report of Web UI
|
||||
- added ORDER BY utc_date_time to all digital parameters data in API
|
||||
- added the pagination for meter realtime page
|
||||
- added pagination to MeterRealtime in Web UI
|
||||
- added internationalization of Vertical Navigation Bar in Web UI
|
||||
- added Equipment Batch Analysis report API
|
||||
- added Cost File to API and Admin UI
|
||||
- added restore button to offline meter file in API and Admin UI
|
||||
|
||||
### Changed
|
||||
- reduced font size of meterrealtime in Web UI
|
||||
- moved category before fdd_code of rule in admin UI and API
|
||||
- changed GET Data Source Point Collection to order by ID
|
||||
- changed equipment and combined equipment associated points name to parameters name in reports API
|
||||
- updated validate expression of rule in API
|
||||
- updated i18n in Web UI
|
||||
- upgraded Web UI library to 2.10.2
|
||||
|
||||
### Fixed
|
||||
- fixed omission mistakes in myems-cleaning
|
||||
- fixed error for large number of parameters in combinedequipmentefficiency and equipmentefficiency in API
|
||||
- fixed error of None Comparison in API
|
||||
- fixed NoneType error in all Load reports API.
|
||||
- fixed typo for deleting email messages in Admin UI
|
||||
- fixed issues of deleting text message and wechat message in Admin UI
|
||||
- fixed base period cost units issue of Dashboard API
|
||||
- fixed selected meter issues in onSearchMeter of Web UI
|
||||
- fixed wrong HTTP Status Code issues in API
|
||||
- fixed Child Space Share Pie issue in excel exporter of spaceenergycategory
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- Drop table tbl_sms_recipients from myems_fdd_db
|
||||
- deleted parameters data from Dashboard
|
||||
|
||||
|
||||
## [v1.1.0] - 2021-03-18
|
||||
## [v1.1.3] - 2021-05-25
|
||||
### Added
|
||||
- added excel exporter of equipmentefficiency report.
|
||||
- added excel exporter of conbinedequipmentefficiency report in API.
|
||||
- added 'optional' tips to meter,virtual meter and offline meter setting in admin UI.
|
||||
- added Optional key to translation in admin UI.
|
||||
- added cominbedequipmentefficiency report to api and web.
|
||||
- added equipmentefficiency report api.
|
||||
- added Combined Equipment Batch Analysis Report
|
||||
- added Shopfloor Batch Analysis Report
|
||||
- added Store Batch Analysis Report
|
||||
- added Tenant Batch Analysis Report
|
||||
- implemented virtual point calculating in myems-normalization service
|
||||
- added is_virtual to tbl_points in database
|
||||
- added gateway process to myems-modbus-tcp service
|
||||
- added gateway process to myems-bacnet service
|
||||
- added procedure to update last seen datetime of data source in myems-modbus service
|
||||
- added last seen datetime to data source setting in Admin UI
|
||||
- added last seen datetime to Gateway Setting in Admin UI
|
||||
- added excel exporter of spaceefficiency report in API
|
||||
|
||||
### Changed
|
||||
- updated cost file controller in admin UI
|
||||
- updated user login session expire time to 8 hours.
|
||||
- changed web UI and API to set contact of space is optional.
|
||||
- updated Dashboard in web to display energy data of this year
|
||||
- updated tbl_expressions in database
|
||||
- added start value and end value to metertracking report
|
||||
- updated comments and log messages in myems-modbust-tcp service
|
||||
- improved theme of energyflowdiagram in Web UI
|
||||
|
||||
### Fixed
|
||||
- fixed http headers issues of offlinemeterfile, knowledgefile and costfile in admin UI
|
||||
- changed float datatype to Decimal datatype for offline meter normalization.
|
||||
- fixed issue of add space in web UI.
|
||||
- added historical database close and disconnect at the end of reports.
|
||||
- updated metertracking report to reduce duplicated meters
|
||||
- fixed detailed value missing issue in SpaceEfficiency report in Web UI
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
## [v1.0.8] - 2021-03-11
|
||||
## [v1.1.2] - 2021-04-23
|
||||
### Added
|
||||
- added excel exporter of combinedequipmentstatistics report
|
||||
- added translation for German
|
||||
- added excel exporter of storesaving report
|
||||
- added excel exporter of equipmentincome report
|
||||
- added excel exporter of shopfloorsaving report
|
||||
- added excel exporter of equipmentload report
|
||||
- added associated parameters data to excel exporter of shopfloorstatistics in API
|
||||
- added associated parameters data to excel exporter of shopfloorsaving in API
|
||||
- added associated parameters data to excel exporter of shopfloorload in API
|
||||
- added associated parameters data to excel exporter of shopfloorenergyitem in API
|
||||
- added associated parameters data to excel exporter of shopfloorenergycategory in API
|
||||
- added associated parameters data to excel exporter of shopfloorcost in API
|
||||
- added associated parameters data to excel exporter of storestatistics in API
|
||||
- added associated parameters data to excel exporter of storesaving in API
|
||||
- added associated parameters data to excel exporter of storeload in API
|
||||
- added associated parameters data to storeenergyitem in API
|
||||
- added associated parameters data to excel exporter of storeenergycategory in API
|
||||
- added associated parameters data to excel exporter of storecost in API
|
||||
- added associated parameters data to excel exporter of spacestatistics in API
|
||||
- added associated parameters data to excel exporter of spacesaving in API
|
||||
- added associated parameters data to excel exporter of spaceoutput in API
|
||||
- added associated parameters data to excel exporter of spaceload in API
|
||||
- added associated parameters data to excel exporter of spaceincome in API
|
||||
- added associated parameters data to excel exporter of spaceenergyitem in API
|
||||
- added associated parameters data to excel exporter of spaceenergycategory in API
|
||||
- added associated parameters data to excel export of spacecost in API
|
||||
- added associated parameters data to excel exporter of metertrend in API
|
||||
- added associated parameters data to excel exporter of meterenergy in API
|
||||
- added associated parameters data to excel exporter of metersubmetersbalance in API
|
||||
- added parameters data to excel exporter of metercost in API
|
||||
- added associated parameters data to excel exporter of tenantstatistics in API
|
||||
- added associated parameters data to excel exporter of tenantsaving in API
|
||||
- added associated parameters data to excel exporter of tenantload in API
|
||||
- added associated parameters data to excel exporter of tenantenergyitem in API
|
||||
- added associated parameters data to excel exporter of tenantenergycategory in API
|
||||
- added associated parameters data to excel exporter of tenantcost in API
|
||||
- added associated parameters data to excel exporter of combinedequipmentstatistics in API
|
||||
- added associated parameters data to combinedequipmentsaving in API
|
||||
- added associated parameters data to combinedequipmentload in API
|
||||
- added associated parameters data to combinedequipmentoutput in API
|
||||
- added associated parameters data to combinedequipmentincome in API
|
||||
- added associated parameters data to combinedequipmentenergyitem in API
|
||||
- added associated parameters data to combinedequipmentenergycategory in API
|
||||
- added associated parameters data to combinedequipmentcost in API
|
||||
- added quickmode to HTTP request parameters of MeterTrend report in API
|
||||
- added parameter data to excel exporter of EquipmentStatistics in API
|
||||
- added parameter data to excel exporter of EquipmentSaving in API
|
||||
- added parameter data to excel exporter of EquipmentOutput in API
|
||||
- added parameter data to excel exporter of EquipmentLoad in API
|
||||
- added parameters data to excel exporter of EquipmentEnergyItem in API
|
||||
- added parameters data to excel exporter of EquipmentEnergyCategory in API
|
||||
|
||||
### Changed
|
||||
- Changed default reporting range in EnergyFlowDiagram.
|
||||
- updated README
|
||||
- updated excel exporter of metersubmetersbalance in API
|
||||
- updated excel exporter of meterenergy in API
|
||||
- updated excel exporter of metercost in API
|
||||
- updated panel width and height of costcenter in Admin UI
|
||||
- updated panel width and height of combinedequipment view in Admin UI
|
||||
- updated panel width and height of equipment view in Admin UI
|
||||
- changed query form column width from auto to xs={6} sm={3} in Web UI
|
||||
|
||||
### Fixed
|
||||
- None.
|
||||
- fixed issues in excel exporters of combinedequipment in API
|
||||
- added parameters validator to statistics_hourly_data_by_period in API
|
||||
- added code to validate parameters of averaging_hourly_data_by_period in API
|
||||
- fixed issue in excel exporter of equipmentincome in API
|
||||
- fixed unit issue in CombinedEquipmentCost report in API
|
||||
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- deleted slim-scroll from and added maxheight to panel of views in Admin UI
|
||||
|
||||
## [v1.0.7] - 2021-03-07
|
||||
|
||||
## [v1.1.1] - 2021-03-31
|
||||
### Added
|
||||
- added excel exporter of storeload report
|
||||
- added excel exporter of spaceincome report
|
||||
- added excel exporter of equipmentsaving report
|
||||
- added excel exporter of combinedequipmentsaving report
|
||||
- added excel exporter of combinedequipmentload report
|
||||
- added excel exporter of spaceoutput report
|
||||
- added excel exporter of combinedequipmentoutput
|
||||
- added excel exporter of combinedequipmentcost report
|
||||
- added excel exporter of shopfloorcost report
|
||||
- added excel exporter of shopfloorload report
|
||||
- added excel exporter of combinedequipmentenergycategory report
|
||||
- added excel exporter of combinedequipmentitem report.
|
||||
- added excel exporter of equipmentenergyitem report.
|
||||
- added excel exporter of equipmentenergycategory report.
|
||||
- added excel exporter of shopfloorenergyitem report.
|
||||
- added associated equipment data to CombinedEquipmentCost report in API
|
||||
- added associated equipment data to CombinedEquipmentStatistics report in API
|
||||
- added associated equipment data to CombinedEquipmentSaving report in API
|
||||
- added associated equipment data to CombinedEquipmentOutput report in API
|
||||
- added associated equipment data to CombinedEquipmentLoad report in API
|
||||
- added associated equipment data to CombinedEquipmentIncome report in API
|
||||
- added associated equipment data to CombinedEquipmentEnergyItem report in API
|
||||
- added associated equipment data to CombinedEquipmentEnergyCategory report in API
|
||||
- added quickmode parameter to combinedequipmentefficiency report in API
|
||||
- added associated equipment data to CombinedEquipmentStatistics in Web UI
|
||||
- added associated equipment data to CombinedEquipmentLoad in Web UI
|
||||
- added excel exporter of equipmentcost reporter in API
|
||||
- added associated equipment data to CombinedEquipmentEnergyItem report in API
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentIncome Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentSaving Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentOutput Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentIncome Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentCost Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentEnergyCategory Report in web UI
|
||||
- added AssociatedEquipmentTable to CombinedEquipmentEnergyItem Report in web UI
|
||||
- added last_run_datetime and next_run_datetime to rule in API
|
||||
- added Deutsch (German) login language list in admin UI
|
||||
|
||||
### Changed
|
||||
- None.
|
||||
- reduced font size of meterrealtime in Web UI
|
||||
- moved category before fdd_code of rule in admin UI and API
|
||||
|
||||
### Fixed
|
||||
- fixed wrong HTTP headers in admin.
|
||||
- fixed typo in combinedequipment controller in admin.
|
||||
- fixed energy item undefined issue when edit virtual meter and offline meter.
|
||||
- fixed omission mistakes in myems-cleaning
|
||||
- fixed error for large number of parameters in combinedequipmentefficiency and equipmentefficiency in API
|
||||
- fixed error of None Comparison in API
|
||||
- fixed NoneType error in all Load reports API.
|
||||
|
||||
### Removed
|
||||
- removed 'required' property from equipment model in admin.
|
||||
- None.
|
||||
|
||||
## [v1.0.6] - 2021-02-26
|
||||
|
||||
## [v1.1.0] - 2021-03-18
|
||||
### Added
|
||||
- added store statistics report excel exporter.
|
||||
- added equipment tracking excel exporter.
|
||||
- added store cost report excel exporter.
|
||||
- added equipment statistics report excel exporter.
|
||||
- added store energy item report excel exporter.
|
||||
- added shopfloor statistics report excel exporter.
|
||||
- merged myems-api.
|
||||
- added excel exporter of equipmentefficiency report.
|
||||
- added excel exporter of conbinedequipmentefficiency report in API.
|
||||
- added 'optional' tips to meter,virtual meter and offline meter setting in admin UI.
|
||||
- added Optional key to translation in admin UI.
|
||||
- added cominbedequipmentefficiency report to api and web.
|
||||
- added equipmentefficiency report api.
|
||||
|
||||
### Changed
|
||||
- modified database table tbl_energy_flow_diagrams_links
|
||||
- updated cost file controller in admin UI
|
||||
- updated user login session expire time to 8 hours.
|
||||
- changed web UI and API to set contact of space is optional.
|
||||
|
||||
### Fixed
|
||||
- fixed energy category names and units issue in EnergyItem reports.
|
||||
- fixed http headers issues of offlinemeterfile, knowledgefile and costfile in admin UI
|
||||
- changed float datatype to Decimal datatype for offline meter normalization.
|
||||
- fixed issue of add space in web UI.
|
||||
- added historical database close and disconnect at the end of reports.
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
## [v1.0.5] - 2021-02-23
|
||||
## [v1.0.8] - 2021-03-11
|
||||
### Added
|
||||
- None.
|
||||
- added excel exporter of combinedequipmentstatistics report
|
||||
- added translation for German
|
||||
- added excel exporter of storesaving report
|
||||
- added excel exporter of equipmentincome report
|
||||
- added excel exporter of shopfloorsaving report
|
||||
- added excel exporter of equipmentload report
|
||||
|
||||
### Changed
|
||||
- None.
|
||||
- Changed default reporting range in EnergyFlowDiagram.
|
||||
|
||||
### Fixed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
- None.
|
||||
|
||||
[Unreleased]: https://github.com/MyEMS/myems/compare/v1.2.1...HEAD
|
||||
[v1.2.1]: https://github.com/MyEMS/myems/compare/v1.2.0...v1.2.1
|
||||
[v1.2.0]: https://github.com/MyEMS/myems/compare/v1.1.6...v1.2.0
|
||||
[v1.1.6]: https://github.com/MyEMS/myems/compare/v1.1.5...v1.1.6
|
||||
[v1.1.5]: https://github.com/MyEMS/myems/compare/v1.1.4...v1.1.5
|
||||
[v1.1.4]: https://github.com/MyEMS/myems/compare/v1.1.3...v1.1.4
|
||||
[v1.1.3]: https://github.com/MyEMS/myems/compare/v1.1.2...v1.1.3
|
||||
[v1.1.2]: https://github.com/MyEMS/myems/compare/v1.1.1...v1.1.2
|
||||
[v1.1.1]: https://github.com/MyEMS/myems/compare/v1.1.0...v1.1.1
|
||||
[v1.0.8]: https://github.com/MyEMS/myems/compare/v1.0.8...v1.1.0
|
||||
[v1.0.8]: https://github.com/MyEMS/myems/compare/v1.0.7...v1.0.8
|
||||
[v1.0.7]: https://github.com/MyEMS/myems/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/MyEMS/myems/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/MyEMS/myems/releases/tag/v1.0.5
|
||||
## [v1.0.7] - 2021-03-07
|
||||
### Added
|
||||
- added excel exporter of storeload report
|
||||
- added excel exporter of spaceincome report
|
||||
- added excel exporter of equipmentsaving report
|
||||
- added excel exporter of combinedequipmentsaving report
|
||||
- added excel exporter of combinedequipmentload report
|
||||
- added excel exporter of spaceoutput report
|
||||
- added excel exporter of combinedequipmentoutput
|
||||
- added excel exporter of combinedequipmentcost report
|
||||
- added excel exporter of shopfloorcost report
|
||||
- added excel exporter of shopfloorload report
|
||||
- added excel exporter of combinedequipmentenergycategory report
|
||||
- added excel exporter of combinedequipmentitem report.
|
||||
- added excel exporter of equipmentenergyitem report.
|
||||
- added excel exporter of equipmentenergycategory report.
|
||||
- added excel exporter of shopfloorenergyitem report.
|
||||
|
||||
### Changed
|
||||
- None.
|
||||
|
||||
### Fixed
|
||||
- fixed wrong HTTP headers in admin.
|
||||
- fixed typo in combinedequipment controller in admin.
|
||||
- fixed energy item undefined issue when edit virtual meter and offline meter.
|
||||
|
||||
### Removed
|
||||
- removed 'required' property from equipment model in admin.
|
||||
|
||||
## [v1.0.6] - 2021-02-26
|
||||
### Added
|
||||
- added store statistics report excel exporter.
|
||||
- added equipment tracking excel exporter.
|
||||
- added store cost report excel exporter.
|
||||
- added equipment statistics report excel exporter.
|
||||
- added store energy item report excel exporter.
|
||||
- added shopfloor statistics report excel exporter.
|
||||
- merged myems-api.
|
||||
|
||||
### Changed
|
||||
- modified database table tbl_energy_flow_diagrams_links
|
||||
|
||||
### Fixed
|
||||
- fixed energy category names and units issue in EnergyItem reports.
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
|
||||
## [v1.0.5] - 2021-02-23
|
||||
### Added
|
||||
- None.
|
||||
|
||||
### Changed
|
||||
- None.
|
||||
|
||||
### Fixed
|
||||
- None.
|
||||
|
||||
### Removed
|
||||
- None.
|
||||
|
||||
[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
|
||||
[v1.2.0]: https://github.com/MyEMS/MyEMS/compare/v1.1.6...v1.2.0
|
||||
[v1.1.6]: https://github.com/MyEMS/MyEMS/compare/v1.1.5...v1.1.6
|
||||
[v1.1.5]: https://github.com/MyEMS/MyEMS/compare/v1.1.4...v1.1.5
|
||||
[v1.1.4]: https://github.com/MyEMS/MyEMS/compare/v1.1.3...v1.1.4
|
||||
[v1.1.3]: https://github.com/MyEMS/MyEMS/compare/v1.1.2...v1.1.3
|
||||
[v1.1.2]: https://github.com/MyEMS/MyEMS/compare/v1.1.1...v1.1.2
|
||||
[v1.1.1]: https://github.com/MyEMS/MyEMS/compare/v1.1.0...v1.1.1
|
||||
[v1.0.8]: https://github.com/MyEMS/MyEMS/compare/v1.0.8...v1.1.0
|
||||
[v1.0.8]: https://github.com/MyEMS/MyEMS/compare/v1.0.7...v1.0.8
|
||||
[v1.0.7]: https://github.com/MyEMS/MyEMS/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/MyEMS/MyEMS/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/MyEMS/MyEMS/releases/tag/v1.0.5
|
||||
|
||||
|
|
178
README.md
178
README.md
|
@ -14,7 +14,9 @@
|
|||
|
||||
## MyEMS 介绍
|
||||
|
||||
MyEMS是行业领先的开源能源管理系统,利用云计算、物联网、大数据、人工智能等信息化技术构建而成。MyEMS可用于构建统一规范、功能强大的综合能源管理服务平台。MyEMS由资深专业团队开发维护,系统代码基于MIT开源软件许可协议发布。用开源助力实现碳达峰碳中和。
|
||||
MyEMS是行业领先的开源能源管理系统。
|
||||
MyEMS可用于能源管理项目的设备管理、数据采集、处理、分析、可视化和报表。
|
||||
MyEMS由资深专业团队开发维护,系统代码基于MIT开源软件许可协议发布。用开源助力实现碳达峰碳中和。
|
||||
|
||||
## MyEMS架构
|
||||
|
||||
|
@ -23,6 +25,16 @@ MyEMS是行业领先的开源能源管理系统,利用云计算、物联网、
|
|||

|
||||
|
||||
|
||||
## MyEMS镜像
|
||||
|
||||
[1]. [Gitee](https://gitee.com/myems/myems) https://gitee.com/myems/myems
|
||||
|
||||
[2]. [Github](https://github.com/myems/myems) https://github.com/myems/myems
|
||||
|
||||
[3]. [Bitbucket](https://bitbucket.org/myems/myems) https://bitbucket.org/myems/myems
|
||||
|
||||
[4]. [Gitlab](https://gitlab.com/myems/myems) https://gitlab.com/myems/myems
|
||||
|
||||
## MyEMS组件(社区版)
|
||||
|
||||
MyEMS项目由下列组件构成:
|
||||
|
@ -66,49 +78,158 @@ MyEMS Web UI: 80
|
|||
|
||||
MyEMS Admin UI: 8001
|
||||
|
||||
### Docker Docker-compose 安装
|
||||
### 默认密码
|
||||
<details>
|
||||
<summary>Admin UI</summary>
|
||||
|
||||
```
|
||||
administrator
|
||||
|
||||
!MyEMS1
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Web UI</summary>
|
||||
|
||||
```
|
||||
administrator@myems.io
|
||||
|
||||
!MyEMS1
|
||||
```
|
||||
</details>
|
||||
|
||||
### Docker-compose 安装
|
||||
|
||||
#### 前提
|
||||
|
||||
- 主机已安装docker、docker-compose、npm
|
||||
- MySQL数据库已安装,拥有一个账号为root,密码为!MyEMS1的用户
|
||||
- MySQL数据库可正常登陆,可被安装Docker的主机Ping通以及远程访问
|
||||
|
||||
#### 配置
|
||||
|
||||
注一:这里的主机指的是**安装Docker的主机**, 这里的IP和账号密码都为假定的,用来展示说明,实际情况中用户需要根据自己的配置改为自己的,具体的修改步骤会在“安装”中讲述。
|
||||
|
||||
注二:这里如果**安装数据库和安装Docker的主机为同一个主机,那么数据库IP和主机IP修改为一个实际IP**即可,这里是以数据库,和安装Docker的主机不在同一个上举例的。
|
||||
|
||||
| -- | -- |
|
||||
| ---------- | ----------- |
|
||||
| 主机IP | 192.168.0.1 |
|
||||
| 数据库IP | 192.168.0.2 |
|
||||
| 数据库账号 | root |
|
||||
| 数据库密码 | !MyEMS1 |
|
||||
|
||||
|
||||
|
||||
#### 安装
|
||||
|
||||
- 1.克隆仓库
|
||||
```
|
||||
git clone https://gitee.com/myems/myems.git
|
||||
```
|
||||
|
||||
修改以下文件中的数据库IP
|
||||
假定数据库IP为: 192.168.2.2
|
||||
```
|
||||
sudo nano myems-api/config.py
|
||||
sudo nano myems-aggregation/config.py
|
||||
sudo nano myems-cleaning/config.py
|
||||
sudo nano myems-modbus-tcp/config.py
|
||||
sudo nano myems-normalization/config.py
|
||||
- 2.数据库导入 (否则数据库没有用户信息,网页无法验证登录)
|
||||
|
||||
# host: '127.0.0.1' => 'host': '192.168.2.2'
|
||||
```
|
||||
cd myems/database/install
|
||||
mysql -u root -p < myems_billing_baseline_db.sql
|
||||
mysql -u root -p < myems_billing_db.sql
|
||||
mysql -u root -p < myems_energy_baseline_db.sql
|
||||
mysql -u root -p < myems_energy_db.sql
|
||||
mysql -u root -p < myems_fdd_db.sql
|
||||
mysql -u root -p < myems_historical_db.sql
|
||||
mysql -u root -p < myems_reporting_db.sql
|
||||
mysql -u root -p < myems_system_db.sql
|
||||
mysql -u root -p < myems_user_db.sql
|
||||
```
|
||||
注: 如有问题,详情可查看"database/README.md"
|
||||
|
||||
|
||||
- 3.修改配置
|
||||
|
||||
注:如“配置”所述,这里假定的**主机IP为 192.168.0.1,数据库IP为 192.168.0.2,数据库账号为:root,数据库密码:!MyEMS1,用户应该修改为自己对应的主机IP,数据库IP,数据库账号,数据库密码**
|
||||
|
||||
**3.1** 修改nginx.conf里的API配置
|
||||
```
|
||||
cd myems
|
||||
sed -i 's/127.0.0.1:8000/192.168.0.1:8000/g' admin/nginx.conf
|
||||
sed -i 's/127.0.0.1:8000/192.168.0.1:8000/g' web/nginx.conf
|
||||
```
|
||||
|
||||
修改web和admin文件夹下nginx.conf中的location '/api'
|
||||
假定本机IP为: 192.168.2.3
|
||||
**3.2** 修改config.py里的数据库IP,账号,密码
|
||||
```
|
||||
sudo nano admin/nginx.conf
|
||||
sudo nano web/nginx.conf
|
||||
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/;
|
||||
# 这里以修改数据库IP为例,如果数据库账号密码也不同,请根据自己需求替换config.py里的账号密码
|
||||
cd myems
|
||||
sed -i 's/127.0.0.1/192.168.0.2/g' myems-api/config.py
|
||||
sed -i 's/127.0.0.1/192.168.0.2/g' myems-aggregation/config.py
|
||||
sed -i 's/127.0.0.1/192.168.0.2/g' myems-cleaning/config.py
|
||||
sed -i 's/127.0.0.1/192.168.0.2/g' myems-modbus-tcp/config.py
|
||||
sed -i 's/127.0.0.1/192.168.0.2/g' myems-normalization/config.py
|
||||
```
|
||||
|
||||
将Web打包生成产品文件
|
||||
**3.3** 测试数据库是否可以正确连接
|
||||
```
|
||||
python3 myems/database/test_mysql.py
|
||||
```
|
||||
注:如果测试通过,继续下一步操作,否则请修改config.py配置,确保数据库可以通过Python3正常连接访问。
|
||||
|
||||
|
||||
|
||||
|
||||
- 4.web打包 (myems/web为React项目,需要打包为产品文件)
|
||||
|
||||
```
|
||||
cd myems/web
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
使用docker-compose安装
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- 5.docker-compose一键安装
|
||||
|
||||
```
|
||||
cd myems
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
|
||||
|
||||
- 6.测试
|
||||
|
||||
|
||||
| | 网址 | 结果 |
|
||||
| ----- | ----------------------- | ---------------- |
|
||||
| web | 192.168.0.1:80 | 输入账号密码登陆成功 |
|
||||
| admin | 192.168.0.1:8001 | 输入账号密码登录成功 |
|
||||
| api | 192.168.0.1:8000/spaces | 返回Json数据无报错 |
|
||||
注:如果api测试报错,请确认config.py里的数据库IP,数据库账号,数据库密码是否正确,如果不正确,请修改config.py后执行:
|
||||
```
|
||||
docker-compose up --build -d
|
||||
```
|
||||
|
||||
|
||||
| -- | -- |
|
||||
| ---------- | ----------- |
|
||||
| web账号 | administrator@myems.io |
|
||||
| web密码 | !MyEMS1 |
|
||||
| admin账号 | administrator |
|
||||
| admin密码 | !MyEMS1 |
|
||||
|
||||
注:如有问题,欢迎创建Issue
|
||||
|
||||
|
||||
## 功能版本对比
|
||||
|
||||
| 功能 |社区版 |企业版 | 说明 |
|
||||
| :--- | :----: | :----: | :----: |
|
||||
| 开源 | ✔️ | ❌ | |
|
||||
| 开源 | ✔️ | ❌ | |
|
||||
| 价格 | 免费 | 收费 | 标准组件授权费;定制组件开发费; |
|
||||
| 更换品牌名称与标志LOGO | ❌ | ✔️ | |
|
||||
| Modbus TCP 协议 | ✔️ | ✔️ | 采集数据 https://modbus.org/ |
|
||||
|
@ -210,7 +331,14 @@ docker-compose up -d
|
|||
| Honeywell EBI | ❌ | ✔️ | 采集数据 https://www.honeywell.com/ |
|
||||
| SIEMENS Desigo CC | ❌ | ✔️ | 采集数据 https://siemens.com/ |
|
||||
| QWeather API | ❌ | ✔️ | 采集数据 https://www.qweather.com/ |
|
||||
| FDD 能效故障诊断系统 | ❌ | ✔️ | 需要企业版组件许可或定制开发 |
|
||||
| Ingest from MySQL | ❌ | ✔️ | 采集数据 https://www.mysql.com/ |
|
||||
| Ingest from Microsoft SQL Server | ❌ | ✔️ | 采集数据 https://www.microsoft.com/en-us/sql-server/ |
|
||||
| Ingest from PostgreSQL | ❌ | ✔️ | 采集数据 https://www.postgresql.org/ |
|
||||
| Ingest from Oracle | ❌ | ✔️ | 采集数据 https://www.oracle.com/database/ |
|
||||
| Ingest from MongoDB | ❌ | ✔️ | 采集数据 https://www.mongodb.com/ |
|
||||
| Ingest from InfluxDB | ❌ | ✔️ | 采集数据 https://www.influxdata.com/products/influxdb/ |
|
||||
| FDD 能效故障诊断系统 | ❌ | ✔️ | 需要企业版组件许可或定制开发 |
|
||||
| 阿里云短信服务发送报警 | ❌ | ✔️ | 短信服务 https://www.aliyun.com/product/sms?userCode=8jwn6m8c |
|
||||
| 高级报表系统 | ❌ | ✔️ | 需要企业版组件许可或定制开发 |
|
||||
| 能耗预测 | ❌ | ✔️ | 需要企业版组件许可或定制开发 |
|
||||
| 组态图形绘制工具 | ❌ | ✔️ | 需要企业版组件许可或定制开发 |
|
||||
|
@ -249,13 +377,3 @@ docker-compose up -d
|
|||
|
||||
[社区版路线图](https://github.com/orgs/MyEMS/projects)
|
||||
|
||||
## MyEMS镜像
|
||||
|
||||
[1]. [http://github.com/MyEMS/myems](http://github.com/MyEMS/myems)
|
||||
|
||||
[2]. [http://gitee.com/myems/myems](http://gitee.com/myems/myems)
|
||||
|
||||
[3]. [http://bitbucket.org/myems/myems](http://bitbucket.org/myems/myems)
|
||||
|
||||
[4]. [https://gitlab.com/myems/myems](https://gitlab.com/myems/myems)
|
||||
|
||||
|
|
70
README_DE.md
70
README_DE.md
|
@ -14,7 +14,8 @@
|
|||
|
||||
## MyEMS-Einführung
|
||||
|
||||
MyEMS ist ein industrie führend Open Source Energiemanagementsystem, das auf Cloud-Computing-, IOT-, Big Data- und AI-Technologien basiert. MyEMS kann für eine standardmäßige und leistungsstarke integrierte Energiemanagement-Serviceplattform verwendet werden.
|
||||
MyEMS ist ein industrie führend Open Source Energiemanagementsystem.
|
||||
MyEMS kann für Gerätemanagement, Datenerfassung, Verarbeitung, Analyse, Visualisierung und Berichterstellung für Ihre EMS-Projekte verwendet werden.
|
||||
MyEMS wird von einem erfahrenen Entwicklungsteam entwickelt und gewartet, und der Quellcode des Systems wird unter MIT-Lizenz veröffentlicht.
|
||||
|
||||
## MyEMS Architektur
|
||||
|
@ -23,6 +24,15 @@ MyEMS wird von einem erfahrenen Entwicklungsteam entwickelt und gewartet, und de
|
|||
|
||||

|
||||
|
||||
## MyEMS Spiegel
|
||||
|
||||
[1]. [Github](https://github.com/MyEMS/myems) https://github.com/myems/myems
|
||||
|
||||
[2]. [Gitee](https://gitee.com/myems/myems) https://gitee.com/myems/myems
|
||||
|
||||
[3]. [Bitbucket](https://bitbucket.org/myems/myems) https://bitbucket.org/myems/myems
|
||||
|
||||
[4]. [Gitlab](https://gitlab.com/myems/myems) https://gitlab.com/myems/myems
|
||||
|
||||
## MyEMS Komponenten (GCommunity Edition)
|
||||
|
||||
|
@ -69,6 +79,27 @@ MyEMS Web UI: 80
|
|||
MyEMS Admin UI: 8001
|
||||
|
||||
|
||||
### Voreingestelltes Passwort
|
||||
<details>
|
||||
<summary>Admin UI</summary>
|
||||
|
||||
```
|
||||
administrator
|
||||
|
||||
!MyEMS1
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Web UI</summary>
|
||||
|
||||
```
|
||||
administrator@myems.io
|
||||
|
||||
!MyEMS1
|
||||
```
|
||||
</details>
|
||||
|
||||
### Docker Docker-compose Installieren
|
||||
|
||||
```
|
||||
|
@ -76,24 +107,28 @@ git clone https://gitee.com/myems/myems.git
|
|||
```
|
||||
|
||||
Ändern Sie die Datenbankkonfiguration in den folgenden Dateien
|
||||
Angenommen, die Datenbank-IP lautet 192.168.2.2
|
||||
Angenommen, die Datenbank-IP lautet 192.168.0.1
|
||||
```
|
||||
sudo nano myems-api/config.py
|
||||
sudo nano myems-aggregation/config.py
|
||||
sudo nano myems-cleaning/config.py
|
||||
sudo nano myems-modbus-tcp/config.py
|
||||
sudo nano myems-normalization/config.py
|
||||
|
||||
# host: '127.0.0.1' => 'host': '192.168.2.2'
|
||||
```
|
||||
|
||||
~~'host': '127.0.0.1'~~
|
||||
|
||||
'host': '192.168.0.1'
|
||||
|
||||
Ändern Sie den location '/api' von nginx.conf in web und admin
|
||||
Angenommen, die Host-IP lautet 192.168.2.3
|
||||
Angenommen, die Host-IP lautet 192.168.0.2
|
||||
```
|
||||
sudo nano admin/nginx.conf
|
||||
sudo nano web/nginx.conf
|
||||
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/;
|
||||
```
|
||||
~~proxy_pass http://127.0.0.1:8000/;~~
|
||||
|
||||
proxy_pass http://192.168.0.2:8000/;
|
||||
|
||||
Verpacken Sie das web, um Produktdateien zu generieren
|
||||
```
|
||||
|
@ -209,8 +244,15 @@ docker-compose up -d
|
|||
| Johnson Controls Metasys API | ❌ | ✔️ | https://www.johnsoncontrols.com/ |
|
||||
| Honeywell EBI | ❌️ | ✔️ | https://www.honeywell.com/ |
|
||||
| SIEMENS Desigo CC | ❌ | ✔️ | https://siemens.com/ |
|
||||
| QWeather API | ❌ | ✔️ | Erfordert eine Standardkomponentenlizenz |
|
||||
| QWeather API | ❌ | ✔️ | https://www.qweather.com/ |
|
||||
| Ingest from MySQL | ❌ | ✔️ | https://www.mysql.com/ |
|
||||
| Ingest from Microsoft SQL Server | ❌ | ✔️ | https://www.microsoft.com/en-us/sql-server/ |
|
||||
| Ingest from PostgreSQL | ❌ | ✔️ | https://www.postgresql.org/ |
|
||||
| Ingest from Oracle | ❌ | ✔️ | https://www.oracle.com/database/ |
|
||||
| Ingest from MongoDB | ❌ | ✔️ | https://www.mongodb.com/ |
|
||||
| Ingest from InfluxDB | ❌ | ✔️ | https://www.influxdata.com/products/influxdb/ |
|
||||
| FDD Rule Engine | ❌ | ✔️ | Erfordert eine Standardkomponentenlizenz |
|
||||
| Alarm via Alibaba Cloud SMS Service| ❌ | ✔️ | https://www.aliyun.com/product/sms?userCode=8jwn6m8c |
|
||||
| Advanced Reporting Engine | ❌ | ✔️ | Erfordert eine Standardkomponentenlizenz oder eine benutzerdefinierte Entwicklung |
|
||||
| Prognose des Energieverbrauchs | ❌ | ✔️ | Erfordert eine Standardkomponentenlizenz oder eine benutzerdefinierte Entwicklung |
|
||||
| Graphics Drawing Tool | ❌ | ✔️ | Erfordert eine Standardkomponentenlizenz |
|
||||
|
@ -238,26 +280,12 @@ docker-compose up -d
|
|||
| Bidding Support Service | ❌ | ✔️ | |
|
||||
| Customize Support Service | ❌ | ✔️ | |
|
||||
|
||||
|
||||
## MyEMS Bildschirmfoto
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
## MyEMS Straßenkarte
|
||||
|
||||
[Community Edition Straßenkarte](https://github.com/orgs/MyEMS/projects)
|
||||
|
||||
|
||||
## MyEMS Spiegel
|
||||
|
||||
[1]. [http://github.com/MyEMS/myems](http://github.com/MyEMS/myems)
|
||||
|
||||
[2]. [http://gitee.com/myems/myems](http://gitee.com/myems/myems)
|
||||
|
||||
[3]. [http://bitbucket.org/myems/myems](http://bitbucket.org/myems/myems)
|
||||
|
||||
[4]. [https://gitlab.com/myems/myems](https://gitlab.com/myems/myems)
|
||||
|
||||
|
|
70
README_EN.md
70
README_EN.md
|
@ -14,7 +14,8 @@
|
|||
|
||||
## MyEMS Introduction
|
||||
|
||||
MyEMS is an industry-leading open source Energy Management System that is built on cloud computing, IOT, Big Data and AI technologies. MyEMS can be used for a standard and powerful integrated energy management service platform.
|
||||
MyEMS is an industry-leading open source Energy Management System.
|
||||
MyEMS can be used for device management, data collection, processing, analysis, visualization and reporting for your EMS projects.
|
||||
MyEMS is being developed and maintained by an experienced development team, and the system's source code is published under MIT license.
|
||||
|
||||
## MyEMS Architecture
|
||||
|
@ -23,6 +24,15 @@ MyEMS is being developed and maintained by an experienced development team, and
|
|||
|
||||

|
||||
|
||||
## MyEMS Mirrors
|
||||
|
||||
[1]. [Github](https://github.com/myems/myems) https://github.com/myems/myems
|
||||
|
||||
[2]. [Gitee](https://gitee.com/myems/myems) https://gitee.com/myems/myems
|
||||
|
||||
[3]. [Bitbucket](https://bitbucket.org/myems/myems) https://bitbucket.org/myems/myems
|
||||
|
||||
[4]. [Gitlab](https://gitlab.com/myems/myems) https://gitlab.com/myems/myems
|
||||
|
||||
## MyEMS Components (Community Edition)
|
||||
|
||||
|
@ -68,6 +78,26 @@ MyEMS Web UI: 80
|
|||
|
||||
MyEMS Admin UI: 8001
|
||||
|
||||
### Default Passwords
|
||||
<details>
|
||||
<summary>Admin UI</summary>
|
||||
|
||||
```
|
||||
administrator
|
||||
|
||||
!MyEMS1
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Web UI</summary>
|
||||
|
||||
```
|
||||
administrator@myems.io
|
||||
|
||||
!MyEMS1
|
||||
```
|
||||
</details>
|
||||
|
||||
### Docker-compose Installation
|
||||
|
||||
|
@ -76,23 +106,28 @@ git clone https://gitee.com/myems/myems.git
|
|||
```
|
||||
|
||||
Modify Database IP in the following files
|
||||
Assume the Database IP is 192.168.2.2
|
||||
Assume the Database IP is 192.168.0.1
|
||||
```
|
||||
sudo nano myems-api/config.py
|
||||
sudo nano myems-aggregation/config.py
|
||||
sudo nano myems-cleaning/config.py
|
||||
sudo nano myems-modbus-tcp/config.py
|
||||
sudo nano myems-normalization/config.py
|
||||
|
||||
# host: '127.0.0.1' => 'host': '192.168.2.2'
|
||||
```
|
||||
|
||||
~~'host': '127.0.0.1'~~
|
||||
|
||||
'host': '192.168.0.1'
|
||||
|
||||
Modify location '/api' in nginx.conf of web and admin
|
||||
Assume the Host IP is 192.168.2.3
|
||||
Assume the Host IP is 192.168.0.2
|
||||
```
|
||||
sudo nano admin/nginx.conf
|
||||
sudo nano web/nginx.conf
|
||||
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/;
|
||||
```
|
||||
~~proxy_pass http://127.0.0.1:8000/;~~
|
||||
|
||||
proxy_pass http://192.168.0.2:8000/;
|
||||
|
||||
Build web for production
|
||||
```
|
||||
|
@ -211,8 +246,15 @@ docker-compose up -d
|
|||
| Johnson Controls Metasys API | ❌ | ✔️ | https://www.johnsoncontrols.com/ |
|
||||
| Honeywell EBI | ❌ | ✔️ | https://www.honeywell.com/ |
|
||||
| SIEMENS Desigo CC | ❌ | ✔️ | https://siemens.com/ |
|
||||
| QWeather API | ❌ | ✔️ | Requires standard component license |
|
||||
| QWeather API | ❌ | ✔️ | https://www.qweather.com/ |
|
||||
| Ingest from MySQL | ❌ | ✔️ | https://www.mysql.com/ |
|
||||
| Ingest from Microsoft SQL Server | ❌ | ✔️ | https://www.microsoft.com/en-us/sql-server/ |
|
||||
| Ingest from PostgreSQL | ❌ | ✔️ | https://www.postgresql.org/ |
|
||||
| Ingest from Oracle | ❌ | ✔️ | https://www.oracle.com/database/ |
|
||||
| Ingest from MongoDB | ❌ | ✔️ | https://www.mongodb.com/ |
|
||||
| Ingest from InfluxDB | ❌ | ✔️ | https://www.influxdata.com/products/influxdb/ |
|
||||
| FDD Rule Engine | ❌ | ✔️ | Requires standard component license or custom development |
|
||||
| Alarm via Alibaba Cloud SMS Service| ❌ | ✔️ | https://www.aliyun.com/product/sms?userCode=8jwn6m8c |
|
||||
| Advanced Reporting Engine | ❌ | ✔️ | Requires standard component license or custom development |
|
||||
| Prognose des Energieverbrauchs | ❌ | ✔️ | Requires standard component license or custom development |
|
||||
| Graphics Drawing Tool | ❌ | ✔️ | |
|
||||
|
@ -246,20 +288,6 @@ docker-compose up -d
|
|||

|
||||

|
||||
|
||||
|
||||
## MyEMS Roadmap
|
||||
|
||||
[Community Edition Roadmap](https://github.com/orgs/MyEMS/projects)
|
||||
|
||||
|
||||
## MyEMS Mirrors
|
||||
|
||||
[1]. [http://github.com/MyEMS/myems](http://github.com/MyEMS/myems)
|
||||
|
||||
[2]. [http://gitee.com/myems/myems](http://gitee.com/myems/myems)
|
||||
|
||||
[3]. [http://bitbucket.org/myems/myems](http://bitbucket.org/myems/myems)
|
||||
|
||||
[4]. [https://gitlab.com/myems/myems](https://gitlab.com/myems/myems)
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ Providing admin panel for MyEMS system administration and configuration
|
|||
## Prerequisites
|
||||
nginx-1.18.0 or later
|
||||
|
||||
|
||||
## Option 1: Install on NGINX Server
|
||||
|
||||
* Install NGINX Server
|
||||
|
@ -15,8 +14,8 @@ nginx-1.18.0 or later
|
|||
refer to http://nginx.org/en/docs/install.html
|
||||
|
||||
* Configure NGINX
|
||||
```
|
||||
$ sudo nano /etc/nginx/nginx.conf
|
||||
```bash
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
In the 'http' section, add some directives:
|
||||
```
|
||||
|
@ -54,25 +53,25 @@ Add a new 'server' section with direstives as below:
|
|||
```
|
||||
|
||||
* Download myems
|
||||
```
|
||||
$ cd ~
|
||||
$ git clone https://github.com/MyEMS/myems.git
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/MyEMS/myems.git
|
||||
```
|
||||
|
||||
* Install myems-admin :
|
||||
If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin
|
||||
```
|
||||
$ sudo cp -r ~/myems/admin /var/www/html/admin
|
||||
$ sudo chmod 0755 -R /var/www/html/admin
|
||||
```bash
|
||||
sudo cp -r ~/myems/admin /var/www/html/admin
|
||||
sudo chmod 0755 -R /var/www/html/admin
|
||||
```
|
||||
Check the config file and change it if necessary:
|
||||
```
|
||||
$ sudo nano /var/www/html/admin/app/api.js
|
||||
```bash
|
||||
sudo nano /var/www/html/admin/app/api.js
|
||||
```
|
||||
|
||||
## NOTE:
|
||||
The 'upload' folder is for user uploaded files. DO NOT delete/move/overwrite the 'upload' folder when you upgraded myems-admin.
|
||||
```
|
||||
```bash
|
||||
/var/www/html/admin/upload
|
||||
```
|
||||
|
||||
|
@ -83,18 +82,18 @@ The 'upload' folder is for user uploaded files. DO NOT delete/move/overwrite the
|
|||
refer to https://httpd.apache.org/docs/2.4/install.html
|
||||
|
||||
* Configure Apache2
|
||||
```
|
||||
$ sudo vi /etc/apache2/ports.conf
|
||||
```bash
|
||||
sudo vi /etc/apache2/ports.conf
|
||||
```
|
||||
Add a Listen
|
||||
```
|
||||
Listen 8001
|
||||
```
|
||||
```
|
||||
$ sudo vi /etc/apache2/sites-available/000-default.conf
|
||||
```bash
|
||||
sudo vi /etc/apache2/sites-available/000-default.conf
|
||||
```
|
||||
Add a new 'VirtualHost' as below
|
||||
```
|
||||
```xml
|
||||
<VirtualHost 127.0.0.1:8001>
|
||||
ServerAdmin MyEMS-admin
|
||||
DocumentRoot /var/www/admin
|
||||
|
@ -110,18 +109,18 @@ Add a new 'VirtualHost' as below
|
|||
```
|
||||
|
||||
* Download myems-admin
|
||||
```
|
||||
$ cd ~
|
||||
$ git clone https://github.com/MyEMS/myems.git
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/MyEMS/myems.git
|
||||
```
|
||||
|
||||
* Install myems-admin :
|
||||
If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin
|
||||
```
|
||||
$ sudo cp -r ~/myems/admin /var/www/html/admin
|
||||
$ sudo chmod 0755 -R /var/www/html/admin
|
||||
```bash
|
||||
sudo cp -r ~/myems/admin /var/www/html/admin
|
||||
sudo chmod 0755 -R /var/www/html/admin
|
||||
```
|
||||
Check the config file and change it if necessary:
|
||||
```
|
||||
$ sudo nano /var/www/html/admin/app/api.js
|
||||
```bash
|
||||
sudo nano /var/www/html/admin/app/api.js
|
||||
```
|
|
@ -13,11 +13,11 @@ app
|
|||
$rootScope.$state = $state;
|
||||
$transitions.onStart( { }, function(trans) {
|
||||
if ($location.$$path.indexOf('login')==-1) {
|
||||
if ($window.localStorage.getItem("currentUser")){
|
||||
currentUser = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
if ($window.localStorage.getItem("myems_admin_ui_current_user")){
|
||||
currentUser = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
}
|
||||
if (currentUser == undefined || currentUser.is_admin === false) {
|
||||
$window.localStorage.removeItem("currentUser");
|
||||
$window.localStorage.removeItem("myems_admin_ui_current_user");
|
||||
return $state.target("login.login");
|
||||
} else {
|
||||
$rootScope.pageTitle = trans.to().data.pageTitle;
|
||||
|
@ -390,7 +390,7 @@ app
|
|||
deps: [
|
||||
'$ocLazyLoad',
|
||||
function ($ocLazyLoad) {
|
||||
return $ocLazyLoad.load(['ui.select', 'toaster']).then(
|
||||
return $ocLazyLoad.load(['ui.select', 'daterangepicker', 'toaster']).then(
|
||||
function () {
|
||||
return $ocLazyLoad.load([{
|
||||
serie: true,
|
||||
|
@ -768,7 +768,7 @@ app
|
|||
deps: [
|
||||
'$ocLazyLoad',
|
||||
function ($ocLazyLoad) {
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker', 'toaster']).then(
|
||||
function () {
|
||||
return $ocLazyLoad.load([{
|
||||
serie: true,
|
||||
|
@ -781,9 +781,6 @@ app
|
|||
}, {
|
||||
name: 'oitozero.ngSweetAlert',
|
||||
files: ['js/plugins/sweetalert/angular-sweetalert.min.js']
|
||||
}, {
|
||||
name: 'daterangepicker',
|
||||
files: ['js/daterangepicker/angular-daterangepicker.min.js']
|
||||
}, {
|
||||
serie: true,
|
||||
files: [
|
||||
|
@ -824,7 +821,7 @@ app
|
|||
deps: [
|
||||
'$ocLazyLoad',
|
||||
function ($ocLazyLoad) {
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker', 'toaster']).then(
|
||||
function () {
|
||||
return $ocLazyLoad.load([{
|
||||
serie: true,
|
||||
|
@ -837,9 +834,6 @@ app
|
|||
}, {
|
||||
name: 'oitozero.ngSweetAlert',
|
||||
files: ['js/plugins/sweetalert/angular-sweetalert.min.js']
|
||||
}, {
|
||||
name: 'daterangepicker',
|
||||
files: ['js/daterangepicker/angular-daterangepicker.min.js']
|
||||
}, {
|
||||
serie: true,
|
||||
files: [
|
||||
|
@ -880,7 +874,7 @@ app
|
|||
deps: [
|
||||
'$ocLazyLoad',
|
||||
function ($ocLazyLoad) {
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker', 'toaster']).then(
|
||||
function () {
|
||||
return $ocLazyLoad.load([{
|
||||
serie: true,
|
||||
|
@ -893,9 +887,6 @@ app
|
|||
}, {
|
||||
name: 'oitozero.ngSweetAlert',
|
||||
files: ['js/plugins/sweetalert/angular-sweetalert.min.js']
|
||||
}, {
|
||||
name: 'daterangepicker',
|
||||
files: ['js/daterangepicker/angular-daterangepicker.min.js']
|
||||
}, {
|
||||
serie: true,
|
||||
files: [
|
||||
|
@ -1067,36 +1058,6 @@ app
|
|||
]
|
||||
}
|
||||
})
|
||||
.state('settings.gsmmodem', {
|
||||
url: "/gsmmodem",
|
||||
templateUrl: "views/settings/gsmmodem/gsmmodem.html",
|
||||
data: {
|
||||
pageTitle: 'MENU.SETTINGS.GSM_MODEM'
|
||||
},
|
||||
resolve: {
|
||||
deps: [
|
||||
'$ocLazyLoad',
|
||||
function ($ocLazyLoad) {
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
|
||||
function () {
|
||||
return $ocLazyLoad.load([{
|
||||
files: ['js/plugins/sweetalert/sweetalert.min.js', 'css/plugins/sweetalert/sweetalert.css']
|
||||
}, {
|
||||
name: 'oitozero.ngSweetAlert',
|
||||
files: ['js/plugins/sweetalert/angular-sweetalert.min.js']
|
||||
}, {
|
||||
serie: true,
|
||||
files: [
|
||||
'app/services/settings/gsmmodem/gsmmodem.service.js',
|
||||
'app/controllers/settings/gsmmodem/gsmmodem.controller.js'
|
||||
]
|
||||
}]);
|
||||
}
|
||||
);
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
.state('settings.knowledgefile', {
|
||||
url: "/knowledgefile",
|
||||
templateUrl: "views/settings/knowledgefile/knowledgefile.html",
|
||||
|
@ -1171,9 +1132,15 @@ app
|
|||
deps: [
|
||||
'$ocLazyLoad',
|
||||
function ($ocLazyLoad) {
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
|
||||
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker','toaster']).then(
|
||||
function () {
|
||||
return $ocLazyLoad.load([{
|
||||
serie: true,
|
||||
files: ['js/daterangepicker/daterangepicker.min.js', 'js/daterangepicker/daterangepicker.min.css']
|
||||
}, {
|
||||
name: 'daterangepicker',
|
||||
files: ['js/daterangepicker/angular-daterangepicker.min.js']
|
||||
}, {
|
||||
files: ['js/plugins/sweetalert/sweetalert.min.js', 'css/plugins/sweetalert/sweetalert.css']
|
||||
}, {
|
||||
name: 'oitozero.ngSweetAlert',
|
||||
|
|
|
@ -46,8 +46,8 @@ app.controller('EmailMessageController', function($scope, $timeout,$translate,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.EMAIL_MESSAGE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.EMAIL_MESSAGE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ app.controller('EmailMessageOptionController', function($scope, $timeout,
|
|||
autoApply: true,
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
|
||||
|
||||
eventHandlers:{
|
||||
'apply.daterangepicker':function(ev,picker){
|
||||
//$scope.execute();
|
||||
|
@ -37,13 +37,13 @@ app.controller('EmailMessageOptionController', function($scope, $timeout,
|
|||
load: true,
|
||||
period:$scope.currentPeriod
|
||||
});
|
||||
|
||||
|
||||
EmailMessageAnalysisService.getAnalysisResult(query, function(response) {
|
||||
if (angular.isDefined(response.status) && response.status === 200) {
|
||||
$scope.$emit('handleEmitEmailMessageOptionChanged', response.data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
$timeout(function() {
|
||||
$scope.execute();
|
||||
|
|
|
@ -52,8 +52,8 @@ app.controller('RuleController', function($scope, $uibModal, $translate, RuleSer
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY",{template: $translate.instant("FDD.RULE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY",{template: $translate.instant("FDD.RULE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -91,8 +91,8 @@ app.controller('RuleController', function($scope, $uibModal, $translate, RuleSer
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("FDD.RULE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("FDD.RULE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
|
@ -126,18 +126,11 @@ app.controller('RuleController', function($scope, $uibModal, $translate, RuleSer
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllRules();
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.RULE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.RULE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ app.controller('TextMessageController', function($scope,$timeout,$translate,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.TEXT_MESSAGE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.TEXT_MESSAGE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -15,10 +15,10 @@ app.controller('TextMessageOptionController', function($scope, $timeout,
|
|||
autoApply: true,
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
|
||||
|
||||
eventHandlers:{
|
||||
'apply.daterangepicker':function(ev,picker){
|
||||
//$scope.execute();
|
||||
|
@ -37,13 +37,13 @@ app.controller('TextMessageOptionController', function($scope, $timeout,
|
|||
load: true,
|
||||
period:$scope.currentPeriod
|
||||
});
|
||||
|
||||
|
||||
TextMessageAnalysisService.getAnalysisResult(query, function (response) {
|
||||
if (angular.isDefined(response.status) && response.status === 200) {
|
||||
$scope.$emit('handleEmitTextMessageOptionChanged', response.data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
$timeout(function() {
|
||||
$scope.execute();
|
||||
|
|
|
@ -44,8 +44,8 @@ app.controller('WebMessageController', function($scope, $timeout, $translate, $u
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("FDD.WEB_MESSAGE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("FDD.WEB_MESSAGE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
|
@ -82,8 +82,8 @@ app.controller('WebMessageController', function($scope, $timeout, $translate, $u
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.WEB_MESSAGE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.WEB_MESSAGE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ app.controller('WebMessageOptionController', function($scope, $timeout,
|
|||
autoApply: true,
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
|
||||
eventHandlers:{
|
||||
|
|
|
@ -44,8 +44,8 @@ app.controller('WechatMessageController', function($scope, $timeout,$translate,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.WECHAT_MESSAGE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("FDD.WECHAT_MESSAGE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ app.controller('WechatMessageOptionController', function($scope, $timeout,
|
|||
autoApply: true,
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
|
||||
eventHandlers:{
|
||||
|
|
|
@ -15,9 +15,9 @@ app.controller('LoginController', function (
|
|||
|
||||
$scope.dataLoading = false;
|
||||
$scope.isFullScreen = false;
|
||||
$scope.language = $window.localStorage.getItem("language") || 'cn';
|
||||
$scope.language = $window.localStorage.getItem("myems_admin_ui_language") || "zh_CN";
|
||||
$scope.fullScreenTitle = "FULLSCREEN";
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
// login section start
|
||||
$scope.login = function (user) {
|
||||
$scope.dataLoading = true;
|
||||
|
@ -30,22 +30,15 @@ app.controller('LoginController', function (
|
|||
body: $translate.instant('TOASTER.LOGIN_SUCCESS'),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$window.localStorage.setItem("currentUser", JSON.stringify(response.data));
|
||||
$window.localStorage.setItem("myems_admin_ui_current_user", JSON.stringify(response.data));
|
||||
|
||||
$location.path('/settings/space');
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
} else if (angular.isDefined(response.status) && response.status === 400 || response.status === 404) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant('TOASTER.LOGIN_FAILURE'),
|
||||
title: $translate.instant('TOASTER.LOGIN_FAILURE'),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -61,19 +54,19 @@ app.controller('LoginController', function (
|
|||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant('TOASTER.LOGIN_SUCCESS'),
|
||||
body: $translate.instant('TOASTER.LOGOUT_SUCCESS'),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$window.localStorage.removeItem("currentUser");
|
||||
$window.localStorage.removeItem("myems_admin_ui_current_user");
|
||||
$location.path('/login');
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
title: $translate.instant("TOASTER.LOGOUT_FAILURE"),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$window.localStorage.removeItem("currentUser");
|
||||
$window.localStorage.removeItem("myems_admin_ui_current_user");
|
||||
$location.path('/login');
|
||||
}
|
||||
});
|
||||
|
@ -118,13 +111,12 @@ app.controller('LoginController', function (
|
|||
body: $translate.instant("TOASTER.SUCCESS_UPDATE_BODY", { template: $translate.instant("TOASTER.USER_PASSWORD") }),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
$scope.$emit('handleEmitLineChanged');
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title) || $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant( response.data.description, { template: $translate.instant("TOASTER.USER_PASSWORD") }) || $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("TOASTER.USER_PASSWORD") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("TOASTER.USER_PASSWORD") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -202,7 +194,7 @@ app.controller('LoginController', function (
|
|||
$scope.changeLanguage = function (langKey) {
|
||||
$translate.use(langKey);
|
||||
$scope.language = langKey;
|
||||
$window.localStorage.setItem("language", langKey);
|
||||
$window.localStorage.setItem("myems_admin_ui_language", langKey);
|
||||
};
|
||||
|
||||
// web message alarm section start
|
||||
|
|
|
@ -5,7 +5,7 @@ app.controller('MainController', [
|
|||
|
||||
$rootScope.$on("handleReLogin",function(){
|
||||
$timeout(function(){
|
||||
$window.localStorage.removeItem("currentUser");
|
||||
$window.localStorage.removeItem("myems_admin_ui_current_user");
|
||||
$location.path('/login');
|
||||
},2000)
|
||||
});
|
||||
|
|
|
@ -41,8 +41,8 @@ app.controller('EnergyCategoryController', function($scope, $translate,$uibModal
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.CATEGORY")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.CATEGORY")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ app.controller('EnergyCategoryController', function($scope, $translate,$uibModal
|
|||
}else{
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.CATEGORY")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.CATEGORY")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ app.controller('EnergyCategoryController', function($scope, $translate,$uibModal
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.CATEGORY")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.CATEGORY")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ app.controller('EnergyItemController', function($scope, $translate,$uibModal, Ca
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.ENERGY_ITEM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.ENERGY_ITEM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ app.controller('EnergyItemController', function($scope, $translate,$uibModal, Ca
|
|||
}else{
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.ENERGY_ITEM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.ENERGY_ITEM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -126,8 +126,8 @@ app.controller('EnergyItemController', function($scope, $translate,$uibModal, Ca
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.ENERGY_ITEM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.ENERGY_ITEM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ app.controller('CombinedEquipmentController', function ($scope, $translate, $uib
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.COMBINED_EQUIPMENT") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.COMBINED_EQUIPMENT") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ app.controller('CombinedEquipmentController', function ($scope, $translate, $uib
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.COMBINED_EQUIPMENT") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.COMBINED_EQUIPMENT") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -128,8 +128,8 @@ app.controller('CombinedEquipmentController', function ($scope, $translate, $uib
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.COMBINED_EQUIPMENT") }),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.COMBINED_EQUIPMENT") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ app.controller('CombinedEquipmentMeterController', function ($scope, $timeout, $
|
|||
CombinedEquipmentMeterService.getMetersByCombinedEquipmentID(id, value, function (response) {
|
||||
if (angular.isDefined(response.status) && response.status === 200) {
|
||||
angular.forEach(response.data, function (item, indx) {
|
||||
data[indx].metertype = value;
|
||||
response.data[indx].metertype = value;
|
||||
});
|
||||
$scope.combinedequipmentmeters = $scope.combinedequipmentmeters.concat(response.data);
|
||||
}
|
||||
|
|
|
@ -74,8 +74,8 @@ app.controller('CombinedEquipmentParameterController', function ($scope, $uibMod
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMBINED_EQUIPMENT.PARAMETER") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMBINED_EQUIPMENT.PARAMETER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -123,8 +123,8 @@ app.controller('CombinedEquipmentParameterController', function ($scope, $uibMod
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMBINED_EQUIPMENT.PARAMETER") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMBINED_EQUIPMENT.PARAMETER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -157,18 +157,11 @@ app.controller('CombinedEquipmentParameterController', function ($scope, $uibMod
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getParametersByCombinedEquipmentID($scope.currentCombinedEquipment.id);
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant(popBody, { template: $translate.instant("COMBINED_EQUIPMENT.PARAMETER") }),
|
||||
title: $translate.instant(popBody, { template: $translate.instant("COMBINED_EQUIPMENT.PARAMETER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ app.controller('ContactController', function($scope, $translate,$uibModal, Conta
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.CONTACT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.CONTACT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ app.controller('ContactController', function($scope, $translate,$uibModal, Conta
|
|||
|
||||
modalInstance.result.then(function (modifiedContact) {
|
||||
ContactService.editContact(modifiedContact, function (response) {
|
||||
if(angular.isDefined(response.status) && response.status === 200200){
|
||||
if(angular.isDefined(response.status) && response.status === 200){
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
|
@ -79,8 +79,8 @@ app.controller('ContactController', function($scope, $translate,$uibModal, Conta
|
|||
}else{
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.CONTACT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.CONTACT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -115,8 +115,8 @@ app.controller('ContactController', function($scope, $translate,$uibModal, Conta
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.CONTACT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.CONTACT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,14 +27,13 @@ app.controller('CostCenterController', function($scope, $translate,$uibModal, Co
|
|||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
||||
$scope.getAllCostCenters();
|
||||
$scope.$emit('handleEmitCostCenterChanged');
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -70,11 +69,11 @@ app.controller('CostCenterController', function($scope, $translate,$uibModal, Co
|
|||
});
|
||||
$scope.getAllCostCenters();
|
||||
$scope.$emit('handleEmitCostCenterChanged');
|
||||
}else{
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -107,21 +106,14 @@ app.controller('CostCenterController', function($scope, $translate,$uibModal, Co
|
|||
});
|
||||
$scope.getAllCostCenters();
|
||||
$scope.$emit('handleEmitCostCenterChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.COSTCENTER")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -81,7 +81,7 @@ app.controller('CostCenterTariffController', function ($scope, $translate,
|
|||
if (angular.isDefined(response.status) && response.status === 204) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: popTi$translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_DELETE_BODY", {template: $translate.instant("TOASTER.UNBIND_TARIFF_SUCCESS")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ app.controller('CostFileController', function (
|
|||
toaster,
|
||||
SweetAlert) {
|
||||
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
|
||||
$scope.getAllCostFiles = function () {
|
||||
CostFileService.getAllCostFiles(function (response) {
|
||||
|
@ -37,7 +37,7 @@ app.controller('CostFileController', function (
|
|||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY".format(file.name)),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: file.name}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllCostFiles();
|
||||
|
@ -45,8 +45,8 @@ app.controller('CostFileController', function (
|
|||
'error': function (file, xhr) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY".format(file.name)),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: file.name}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -96,18 +96,11 @@ app.controller('CostFileController', function (
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllCostFiles();
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("TOASTER.COST_FILE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("TOASTER.COST_FILE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ app.controller('DataSourceController', function($scope, $uibModal, $translate, D
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("DATA_SOURCE.DATA_SOURCE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("DATA_SOURCE.DATA_SOURCE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -93,8 +93,8 @@ app.controller('DataSourceController', function($scope, $uibModal, $translate, D
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("DATA_SOURCE.DATA_SOURCE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("DATA_SOURCE.DATA_SOURCE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -127,18 +127,11 @@ app.controller('DataSourceController', function($scope, $uibModal, $translate, D
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.$emit("handleEmitDataSourceChanged");
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("DATA_SOURCE.DATA_SOURCE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("DATA_SOURCE.DATA_SOURCE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ app.controller('PointController', function($scope, $uibModal, $translate, DataSo
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: "TOASTER.ERROR_ADD_BODY",
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY",{template: $translate.instant( "SETTING.POINT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ app.controller('PointController', function($scope, $uibModal, $translate, DataSo
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.POINT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.POINT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -133,18 +133,11 @@ app.controller('PointController', function($scope, $uibModal, $translate, DataSo
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getPointsByDataSourceID($scope.currentDataSource);
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.POINT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.POINT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -61,8 +61,8 @@ app.controller('DistributionCircuitController', function($scope, $translate, $ui
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_CIRCUIT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_CIRCUIT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ app.controller('DistributionCircuitController', function($scope, $translate, $ui
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_CIRCUIT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_CIRCUIT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -136,18 +136,11 @@ app.controller('DistributionCircuitController', function($scope, $translate, $ui
|
|||
});
|
||||
$scope.getDistributionCircuitsByDistributionSystemID($scope.currentDistributionSystem.id);
|
||||
$scope.$emit('handleEmitDistributionCircuitChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_CIRCUIT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_CIRCUIT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ app.controller('DistributionSystemController', function($scope, $translate, $uib
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_SYSTEM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_SYSTEM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ app.controller('DistributionSystemController', function($scope, $translate, $uib
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_SYSTEM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_SYSTEM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -108,8 +108,8 @@ app.controller('DistributionSystemController', function($scope, $translate, $uib
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_SYSTEM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("DISTRIBUTION_SYSTEM.DISTRIBUTION_SYSTEM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ app.controller('EmailServerController', function($scope, $translate,$uibModal, E
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.EMAIL_SERVER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.EMAIL_SERVER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -79,8 +79,8 @@ app.controller('EmailServerController', function($scope, $translate,$uibModal, E
|
|||
}else{
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.EMAIL_SERVER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.EMAIL_SERVER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -115,8 +115,8 @@ app.controller('EmailServerController', function($scope, $translate,$uibModal, E
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.EMAIL_SERVER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.EMAIL_SERVER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ app.controller('EnergyFlowDiagramController', function($scope, $translate, $uibM
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("COMMON.ENERGY_FLOW_DIAGRAM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("COMMON.ENERGY_FLOW_DIAGRAM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ app.controller('EnergyFlowDiagramController', function($scope, $translate, $uibM
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.ENERGY_FLOW_DIAGRAM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.ENERGY_FLOW_DIAGRAM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -108,8 +108,8 @@ app.controller('EnergyFlowDiagramController', function($scope, $translate, $uibM
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.ENERGY_FLOW_DIAGRAM")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.ENERGY_FLOW_DIAGRAM")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ app.controller('EnergyFlowDiagramLinkController', function($scope,$uibModal, $tr
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.LINK")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.LINK")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -141,8 +141,8 @@ app.controller('EnergyFlowDiagramLinkController', function($scope,$uibModal, $tr
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.LINK")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.LINK")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -176,18 +176,11 @@ app.controller('EnergyFlowDiagramLinkController', function($scope,$uibModal, $tr
|
|||
});
|
||||
$scope.getLinksByEnergyFlowDiagramID($scope.currentEnergyFlowDiagram.id);
|
||||
$scope.$emit('handleEmitEnergyFlowDiagramLinkChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.LINK")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.LINK")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -62,8 +62,8 @@ app.controller('EnergyFlowDiagramNodeController', function($scope, $translate, $
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.NODE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.NODE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ app.controller('EnergyFlowDiagramNodeController', function($scope, $translate, $
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.NODE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.NODE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -136,18 +136,11 @@ app.controller('EnergyFlowDiagramNodeController', function($scope, $translate, $
|
|||
});
|
||||
$scope.getNodesByEnergyFlowDiagramID($scope.currentEnergyFlowDiagram.id);
|
||||
$scope.$emit('handleEmitEnergyFlowDiagramNodeChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.NODE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("ENERGY_FLOW_DIAGRAM.NODE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ app.controller('EquipmentController', function($scope, $translate, $uibModal, Eq
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("COMMON.EQUIPMENT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("COMMON.EQUIPMENT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ app.controller('EquipmentController', function($scope, $translate, $uibModal, Eq
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.EQUIPMENT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.EQUIPMENT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ app.controller('EquipmentController', function($scope, $translate, $uibModal, Eq
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.EQUIPMENT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.EQUIPMENT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -74,8 +74,8 @@ app.controller('EquipmentParameterController', function($scope, $uibModal, $tran
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("EQUIPMENT.PARAMETER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("EQUIPMENT.PARAMETER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -123,8 +123,8 @@ app.controller('EquipmentParameterController', function($scope, $uibModal, $tran
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("EQUIPMENT.PARAMETER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("EQUIPMENT.PARAMETER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -157,18 +157,11 @@ app.controller('EquipmentParameterController', function($scope, $uibModal, $tran
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getParametersByEquipmentID($scope.currentEquipment.id);
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("EQUIPMENT.PARAMETER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("EQUIPMENT.PARAMETER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ app.controller('GatewayController', function($scope, $translate, $uibModal, Gat
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("GATEWAY.GATEWAY")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("GATEWAY.GATEWAY")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ app.controller('GatewayController', function($scope, $translate, $uibModal, Gat
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("GATEWAY.GATEWAY")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("GATEWAY.GATEWAY")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -115,18 +115,11 @@ app.controller('GatewayController', function($scope, $translate, $uibModal, Gat
|
|||
});
|
||||
$scope.getAllGateways();
|
||||
$scope.$emit('handleEmitGatewayChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("GATEWAY.GATEWAY")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("GATEWAY.GATEWAY")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,155 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
app.controller('GSMModemController', function($scope, $translate,$uibModal, GSMModemService,toaster,SweetAlert) {
|
||||
|
||||
$scope.getAllGSMModems = function() {
|
||||
GSMModemService.getAllGSMModems(function (response) {
|
||||
if (angular.isDefined(response.status) && response.status === 200) {
|
||||
$scope.gsmmodems = response.data;
|
||||
} else {
|
||||
$scope.gsmmodems = [];
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$scope.addGSMModem = function() {
|
||||
var modalInstance = $uibModal.open({
|
||||
templateUrl: 'views/settings/gsmmodem/gsmmodem.model.html',
|
||||
controller: 'ModalAddGSMModemCtrl',
|
||||
windowClass: "animated fadeIn",
|
||||
resolve: {
|
||||
params:function(){
|
||||
return {
|
||||
gsmmodems:angular.copy($scope.gsmmodems)
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
modalInstance.result.then(function(gsmmodem) {
|
||||
GSMModemService.addGSMModem(gsmmodem, function(response) {
|
||||
if (angular.isDefined(response.status) && response.status === 201) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: $translate.instant("SETTING.GSM_MODEM")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllGSMModems();
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.GSM_MODEM")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
}, function() {
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$scope.editGSMModem=function(gsmmodem){
|
||||
var modalInstance = $uibModal.open({
|
||||
windowClass: "animated fadeIn",
|
||||
templateUrl: 'views/settings/gsmmodem/gsmmodem.model.html',
|
||||
controller: 'ModalEditGSMModemCtrl',
|
||||
resolve: {
|
||||
params:function(){
|
||||
return {
|
||||
gsmmodem:angular.copy(gsmmodem),
|
||||
gsmmodems:angular.copy($scope.gsmmodems)
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (modifiedGSMModem) {
|
||||
GSMModemService.editGSMModem(modifiedGSMModem,function (response){
|
||||
if(angular.isDefined(response.status) && response.status === 200) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_UPDATE_BODY", {template: $translate.instant("SETTING.GSM_MODEM")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllGSMModems();
|
||||
}else{
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.GSM_MODEM")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
//do nothing;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.deleteGSMModem=function(gsmmodem){
|
||||
SweetAlert.swal({
|
||||
title: $translate.instant("SWEET.TITLE"),
|
||||
text: $translate.instant("SWEET.TEXT"),
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: $translate.instant("SWEET.CONFIRM_BUTTON_TEXT"),
|
||||
cancelButtonText: $translate.instant("SWEET.CANCEL_BUTTON_TEXT"),
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true },
|
||||
function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
GSMModemService.deleteGSMModem(gsmmodem, function(response) {
|
||||
if (angular.isDefined(response.status) && response.status === 204) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_DELETE_BODY", {template: $translate.instant("SETTING.GSM_MODEM")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllGSMModems();
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.GSM_MODEM")}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getAllGSMModems();
|
||||
});
|
||||
|
||||
app.controller('ModalAddGSMModemCtrl', function ($scope, $uibModalInstance,params) {
|
||||
|
||||
$scope.operation="SETTING.ADD_GSM_MODEM";
|
||||
$scope.gsmmodems=params.gsmmodems;
|
||||
$scope.ok = function () {
|
||||
$uibModalInstance.close($scope.gsmmodem);
|
||||
};
|
||||
|
||||
$scope.cancel = function () {
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
|
||||
app.controller('ModalEditGSMModemCtrl', function ($scope, $uibModalInstance, params) {
|
||||
$scope.operation="SETTING.EDIT_GSM_MODEM";
|
||||
$scope.gsmmodem = params.gsmmodem;
|
||||
$scope.gsmmodems=params.gsmmodems;
|
||||
|
||||
$scope.ok = function () {
|
||||
$uibModalInstance.close($scope.gsmmodem);
|
||||
};
|
||||
|
||||
$scope.cancel = function () {
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
|
@ -8,7 +8,7 @@ app.controller('KnowledgeFileController', function (
|
|||
toaster,
|
||||
SweetAlert) {
|
||||
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
|
||||
$scope.getAllKnowledgeFiles = function () {
|
||||
KnowledgeFileService.getAllKnowledgeFiles(function (response) {
|
||||
|
@ -37,7 +37,7 @@ app.controller('KnowledgeFileController', function (
|
|||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY".format(file.name)),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: file.name}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllKnowledgeFiles();
|
||||
|
@ -45,8 +45,8 @@ app.controller('KnowledgeFileController', function (
|
|||
'error': function (file, xhr) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY".format(file.name)),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: file.name}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -95,18 +95,11 @@ app.controller('KnowledgeFileController', function (
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllKnowledgeFiles();
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("SETTING.KNOWLEDGEFILE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("SETTING.KNOWLEDGEFILE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -116,8 +116,8 @@ app.controller('MenuController', function ($scope, $uibModal, MenuService, toast
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.MENU") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.MENU") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -155,8 +155,8 @@ app.controller('MeterController', function($scope, $translate, $uibModal, Meter
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -211,8 +211,8 @@ app.controller('MeterController', function($scope, $translate, $uibModal, Meter
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -246,18 +246,11 @@ app.controller('MeterController', function($scope, $translate, $uibModal, Meter
|
|||
});
|
||||
$scope.getAllMeters();
|
||||
$scope.$emit('handleEmitMeterChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -79,8 +79,8 @@ app.controller('OfflineMeterController', function($scope, $translate, $uibModal,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.OFFLINE_METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.OFFLINE_METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -129,8 +129,8 @@ app.controller('OfflineMeterController', function($scope, $translate, $uibModal,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.OFFLINE_METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.OFFLINE_METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -164,18 +164,11 @@ app.controller('OfflineMeterController', function($scope, $translate, $uibModal,
|
|||
});
|
||||
$scope.getAllOfflineMeters();
|
||||
$scope.$emit('handleEmitOfflineMeterChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.OFFLINE_METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.OFFLINE_METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ app.controller('OfflineMeterFileController', function(
|
|||
toaster,
|
||||
SweetAlert) {
|
||||
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
|
||||
$scope.getAllOfflineMeterFiles = function() {
|
||||
OfflineMeterFileService.getAllOfflineMeterFiles(function (response) {
|
||||
|
@ -38,7 +38,7 @@ app.controller('OfflineMeterFileController', function(
|
|||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY",{template: file.name}),
|
||||
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: file.name}),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllOfflineMeterFiles();
|
||||
|
@ -46,8 +46,8 @@ app.controller('OfflineMeterFileController', function(
|
|||
'error': function (file, xhr) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: file.name}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: file.name}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -97,18 +97,11 @@ app.controller('OfflineMeterFileController', function(
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllOfflineMeterFiles();
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.OFFLINE_METER_FILE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.OFFLINE_METER_FILE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -109,8 +109,8 @@ $scope.getAllEnergyItems = function() {
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.VIRTUAL_METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.VIRTUAL_METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -162,8 +162,8 @@ $scope.getAllEnergyItems = function() {
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.VIRTUAL_METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.VIRTUAL_METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -197,18 +197,11 @@ $scope.getAllEnergyItems = function() {
|
|||
});
|
||||
$scope.getAllVirtualMeters();
|
||||
$scope.$emit('handleEmitVirtualMeterChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: popTit$translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.VIRTUAL_METER")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.VIRTUAL_METER")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ app.controller('SensorController', function($scope, $translate, $uibModal, Sens
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("COMMON.SENSOR")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("COMMON.SENSOR")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ app.controller('SensorController', function($scope, $translate, $uibModal, Sens
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.SENSOR")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.SENSOR")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -115,18 +115,11 @@ app.controller('SensorController', function($scope, $translate, $uibModal, Sens
|
|||
});
|
||||
$scope.getAllSensors();
|
||||
$scope.$emit('handleEmitSensorChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.SENSOR")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.SENSOR")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ app.controller('ShopfloorController', function ($scope, $translate, $uibModal, C
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.SHOPFLOOR") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.SHOPFLOOR") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -110,8 +110,8 @@ app.controller('ShopfloorController', function ($scope, $translate, $uibModal, C
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.SHOPFLOOR") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.SHOPFLOOR") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -144,18 +144,11 @@ app.controller('ShopfloorController', function ($scope, $translate, $uibModal, C
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.$emit('handleEmitShopfloorChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.SHOPFLOOR") }),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.SHOPFLOOR") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -153,8 +153,8 @@ app.controller('SpaceController', function ($scope, $uibModal, SpaceService, Cos
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.SPACE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.SPACE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -206,8 +206,8 @@ app.controller('SpaceController', function ($scope, $uibModal, SpaceService, Cos
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.SPACE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.SPACE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -240,18 +240,11 @@ app.controller('SpaceController', function ($scope, $uibModal, SpaceService, Cos
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.$emit('handleEmitSpaceChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.SPACE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.SPACE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ $scope.getAllStoreTypes = function() {
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant(popBody,{"TOASTER.ERROR_ADD_BODY": $translate.instant("COMMON.STORE")}),
|
||||
title: $translate.instant(popBody,{"TOASTER.ERROR_ADD_BODY": $translate.instant("COMMON.STORE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -123,8 +123,8 @@ $scope.getAllStoreTypes = function() {
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.STORE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("COMMON.STORE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -156,18 +156,11 @@ $scope.getAllStoreTypes = function() {
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.$emit('handleEmitStoreChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.STORE")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("COMMON.STORE")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ app.controller('FlatController', function($scope,$uibModal,$translate, FlatServi
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("TOASTER.FLAT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("TOASTER.FLAT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -79,8 +79,8 @@ app.controller('FlatController', function($scope,$uibModal,$translate, FlatServi
|
|||
}else{
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("TOASTER.FLAT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("TOASTER.FLAT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -115,8 +115,8 @@ app.controller('FlatController', function($scope,$uibModal,$translate, FlatServi
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("TOASTER.FLAT")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("TOASTER.FLAT")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@ app.controller('TariffController', function($scope,$uibModal,$translate, TARIFF_
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.TARIFF")}),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: $translate.instant("SETTING.TARIFF")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ app.controller('TariffController', function($scope,$uibModal,$translate, TARIFF_
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.TARIFF")}),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", {template: $translate.instant("SETTING.TARIFF")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -131,8 +131,8 @@ app.controller('TariffController', function($scope,$uibModal,$translate, TARIFF_
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.TARIFF")}),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", {template: $translate.instant("SETTING.TARIFF")}),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -158,13 +158,12 @@ app.controller('ModalAddTariffCtrl', function($scope, $timeout, $uibModalInstanc
|
|||
$scope.dtOptions = {
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
customRangeLabel: "自定义",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
timePickerIncrement: 15,
|
||||
timePickerIncrement: 1,
|
||||
singleDatePicker: true,
|
||||
};
|
||||
$scope.showPeakType = function(type) {
|
||||
|
@ -240,13 +239,12 @@ app.controller('ModalEditTariffCtrl', function($scope, $timeout, $uibModalInstan
|
|||
$scope.dtOptions = {
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
customRangeLabel: "自定义",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
timePickerIncrement: 15,
|
||||
timePickerIncrement: 1,
|
||||
singleDatePicker: true,
|
||||
};
|
||||
$scope.showPeakType = function(type) {
|
||||
|
|
|
@ -82,8 +82,8 @@ app.controller('TenantController', function ($scope, $translate, $uibModal, Cost
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.TENANT") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("COMMON.TENANT") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -135,8 +135,8 @@ app.controller('TenantController', function ($scope, $translate, $uibModal, Cost
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.TENANT") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("COMMON.TENANT") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -169,18 +169,11 @@ app.controller('TenantController', function ($scope, $translate, $uibModal, Cost
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.$emit('handleEmitTenantChanged');
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.TENANT") }),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("COMMON.TENANT") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -204,15 +197,14 @@ app.controller('ModalAddTenantCtrl', function ($scope, $uibModalInstance, params
|
|||
$scope.costcenters = params.costcenters;
|
||||
$scope.contacts = params.contacts;
|
||||
$scope.tenant = {
|
||||
lease_start_datetime_utc: moment(),
|
||||
lease_start_datetime: moment(),
|
||||
lease_end_datetime_utc: moment(),
|
||||
};
|
||||
$scope.dtOptions = {
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
customRangeLabel: "自定义",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
|
@ -220,8 +212,8 @@ app.controller('ModalAddTenantCtrl', function ($scope, $uibModalInstance, params
|
|||
singleDatePicker: true,
|
||||
};
|
||||
$scope.ok = function () {
|
||||
$scope.tenant.lease_start_datetime_utc = moment($scope.tenant.lease_start_datetime_utc).format().slice(0, 19);
|
||||
$scope.tenant.lease_end_datetime_utc = moment($scope.tenant.lease_end_datetime_utc).format().slice(0, 19);
|
||||
$scope.tenant.lease_start_datetime = moment($scope.tenant.lease_start_datetime).format().slice(0, 19);
|
||||
$scope.tenant.lease_end_datetime = moment($scope.tenant.lease_end_datetime).format().slice(0, 19);
|
||||
$uibModalInstance.close($scope.tenant);
|
||||
};
|
||||
|
||||
|
@ -239,9 +231,8 @@ app.controller('ModalEditTenantCtrl', function ($scope, $uibModalInstance, param
|
|||
$scope.dtOptions = {
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
applyLabel: "确定",
|
||||
cancelLabel: "取消",
|
||||
customRangeLabel: "自定义",
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
|
@ -249,8 +240,8 @@ app.controller('ModalEditTenantCtrl', function ($scope, $uibModalInstance, param
|
|||
singleDatePicker: true,
|
||||
};
|
||||
$scope.ok = function () {
|
||||
$scope.tenant.lease_start_datetime_utc = moment($scope.tenant.lease_start_datetime_utc).format().slice(0, 19);
|
||||
$scope.tenant.lease_end_datetime_utc = moment($scope.tenant.lease_end_datetime_utc).format().slice(0, 19);
|
||||
$scope.tenant.lease_start_datetime = moment($scope.tenant.lease_start_datetime).format().slice(0, 19);
|
||||
$scope.tenant.lease_end_datetime = moment($scope.tenant.lease_end_datetime).format().slice(0, 19);
|
||||
$uibModalInstance.close($scope.tenant);
|
||||
};
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ app.controller('PrivilegeController', function ($scope,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("USER.PRIVILEGE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("USER.PRIVILEGE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ app.controller('PrivilegeController', function ($scope,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("USER.PRIVILEGE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("USER.PRIVILEGE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -116,18 +116,11 @@ app.controller('PrivilegeController', function ($scope,
|
|||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllPrivileges();
|
||||
} else if (angular.isDefined(response.status) && response.status === 400) {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant(response.data.title),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("USER.PRIVILEGE") }),
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("USER.PRIVILEGE") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
app.controller('UserController', function ($scope,
|
||||
app.controller('UserController', function ($scope,
|
||||
$window,
|
||||
$uibModal,
|
||||
UserService,
|
||||
PrivilegeService,
|
||||
toaster,
|
||||
$translate,
|
||||
$uibModal,
|
||||
UserService,
|
||||
PrivilegeService,
|
||||
toaster,
|
||||
$translate,
|
||||
SweetAlert) {
|
||||
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
|
||||
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||
$scope.getAllUsers = function () {
|
||||
UserService.getAllUsers(function (response) {
|
||||
if (angular.isDefined(response.status) && response.status === 200) {
|
||||
|
@ -57,8 +57,8 @@ app.controller('UserController', function ($scope,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
title: $translate.instant("TOASTER.ERROR_ADD_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ app.controller('UserController', function ($scope,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ app.controller('UserController', function ($scope,
|
|||
|
||||
modalInstance.result.then(function (modifiedUser) {
|
||||
let data = {
|
||||
name: modifiedUser.name,
|
||||
name: modifiedUser.name,
|
||||
password: modifiedUser.password };
|
||||
|
||||
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||
|
@ -140,8 +140,8 @@ app.controller('UserController', function ($scope,
|
|||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
title: $translate.instant("TOASTER.ERROR_UPDATE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
|
@ -163,34 +163,33 @@ app.controller('UserController', function ($scope,
|
|||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
UserService.deleteUser(user, function (response) {
|
||||
if (angular.isDefined(response.status) && response.status === 204) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_DELETE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllUsers();
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.FAILURE_TITLE"),
|
||||
body: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
UserService.deleteUser(user, function (response) {
|
||||
if (angular.isDefined(response.status) && response.status === 204) {
|
||||
toaster.pop({
|
||||
type: "success",
|
||||
title: $translate.instant("TOASTER.SUCCESS_TITLE"),
|
||||
body: $translate.instant("TOASTER.SUCCESS_DELETE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
showCloseButton: true,
|
||||
});
|
||||
$scope.getAllUsers();
|
||||
} else {
|
||||
toaster.pop({
|
||||
type: "error",
|
||||
title: $translate.instant("TOASTER.ERROR_DELETE_BODY", { template: $translate.instant("SETTING.USER") }),
|
||||
body: $translate.instant(response.data.description),
|
||||
showCloseButton: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getAllUsers();
|
||||
$scope.getAllPrivileges();
|
||||
|
||||
|
||||
});
|
||||
|
||||
app.controller('ModalAddUserCtrl', function ($scope, $uibModalInstance, params) {
|
||||
|
@ -198,12 +197,27 @@ app.controller('ModalAddUserCtrl', function ($scope, $uibModalInstance, params)
|
|||
$scope.operation = "USER.ADD_USER";
|
||||
$scope.privileges = params.privileges;
|
||||
$scope.user = {
|
||||
is_admin: false
|
||||
is_admin: false,
|
||||
account_expiration_datetime:moment(),
|
||||
password_expiration_datetime:moment()
|
||||
};
|
||||
$scope.dtOptions = {
|
||||
locale:{
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
timePickerIncrement: 15,
|
||||
singleDatePicker: true,
|
||||
};
|
||||
$scope.ok = function () {
|
||||
if ($scope.user.is_admin) {
|
||||
$scope.user.privilege_id = undefined;
|
||||
}
|
||||
$scope.user.account_expiration_datetime = $scope.user.account_expiration_datetime.format().slice(0,19);
|
||||
$scope.user.password_expiration_datetime = $scope.user.password_expiration_datetime.format().slice(0,19);
|
||||
$uibModalInstance.close($scope.user);
|
||||
};
|
||||
|
||||
|
@ -213,7 +227,7 @@ app.controller('ModalAddUserCtrl', function ($scope, $uibModalInstance, params)
|
|||
});
|
||||
|
||||
app.controller('ModalEditUserCtrl', function ($scope, $uibModalInstance, params) {
|
||||
|
||||
|
||||
$scope.operation = "USER.EDIT_USER";
|
||||
$scope.user = params.user;
|
||||
$scope.privileges = params.privileges;
|
||||
|
@ -222,11 +236,24 @@ app.controller('ModalEditUserCtrl', function ($scope, $uibModalInstance, params)
|
|||
} else {
|
||||
$scope.user.privilege_id = undefined;
|
||||
}
|
||||
$scope.dtOptions = {
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
applyLabel: "OK",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
timePickerIncrement: 15,
|
||||
singleDatePicker: true,
|
||||
};
|
||||
$scope.ok = function () {
|
||||
if ($scope.user.is_admin) {
|
||||
$scope.user.privilege_id = undefined;
|
||||
}
|
||||
$uibModalInstance.close($scope.user);
|
||||
$scope.user.account_expiration_datetime = moment($scope.user.account_expiration_datetime).format().slice(0,19);
|
||||
$scope.user.password_expiration_datetime = moment($scope.user.password_expiration_datetime).format().slice(0,19);
|
||||
$uibModalInstance.close($scope.user);
|
||||
};
|
||||
|
||||
$scope.cancel = function () {
|
||||
|
|
|
@ -342,7 +342,6 @@ function dropZone() {
|
|||
link: function(scope, element, attrs) {
|
||||
|
||||
var config = {
|
||||
url: 'http://localhost:8080/upload',
|
||||
maxFilesize: 100,
|
||||
paramName: "uploadfile",
|
||||
maxThumbnailFilesize: 10,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Custom scripts
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
$(function () {
|
||||
|
||||
// Append config box / Only for demo purpose
|
||||
//$.get("views/skin-config.html", function (data) {
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
'use strict';
|
||||
app.factory('GSMModemService', function($http) {
|
||||
return {
|
||||
getAllGSMModems:function(callback){
|
||||
$http.get(getAPI()+'gsmmodems')
|
||||
.then(function (response) {
|
||||
callback(response);
|
||||
}, function (response) {
|
||||
callback(response);
|
||||
});
|
||||
},
|
||||
searchGSMModems: function(query, callback) {
|
||||
$http.get(getAPI()+'gsmmodems', { params: { q: query } })
|
||||
.then(function (response) {
|
||||
callback(response);
|
||||
}, function (response) {
|
||||
callback(response);
|
||||
});
|
||||
},
|
||||
addGSMModem: function(gsmmodem, callback) {
|
||||
$http.post(getAPI()+'gsmmodems',{data:gsmmodem})
|
||||
.then(function (response) {
|
||||
callback(response);
|
||||
}, function (response) {
|
||||
callback(response);
|
||||
});
|
||||
},
|
||||
editGSMModem: function(gsmmodem, callback) {
|
||||
$http.put(getAPI()+'gsmmodems/'+gsmmodem.id,{data:gsmmodem})
|
||||
.then(function (response) {
|
||||
callback(response);
|
||||
}, function (response) {
|
||||
callback(response);
|
||||
});
|
||||
},
|
||||
deleteGSMModem: function(gsmmodem, callback) {
|
||||
$http.delete(getAPI()+'gsmmodems/'+gsmmodem.id)
|
||||
.then(function (response) {
|
||||
callback(response);
|
||||
}, function (response) {
|
||||
callback(response);
|
||||
});
|
||||
},
|
||||
getGSMModem: function(id, callback) {
|
||||
$http.get(getAPI()+'gsmmodems/'+id)
|
||||
.then(function (response) {
|
||||
callback(response);
|
||||
}, function (response) {
|
||||
callback(response);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
|
@ -96,7 +96,6 @@ function config($translateProvider) {
|
|||
MENU: 'Menu Settings',
|
||||
TARIFF: 'Tariff Settings',
|
||||
EMAIL_SERVER: 'Email Server Settings',
|
||||
GSM_MODEM: 'GSM Modem Settings',
|
||||
CONTACT: 'Contacts',
|
||||
KNOWLEDGEFILE: 'Knowledge Base Settings'
|
||||
},
|
||||
|
@ -155,7 +154,6 @@ function config($translateProvider) {
|
|||
ADD_ENERGY_ITEM: 'Add Energy Item',
|
||||
ADD_CONTACT: 'Add Contact',
|
||||
ADD_EMAIL_SERVER: 'Add Email Server',
|
||||
ADD_GSM_MODEM: 'Add GSM Modem',
|
||||
|
||||
EDIT_SPACE: 'Edit Space',
|
||||
EDIT_TENANT: 'Edit Tenant',
|
||||
|
@ -169,7 +167,6 @@ function config($translateProvider) {
|
|||
EDIT_CATEGORY: 'Edit Energy Category',
|
||||
EDIT_CONTACT: 'Edit Contact',
|
||||
EDIT_EMAIL_SERVER: 'Edit Email Server',
|
||||
EDIT_GSM_MODEM: 'Edit GSM Modem',
|
||||
|
||||
REQUIRES_AUTHENTICATION: 'Requires Authentication',
|
||||
SELECT_DATE: 'Please Select Date',
|
||||
|
@ -239,8 +236,8 @@ function config($translateProvider) {
|
|||
EXPRESSION: 'Expression',
|
||||
VARIABLE_NAME: 'Variable Name',
|
||||
POINT: 'Point',
|
||||
KGCE: 'KGCE',
|
||||
KGCO2E: 'KGCO2E',
|
||||
KGCE: 'Kilogram of Standard Coal',
|
||||
KGCO2E: 'Kilogram CO2 Emission',
|
||||
|
||||
START_DATETIME: 'Start Datetime',
|
||||
START_TIME: 'Start Time',
|
||||
|
@ -388,7 +385,7 @@ function config($translateProvider) {
|
|||
SELECT_COST_CENTER: 'Please Select Cost Center',
|
||||
DESCRIPTION: 'Description',
|
||||
INPUT_DESCRIPTION: 'Please Input Description',
|
||||
INPUT_METER: 'Please Input Meter',
|
||||
INPUT_METER: 'Input Meter',
|
||||
OUTPUT_METER: 'Output Meter',
|
||||
PARAMETER: 'Parameter',
|
||||
BIND_PARAMETER: 'Bind Parameter',
|
||||
|
@ -420,7 +417,7 @@ function config($translateProvider) {
|
|||
BIND_EQUIPMENT: 'Bind Equipment',
|
||||
N_S_EQUIPMENT: 'Bound Equipments',
|
||||
EQUIPMENT_LIST: 'Equipment List',
|
||||
INPUT_METER: 'Please Input Meter',
|
||||
INPUT_METER: 'Input Meter',
|
||||
OUTPUT_METER: 'Output Meter',
|
||||
PARAMETER: 'Parameter',
|
||||
BIND_PARAMETER: 'Bind Parameter',
|
||||
|
@ -544,6 +541,8 @@ function config($translateProvider) {
|
|||
EMAIL: 'Email',
|
||||
INPUT_EMAIL: 'Please Input Email',
|
||||
INVALID_EMAIL: 'Invalid Email Format(xxx@xxx.xx)',
|
||||
ACCOUNT_EXPIRATION_DATETIME: 'Account Expiration Datetime',
|
||||
PASSWORD_EXPIRATION_DATETIME: 'Password Expiration Datetime',
|
||||
},
|
||||
KNOWLEDGEFILE: {
|
||||
KNOWLEDGE_FILE_LIST: 'Knowledge File List',
|
||||
|
@ -552,10 +551,11 @@ function config($translateProvider) {
|
|||
DELETE: 'Delete',
|
||||
},
|
||||
TOASTER: {
|
||||
FAILURE_TITLE: 'Error',
|
||||
SUCCESS_TITLE: 'Success',
|
||||
LOGIN_SUCCESS: 'Login Success',
|
||||
LOGIN_FAILURE: 'Login Failure',
|
||||
LOGOUT_SUCCESS: 'Logout Success',
|
||||
LOGOUT_FAILURE: 'Logout Failure',
|
||||
|
||||
SUCCESS_ADD_BODY: 'Add {{template}} Success',
|
||||
SUCCESS_UPDATE_BODY: 'Update {{template}} Success',
|
||||
|
@ -666,8 +666,6 @@ function config($translateProvider) {
|
|||
FAILED_TO_UPLOAD_OFFLINE_METER_FILE: 'Failed To Upload Offline Meter File',
|
||||
GATEWAY_NAME_IS_ALREADY_IN_USE: 'Gateway Name Is Already In Use',
|
||||
GATEWAY_NOT_FOUND: 'Gateway Not Found',
|
||||
GSM_MODEM_NOT_FOUND: 'Gsm Modem Not Found',
|
||||
GSM_MODEM_SERIAL_PORT_IS_ALREADY_IN_USE: 'Gsm Modem Serial Port Is Already In Use',
|
||||
INVALID_ADDRESS: 'Invalid Address',
|
||||
INVALID_ADDRESS_VALUE: 'Invalid Address Value',
|
||||
INVALID_ADVANCED_REPORT_ID: 'Invalid Advanced Report ID',
|
||||
|
@ -727,7 +725,6 @@ function config($translateProvider) {
|
|||
INVALID_FROM_ADDR: 'Invalid From Address',
|
||||
INVALID_GATEWAY_ID: 'Invalid Gateway ID',
|
||||
INVALID_GATEWAY_NAME: 'Invalid Gateway Name',
|
||||
INVALID_GSM_MODEM_ID: 'Invalid Gsm Modem ID',
|
||||
INVALID_HOURLY_HIGH_LIMIT_VALUE: 'Invalid Hourly High Limit Value',
|
||||
INVALID_HOURLY_LOW_LIMIT_VALUE: 'Invalid Hourly Low Limit Value',
|
||||
INVALID_IS_ADMIN_VALUE: 'Invalid Is Admin Value',
|
||||
|
@ -834,6 +831,7 @@ function config($translateProvider) {
|
|||
INVALID_VIRTUAL_METER_NAME: 'Invalid Virtual Meter Name',
|
||||
INVALID_WEB_MESSAGE_ID: 'Invalid Web Message ID',
|
||||
INVALID_WECHAT_MESSAGE_ID: 'Invalid Wechat Message ID',
|
||||
KNOWLEDGE_FILE_CANNOT_BE_REMOVED_FROM_DISK: 'Knowledge File Cannot be Removed from Disk',
|
||||
KNOWLEDGE_FILE_NOT_FOUND: 'Knowledge File Not Found',
|
||||
MASTER_METER_DOES_NOT_BELONG_TO_SAME_ENERGY_CATEGORY: 'Master Meter Does Not Belong To Same Energy Category',
|
||||
MASTER_METER_NOT_FOUND: 'Master Meter Not Found',
|
||||
|
@ -971,8 +969,10 @@ function config($translateProvider) {
|
|||
THIS_SPACE_CANNOT_BE_DELETED: 'This Space Cannot Be Deleted',
|
||||
TIMEZONE_NOT_FOUND: 'Timezone Not Found',
|
||||
TOKEN_NOT_FOUND_IN_HEADERS_PLEASE_LOGIN: 'Token Not Found In Headers Please Login',
|
||||
USER_ACCOUNT_HAS_EXPIRED: 'User Account Has Expired',
|
||||
USER_NAME_IS_ALREADY_IN_USE: 'User Name Is Already In Use',
|
||||
USER_NOT_FOUND: 'User Not Found',
|
||||
USER_PASSWORD_HAS_EXPIRED: 'User Password Has Expired',
|
||||
USER_PRIVILEGE_NOT_FOUND: 'User Privilege Not Found',
|
||||
USER_SESSION_NOT_FOUND: 'User Session Not Found',
|
||||
USER_SESSION_TIMEOUT: 'User Session Timeout',
|
||||
|
@ -985,7 +985,7 @@ function config($translateProvider) {
|
|||
WECHAT_MESSAGE_NOT_FOUND: 'Wechat Message Not Found',
|
||||
},
|
||||
})
|
||||
.translations('cn', {
|
||||
.translations('zh_CN', {
|
||||
MY_EMS_NAME: 'MyEMS',
|
||||
LANGUAGE: '语 言',
|
||||
FULLSCREEN: '全屏显示',
|
||||
|
@ -1075,7 +1075,6 @@ function config($translateProvider) {
|
|||
MENU: '菜单管理',
|
||||
TARIFF: '能源费率管理',
|
||||
EMAIL_SERVER: '邮件服务器设置',
|
||||
GSM_MODEM: '短信模块设置',
|
||||
CONTACT: '联系人管理',
|
||||
KNOWLEDGEFILE: '知识库管理'
|
||||
},
|
||||
|
@ -1134,7 +1133,6 @@ function config($translateProvider) {
|
|||
ADD_ENERGY_ITEM: '添加能耗分项',
|
||||
ADD_CONTACT: '添加联系人',
|
||||
ADD_EMAIL_SERVER: '添加邮件服务器',
|
||||
ADD_GSM_MODEM: '添加短信模块',
|
||||
|
||||
EDIT_SPACE: '编辑空间',
|
||||
EDIT_TENANT: '编辑租户',
|
||||
|
@ -1149,7 +1147,6 @@ function config($translateProvider) {
|
|||
EDIT_ENERGY_ITEM: '编辑能耗分项',
|
||||
EDIT_CONTACT: '编辑联系人',
|
||||
EDIT_EMAIL_SERVER: '编辑邮箱服务器',
|
||||
EDIT_GSM_MODEM: '编辑短信模块',
|
||||
|
||||
REQUIRES_AUTHENTICATION: '需要身份验证',
|
||||
SELECT_DATE: '请选择日期',
|
||||
|
@ -1173,8 +1170,8 @@ function config($translateProvider) {
|
|||
INPUT_UNIT: '请输入单位',
|
||||
INPUT_CONTACT: '请输入联系人',
|
||||
INPUT_EXPRESSION: '请输入表达式',
|
||||
INPUT_KGCE: '请输入标准煤系数',
|
||||
INPUT_KGCO2E: '请输入二氧化碳排放系数',
|
||||
INPUT_KGCE: '请输入千克标准煤',
|
||||
INPUT_KGCO2E: '请输入千克二氧化碳排放',
|
||||
INPUT_HOST: '请输入服务器',
|
||||
INPUT_PORT: '请输入端口号',
|
||||
INPUT_USER_NAME: '请输入用户名',
|
||||
|
@ -1183,7 +1180,6 @@ function config($translateProvider) {
|
|||
INPUT_BAUD_RATE: '请输入波特率',
|
||||
|
||||
EMAIL_SERVER: '邮件服务器',
|
||||
GSM_MODEM: '短信模块',
|
||||
INVALID_FORMAT: '格式不正确',
|
||||
INVALID_FROM_ADDR: '发件人地址不正确',
|
||||
INVALID_BAUD_RATE: '波特率不正确',
|
||||
|
@ -1221,8 +1217,8 @@ function config($translateProvider) {
|
|||
EXPRESSION: '表达式',
|
||||
VARIABLE_NAME: '变量名',
|
||||
POINT: '数据点',
|
||||
KGCE: '标准煤系数',
|
||||
KGCO2E: '二氧化碳排放系数',
|
||||
KGCE: '千克标准煤',
|
||||
KGCO2E: '千克二氧化碳排放',
|
||||
|
||||
START_DATETIME: '起始时间',
|
||||
START_TIME: '开始时间',
|
||||
|
@ -1318,7 +1314,7 @@ function config($translateProvider) {
|
|||
INPUT_SVG: '请输入SVG',
|
||||
DESCRIPTION: '描述',
|
||||
DISTRIBUTION_CIRCUIT: '配电回路',
|
||||
N_S_DISTRIBUTION_CIRCUIT: '所属配电回路',
|
||||
N_S_DISTRIBUTION_CIRCUIT: '附属配电回路',
|
||||
ADD_DISTRIBUTION_CIRCUIT: '添加配电回路',
|
||||
EDIT_DISTRIBUTION_CIRCUIT: '编辑配电回路',
|
||||
SELECT_DISTRIBUTION_CIRCUIT: '请选择配电回路',
|
||||
|
@ -1345,14 +1341,14 @@ function config($translateProvider) {
|
|||
EDIT_ENERGY_FLOW_DIAGRAM: '编辑能流图',
|
||||
SELECT_ENERGY_FLOW_DIAGRAM: '请选择能流图',
|
||||
NODE: '节点',
|
||||
N_S_NODE: ' 所属节点',
|
||||
N_S_NODE: ' 附属节点',
|
||||
ADD_NODE: '添加节点',
|
||||
EDIT_NODE: '编辑节点',
|
||||
NODE_ID: '节点ID',
|
||||
NODE_NAME: '节点名称',
|
||||
INPUT_NODE_NAME: '请输入节点名称',
|
||||
LINK: '链接',
|
||||
N_S_LINK: ' 所属链接',
|
||||
N_S_LINK: ' 附属链接',
|
||||
LINK_ID: '链接ID',
|
||||
ADD_LINK: '添加链接',
|
||||
EDIT_LINK: '编辑链接',
|
||||
|
@ -1372,14 +1368,14 @@ function config($translateProvider) {
|
|||
BIND_EQUIPMENT: '绑定设备',
|
||||
N_S_EQUIPMENT: '绑定的设备',
|
||||
EQUIPMENT_LIST: '设备列表',
|
||||
INPUT_METER: '请输入表',
|
||||
INPUT_DESCRIPTION: '请输入描述',
|
||||
INPUT_METER: '输入表',
|
||||
OUTPUT_METER: '输出表',
|
||||
PARAMETER: '参数',
|
||||
BIND_PARAMETER: '绑定参数',
|
||||
ADD_PARAMETER: '添加参数',
|
||||
EDIT_PARAMETER: '编辑参数',
|
||||
N_S_PARAMETER: '所含参数',
|
||||
N_S_PARAMETER: '附属参数',
|
||||
PARAMETER_ID: 'ID',
|
||||
PARAMETER_NAME: '名称',
|
||||
INPUT_PARAMETER_NAME: '请输入名称',
|
||||
|
@ -1401,14 +1397,14 @@ function config($translateProvider) {
|
|||
COST_CENTER: '成本中心',
|
||||
SELECT_COST_CENTER: '请选择成本中心',
|
||||
DESCRIPTION: '描述',
|
||||
INPUT_METER: '请输入表',
|
||||
INPUT_DESCRIPTION: '请输入描述',
|
||||
INPUT_METER: '输入表',
|
||||
OUTPUT_METER: '输出表',
|
||||
PARAMETER: '参数',
|
||||
BIND_PARAMETER: '绑定参数',
|
||||
ADD_PARAMETER: '添加参数',
|
||||
EDIT_PARAMETER: '编辑参数',
|
||||
N_S_PARAMETER: '所含参数',
|
||||
N_S_PARAMETER: '附属参数',
|
||||
PARAMETER_ID: 'ID',
|
||||
PARAMETER_NAME: '名称',
|
||||
INPUT_PARAMETER_NAME: '请输入名称',
|
||||
|
@ -1529,6 +1525,8 @@ function config($translateProvider) {
|
|||
EMAIL: '邮箱',
|
||||
INPUT_EMAIL: '请输入邮箱',
|
||||
INVALID_EMAIL: '邮箱格式不正确(xxx@xxx.xx)',
|
||||
ACCOUNT_EXPIRATION_DATETIME: '账户失效时间',
|
||||
PASSWORD_EXPIRATION_DATETIME: '密码失效时间',
|
||||
},
|
||||
KNOWLEDGEFILE: {
|
||||
KNOWLEDGE_FILE_LIST: '知识文件列表',
|
||||
|
@ -1537,10 +1535,11 @@ function config($translateProvider) {
|
|||
DELETE: '删除',
|
||||
},
|
||||
TOASTER: {
|
||||
FAILURE_TITLE: '错误',
|
||||
SUCCESS_TITLE: '成功',
|
||||
LOGIN_SUCCESS: '登录成功。',
|
||||
LOGIN_FAILURE: '登录失败。',
|
||||
LOGIN_SUCCESS: '登录成功',
|
||||
LOGIN_FAILURE: '登录失败',
|
||||
LOGOUT_SUCCESS: '退出成功',
|
||||
LOGOUT_FAILURE: '退出失败',
|
||||
|
||||
SUCCESS_ADD_BODY: '添加 {{template}} 成功',
|
||||
SUCCESS_UPDATE_BODY: '更新 {{template}} 成功',
|
||||
|
@ -1579,7 +1578,7 @@ function config($translateProvider) {
|
|||
ADMINISTRATOR_SESSION_NOT_FOUND: 'Administrator Session Not Found',
|
||||
ADMINISTRATOR_SESSION_TIMEOUT: 'Administrator Session Timeout',
|
||||
ADVANCED_REPORT_NOT_FOUND: 'Advanced Report Not Found',
|
||||
BAD_REQUEST: '错误的请求',
|
||||
BAD_REQUEST: 'Bad Request',
|
||||
CANNOT_SET_EXISTING_SUBMETER_AS_MASTER_METER: 'Cannot Set Existing Submeter As Master Meter',
|
||||
COMBINED_EQUIPMENT_EQUIPMENT_RELATION_EXISTS: 'Combined Equipment Equipment Relation Exists',
|
||||
COMBINED_EQUIPMENT_EQUIPMENT_RELATION_NOT_FOUND: 'Combined Equipment Equipment Relation Not Found',
|
||||
|
@ -1653,8 +1652,6 @@ function config($translateProvider) {
|
|||
FAILED_TO_UPLOAD_OFFLINE_METER_FILE: 'Failed To Upload Offline Meter File',
|
||||
GATEWAY_NAME_IS_ALREADY_IN_USE: 'Gateway Name Is Already In Use',
|
||||
GATEWAY_NOT_FOUND: 'Gateway Not Found',
|
||||
GSM_MODEM_NOT_FOUND: 'Gsm Modem Not Found',
|
||||
GSM_MODEM_SERIAL_PORT_IS_ALREADY_IN_USE: 'Gsm Modem Serial Port Is Already In Use',
|
||||
INVALID_ADDRESS: 'Invalid Address',
|
||||
INVALID_ADDRESS_VALUE: 'Invalid Address Value',
|
||||
INVALID_ADVANCED_REPORT_ID: 'Invalid Advanced Report ID',
|
||||
|
@ -1714,7 +1711,6 @@ function config($translateProvider) {
|
|||
INVALID_FROM_ADDR: 'Invalid From Address',
|
||||
INVALID_GATEWAY_ID: 'Invalid Gateway ID',
|
||||
INVALID_GATEWAY_NAME: 'Invalid Gateway Name',
|
||||
INVALID_GSM_MODEM_ID: 'Invalid Gsm Modem ID',
|
||||
INVALID_HOURLY_HIGH_LIMIT_VALUE: 'Invalid Hourly High Limit Value',
|
||||
INVALID_HOURLY_LOW_LIMIT_VALUE: 'Invalid Hourly Low Limit Value',
|
||||
INVALID_IS_ADMIN_VALUE: 'Invalid Is Admin Value',
|
||||
|
@ -1821,6 +1817,7 @@ function config($translateProvider) {
|
|||
INVALID_VIRTUAL_METER_NAME: 'Invalid Virtual Meter Name',
|
||||
INVALID_WEB_MESSAGE_ID: 'Invalid Web Message ID',
|
||||
INVALID_WECHAT_MESSAGE_ID: 'Invalid Wechat Message ID',
|
||||
KNOWLEDGE_FILE_CANNOT_BE_REMOVED_FROM_DISK: 'Knowledge File Cannot be Removed from Disk',
|
||||
KNOWLEDGE_FILE_NOT_FOUND: 'Knowledge File Not Found',
|
||||
MASTER_METER_DOES_NOT_BELONG_TO_SAME_ENERGY_CATEGORY: 'Master Meter Does Not Belong To Same Energy Category',
|
||||
MASTER_METER_NOT_FOUND: 'Master Meter Not Found',
|
||||
|
@ -1958,8 +1955,10 @@ function config($translateProvider) {
|
|||
THIS_SPACE_CANNOT_BE_DELETED: 'This Space Cannot Be Deleted',
|
||||
TIMEZONE_NOT_FOUND: 'Timezone Not Found',
|
||||
TOKEN_NOT_FOUND_IN_HEADERS_PLEASE_LOGIN: 'Token Not Found In Headers Please Login',
|
||||
USER_ACCOUNT_HAS_EXPIRED: 'User Account Has Expired',
|
||||
USER_NAME_IS_ALREADY_IN_USE: 'User Name Is Already In Use',
|
||||
USER_NOT_FOUND: 'User Not Found',
|
||||
USER_PASSWORD_HAS_EXPIRED: 'User Password Has Expired',
|
||||
USER_PRIVILEGE_NOT_FOUND: 'User Privilege Not Found',
|
||||
USER_SESSION_NOT_FOUND: 'User Session Not Found',
|
||||
USER_SESSION_TIMEOUT: 'User Session Timeout',
|
||||
|
@ -2062,7 +2061,6 @@ function config($translateProvider) {
|
|||
MENU: 'Verwaltung des Menüs',
|
||||
TARIFF: 'Energieratenmanagement',
|
||||
EMAIL_SERVER: 'Mailserver-Einstellungen',
|
||||
GSM_MODEM: 'SMS-Moduleinstellungen',
|
||||
CONTACT: 'Kontaktmanagement',
|
||||
KNOWLEDGEFILE: 'Wissensdatenbankverwaltung'
|
||||
},
|
||||
|
@ -2121,7 +2119,6 @@ function config($translateProvider) {
|
|||
ADD_ENERGY_ITEM: 'Unterelemente zum Energieverbrauch hinzufügen',
|
||||
ADD_CONTACT: 'Kontakt hinzufügen',
|
||||
ADD_EMAIL_SERVER: 'Mail-Server hinzufügen',
|
||||
ADD_GSM_MODEM: 'SMS-Modul hinzufügen',
|
||||
|
||||
EDIT_SPACE: 'Leerzeichen bearbeiten',
|
||||
EDIT_TENANT: 'Mieter bearbeiten',
|
||||
|
@ -2136,7 +2133,6 @@ function config($translateProvider) {
|
|||
EDIT_ENERGY_ITEM: 'Unterelemente zum Energieverbrauch bearbeiten',
|
||||
EDIT_CONTACT: 'Kontakt bearbeiten',
|
||||
EDIT_EMAIL_SERVER: 'Postfachserver bearbeiten',
|
||||
EDIT_GSM_MODEM: 'SMS-Modul bearbeiten',
|
||||
|
||||
REQUIRES_AUTHENTICATION: 'Authentifizierung erforderlich',
|
||||
SELECT_DATE: 'Bitte wählen Sie ein Datum',
|
||||
|
@ -2160,8 +2156,8 @@ function config($translateProvider) {
|
|||
INPUT_UNIT: 'Bitte geben Sie eine Einheit ein',
|
||||
INPUT_CONTACT: 'Bitte geben Sie einen Kontakt ein',
|
||||
INPUT_EXPRESSION: 'Bitte geben Sie einen Ausdruck ein',
|
||||
INPUT_KGCE: 'Bitte geben Sie den Standardkohlekoeffizienten ein',
|
||||
INPUT_KGCO2E: 'Bitte geben Sie den CO2-Emissionsfaktor ein',
|
||||
INPUT_KGCE: 'Bitte geben Sie den Kilogramm Standardkohle ein',
|
||||
INPUT_KGCO2E: 'Bitte geben Sie Kilogramm Kohlendioxid-Emissionen ein',
|
||||
INPUT_HOST: 'Bitte geben Sie den Server ein',
|
||||
INPUT_PORT: 'Bitte geben Sie die Portnummer ein',
|
||||
INPUT_USER_NAME: 'Bitte geben sie einen Benutzernamen ein',
|
||||
|
@ -2170,7 +2166,6 @@ function config($translateProvider) {
|
|||
INPUT_BAUD_RATE: 'Bitte geben Sie die Baudrate ein',
|
||||
|
||||
EMAIL_SERVER: 'Mail-Server',
|
||||
GSM_MODEM: 'SMS-Modul',
|
||||
INVALID_FORMAT: 'Falsches Format',
|
||||
INVALID_FROM_ADDR: 'Falsche Absenderadresse',
|
||||
INVALID_BAUD_RATE: 'Falsche Baudrate',
|
||||
|
@ -2208,8 +2203,8 @@ function config($translateProvider) {
|
|||
EXPRESSION: 'Ausdruck',
|
||||
VARIABLE_NAME: 'Variablennamen',
|
||||
POINT: 'Datenpunkt',
|
||||
KGCE: 'Standardkohlekoeffizient',
|
||||
KGCO2E: 'CO2-Emissionsfaktor',
|
||||
KGCE: 'Kilogramm Standardkohle',
|
||||
KGCO2E: 'Kilogramm CO2-Emission',
|
||||
|
||||
START_DATETIME: 'Startzeit',
|
||||
START_TIME: 'Anfangszeit',
|
||||
|
@ -2358,9 +2353,9 @@ function config($translateProvider) {
|
|||
BIND_EQUIPMENT: 'Gerät binden',
|
||||
N_S_EQUIPMENT: 'Gebundenes Gerät',
|
||||
EQUIPMENT_LIST: 'Geräteliste',
|
||||
INPUT_METER: 'Bitte geben Sie die Tabelle ein',
|
||||
INPUT_DESCRIPTION: 'Bitte geben Sie eine Beschreibung ein',
|
||||
OUTPUT_METER: 'Ausgabetabelle',
|
||||
INPUT_METER: 'Input Meter',
|
||||
OUTPUT_METER: 'Output Meter',
|
||||
PARAMETER: 'Parameter',
|
||||
BIND_PARAMETER: 'Bindungsparameter',
|
||||
ADD_PARAMETER: 'Parameter hinzufügen',
|
||||
|
@ -2387,9 +2382,9 @@ function config($translateProvider) {
|
|||
COST_CENTER: 'Kostenstelle',
|
||||
SELECT_COST_CENTER: 'Bitte wählen Sie eine Kostenstelle',
|
||||
DESCRIPTION: 'Beschreibung',
|
||||
INPUT_METER: 'Bitte geben Sie die Tabelle ein',
|
||||
INPUT_DESCRIPTION: 'Bitte geben Sie eine Beschreibung ein',
|
||||
OUTPUT_METER: 'Ausgabetabelle',
|
||||
INPUT_METER: 'Input Meter',
|
||||
OUTPUT_METER: 'Output Meter',
|
||||
PARAMETER: 'Parameter',
|
||||
BIND_PARAMETER: 'Bindungsparameter',
|
||||
ADD_PARAMETER: 'Parameter hinzufügen',
|
||||
|
@ -2515,6 +2510,8 @@ function config($translateProvider) {
|
|||
EMAIL: 'Briefkasten',
|
||||
INPUT_EMAIL: 'Bitte geben Sie Ihre E-Mail-Adresse ein',
|
||||
INVALID_EMAIL: 'Falsches E-Mail-Format (xxx@xxx.xx)',
|
||||
ACCOUNT_EXPIRATION_DATETIME: 'Ablaufdatum des Kontos',
|
||||
PASSWORD_EXPIRATION_DATETIME: 'Ablaufdatum des Passworts',
|
||||
},
|
||||
KNOWLEDGEFILE: {
|
||||
KNOWLEDGE_FILE_LIST: 'Liste der Wissensdateien',
|
||||
|
@ -2523,10 +2520,11 @@ function config($translateProvider) {
|
|||
DELETE: 'löschen',
|
||||
},
|
||||
TOASTER: {
|
||||
FAILURE_TITLE: 'Error',
|
||||
SUCCESS_TITLE: 'Erfolg',
|
||||
LOGIN_SUCCESS: 'Anmeldung erfolgreich',
|
||||
LOGIN_FAILURE: 'Login fehlgeschlagen',
|
||||
LOGOUT_SUCCESS: 'Abmeldung erfolgreich',
|
||||
LOGOUT_FAILURE: 'Abmeldefehler',
|
||||
|
||||
SUCCESS_ADD_BODY: 'Fügen Sie {{template}} erfolgreich hinzu',
|
||||
SUCCESS_UPDATE_BODY: 'Update {{template}} erfolgreich',
|
||||
|
@ -2639,8 +2637,6 @@ function config($translateProvider) {
|
|||
FAILED_TO_UPLOAD_OFFLINE_METER_FILE: 'Failed To Upload Offline Meter File',
|
||||
GATEWAY_NAME_IS_ALREADY_IN_USE: 'Gateway Name Is Already In Use',
|
||||
GATEWAY_NOT_FOUND: 'Gateway Not Found',
|
||||
GSM_MODEM_NOT_FOUND: 'Gsm Modem Not Found',
|
||||
GSM_MODEM_SERIAL_PORT_IS_ALREADY_IN_USE: 'Gsm Modem Serial Port Is Already In Use',
|
||||
INVALID_ADDRESS: 'Invalid Address',
|
||||
INVALID_ADDRESS_VALUE: 'Invalid Address Value',
|
||||
INVALID_ADVANCED_REPORT_ID: 'Invalid Advanced Report ID',
|
||||
|
@ -2700,7 +2696,6 @@ function config($translateProvider) {
|
|||
INVALID_FROM_ADDR: 'Invalid From Address',
|
||||
INVALID_GATEWAY_ID: 'Invalid Gateway ID',
|
||||
INVALID_GATEWAY_NAME: 'Invalid Gateway Name',
|
||||
INVALID_GSM_MODEM_ID: 'Invalid Gsm Modem ID',
|
||||
INVALID_HOURLY_HIGH_LIMIT_VALUE: 'Invalid Hourly High Limit Value',
|
||||
INVALID_HOURLY_LOW_LIMIT_VALUE: 'Invalid Hourly Low Limit Value',
|
||||
INVALID_IS_ADMIN_VALUE: 'Invalid Is Admin Value',
|
||||
|
@ -2807,6 +2802,7 @@ function config($translateProvider) {
|
|||
INVALID_VIRTUAL_METER_NAME: 'Invalid Virtual Meter Name',
|
||||
INVALID_WEB_MESSAGE_ID: 'Invalid Web Message ID',
|
||||
INVALID_WECHAT_MESSAGE_ID: 'Invalid Wechat Message ID',
|
||||
KNOWLEDGE_FILE_CANNOT_BE_REMOVED_FROM_DISK: 'Knowledge File Cannot be Removed from Disk',
|
||||
KNOWLEDGE_FILE_NOT_FOUND: 'Knowledge File Not Found',
|
||||
MASTER_METER_DOES_NOT_BELONG_TO_SAME_ENERGY_CATEGORY: 'Master Meter Does Not Belong To Same Energy Category',
|
||||
MASTER_METER_NOT_FOUND: 'Master Meter Not Found',
|
||||
|
@ -2944,8 +2940,10 @@ function config($translateProvider) {
|
|||
THIS_SPACE_CANNOT_BE_DELETED: 'This Space Cannot Be Deleted',
|
||||
TIMEZONE_NOT_FOUND: 'Timezone Not Found',
|
||||
TOKEN_NOT_FOUND_IN_HEADERS_PLEASE_LOGIN: 'Token Not Found In Headers Please Login',
|
||||
USER_ACCOUNT_HAS_EXPIRED: 'User Account Has Expired',
|
||||
USER_NAME_IS_ALREADY_IN_USE: 'User Name Is Already In Use',
|
||||
USER_NOT_FOUND: 'User Not Found',
|
||||
USER_PASSWORD_HAS_EXPIRED: 'User Password Has Expired',
|
||||
USER_PRIVILEGE_NOT_FOUND: 'User Privilege Not Found',
|
||||
USER_SESSION_NOT_FOUND: 'User Session Not Found',
|
||||
USER_SESSION_TIMEOUT: 'User Session Timeout',
|
||||
|
@ -2959,7 +2957,7 @@ function config($translateProvider) {
|
|||
},
|
||||
})
|
||||
;
|
||||
var lang = window.localStorage.getItem("language") || "cn";
|
||||
var lang = window.localStorage.getItem("myems_admin_ui_language") || "zh_CN";
|
||||
|
||||
$translateProvider.preferredLanguage(lang);
|
||||
|
||||
|
|
|
@ -193,6 +193,14 @@
|
|||
.dropzone .dz-message {
|
||||
text-align: center;
|
||||
margin: 2em 0; }
|
||||
.dropzone .dz-message .dz-button {
|
||||
background: none;
|
||||
color: inherit;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
outline: inherit; }
|
||||
.dropzone .dz-preview {
|
||||
position: relative;
|
||||
display: inline-block;
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Beautify Dropzone
|
||||
*
|
||||
* @author Uday Hiwarale <uhiwarale@gmail.com>
|
||||
* https://www.github.com/thatisuday/ngDropzone
|
||||
*
|
||||
* Remove huge border radius, odd colors
|
||||
* Remove unnecessary preview elements like size, name etc.
|
||||
* Use .md, .sm, .xs classes with .dropzone class for smaller thumbnail previews
|
||||
* * * * * * * * * * * * * * *
|
||||
* Make sure you set font family property in body else add below style to your dropzones
|
||||
* font-family:sans-serif;
|
||||
**/
|
||||
.dropzone {
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #eee;
|
||||
/* Drop message */
|
||||
/* Preview */ }
|
||||
.dropzone .dz-message {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
font-weight: 300;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase; }
|
||||
.dropzone .dz-preview {
|
||||
margin: 5px;
|
||||
min-height: auto;
|
||||
/* Preview image */
|
||||
/* Preview info */
|
||||
/* Progress */
|
||||
/* Callback icons */
|
||||
/* Error */
|
||||
/* Remove file */ }
|
||||
.dropzone .dz-preview.dz-file-preview .dz-image {
|
||||
border-radius: 3px; }
|
||||
.dropzone .dz-preview .dz-image {
|
||||
border-radius: 3px; }
|
||||
.dropzone .dz-preview .dz-size,
|
||||
.dropzone .dz-preview .dz-filename {
|
||||
display: none; }
|
||||
.dropzone .dz-preview .dz-progress {
|
||||
left: 0;
|
||||
width: 90%;
|
||||
border-radius: 3px;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%; }
|
||||
.dropzone .dz-preview .dz-progress .dz-upload {
|
||||
background: #8BC34A;
|
||||
background: -webkit-linear-gradient(top, #E6EE9C, #8BC34A);
|
||||
background: linear-gradient(to bottom, #E6EE9C, #8BC34A); }
|
||||
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%; }
|
||||
.dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
|
||||
position: absolute;
|
||||
margin-top: -6px;
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%); }
|
||||
.dropzone .dz-preview.dz-error .dz-error-message {
|
||||
top: auto;
|
||||
left: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
line-height: 14px;
|
||||
border-radius: 3px;
|
||||
background: #FF9800;
|
||||
background: -webkit-linear-gradient(top, #FFA726, #FF9800);
|
||||
background: linear-gradient(to bottom, #FFA726, #FF9800);
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
margin-left: -10px; }
|
||||
.dropzone .dz-preview.dz-error .dz-error-message:after {
|
||||
border-bottom: 6px solid #FF9800; }
|
||||
.dropzone .dz-preview .dz-remove {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
padding: 3px 0;
|
||||
background-color: rgba(100, 100, 100, 0.5);
|
||||
font-weight: 300;
|
||||
z-index: 10;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-decoration: none; }
|
||||
.dropzone.md .dz-preview .dz-image {
|
||||
width: 100px;
|
||||
height: 100px; }
|
||||
.dropzone.md .dz-preview.dz-error .dz-error-message {
|
||||
margin-left: -20px; }
|
||||
.dropzone.sm .dz-preview .dz-image {
|
||||
width: 80px;
|
||||
height: 80px; }
|
||||
.dropzone.sm .dz-preview.dz-error .dz-error-message {
|
||||
margin-left: -30px; }
|
||||
.dropzone.sm .dz-preview .dz-remove {
|
||||
font-size: 10px; }
|
||||
.dropzone.xs .dz-preview .dz-image {
|
||||
width: 60px;
|
||||
height: 60px; }
|
||||
.dropzone.xs .dz-preview.dz-error .dz-error-message {
|
||||
margin-left: -40px; }
|
||||
.dropzone.xs .dz-preview .dz-remove {
|
||||
font-size: 9px; }
|
|
@ -26,8 +26,8 @@
|
|||
<!-- Main Inspinia CSS files -->
|
||||
<link href="css/animate.css" rel="stylesheet">
|
||||
<link href="js/plugins/angular-loading-bar/loading-bar.css" rel="stylesheet">
|
||||
<link href="js/dropzone/basic.css" rel="stylesheet">
|
||||
<link href="js/dropzone/dropzone.css" rel="stylesheet">
|
||||
<link href="css/plugins/dropzone/basic.css" rel="stylesheet">
|
||||
<link href="css/plugins/dropzone/dropzone.css" rel="stylesheet">
|
||||
<link id="loadBefore" href="css/style.css" rel="stylesheet">
|
||||
<link id="loadBefore" href="css/myems.css" rel="stylesheet">
|
||||
<link href="css/plugins/jsTree/style.min.css" rel="stylesheet">
|
||||
|
@ -47,7 +47,7 @@
|
|||
<script src="js/jquery/jquery.panzoom.min.js"></script>
|
||||
<script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script src="js/bootstrap/bootstrap.min.js"></script>
|
||||
<script src="js/dropzone/dropzone.js"></script>
|
||||
<script src="js/plugins/dropzone/dropzone.js"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery.event.props.push('dataTransfer');
|
||||
Dropzone.autoDiscover = false;
|
||||
|
@ -67,7 +67,7 @@
|
|||
<script src="js/angular/angular.min.js"></script>
|
||||
<script src="js/angular/angular-sanitize.js"></script>
|
||||
<script src="js/angular-highcharts/highcharts-ng.js"></script>
|
||||
<script src="js/dropzone/ng-dropzone.js"></script>
|
||||
<script src="js/plugins/dropzone/ng-dropzone.js"></script>
|
||||
<script src="js/plugins/oclazyload/dist/ocLazyLoad.min.js"></script>
|
||||
<script src="js/angular-translate/angular-translate.min.js"></script>
|
||||
<script src="js/ui-router/angular-ui-router.min.js"></script>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,99 +0,0 @@
|
|||
/**!
|
||||
* AngularJS dropzone directive
|
||||
* @author Uday Hiwarale <uhiwarale@gmail.com>
|
||||
* https://www.github.com/thatisuday/ngDropzone
|
||||
*/
|
||||
|
||||
|
||||
(function(){
|
||||
'use strict';
|
||||
|
||||
angular.module('thatisuday.dropzone', []).provider('dropzoneOps', function(){
|
||||
/*
|
||||
* Add default options here
|
||||
**/
|
||||
var defOps = {
|
||||
//Add your options here
|
||||
};
|
||||
|
||||
return {
|
||||
setOptions : function(newOps){
|
||||
angular.extend(defOps, newOps);
|
||||
},
|
||||
$get : function(){
|
||||
return defOps;
|
||||
}
|
||||
}
|
||||
}).directive('ngDropzone', ['$timeout', 'dropzoneOps', function($timeout, dropzoneOps){
|
||||
return {
|
||||
restrict : 'AE',
|
||||
template : '<div></div>',
|
||||
replace : true,
|
||||
scope : {
|
||||
options : '=?', //http://www.dropzonejs.com/#configuration-options
|
||||
callbacks : '=?', //http://www.dropzonejs.com/#events
|
||||
methods : '=?' //http://www.dropzonejs.com/#dropzone-methods
|
||||
},
|
||||
link : function(scope, iElem, iAttr){
|
||||
//Set options for dropzone {override from dropzone options provider}
|
||||
scope.options = scope.options || {};
|
||||
var initOps = angular.extend({}, dropzoneOps, scope.options);
|
||||
|
||||
|
||||
//Instantiate dropzone with initOps
|
||||
var dropzone = new Dropzone(iElem[0], initOps);
|
||||
|
||||
|
||||
/*********************************************/
|
||||
|
||||
|
||||
//Instantiate Dropzone methods (Control actions)
|
||||
scope.methods = scope.methods || {};
|
||||
|
||||
scope.methods.getDropzone = function(){
|
||||
return dropzone; //Return dropzone instance
|
||||
};
|
||||
|
||||
scope.methods.getAllFiles = function(){
|
||||
return dropzone.files; //Return all files
|
||||
};
|
||||
|
||||
var controlMethods = [
|
||||
'removeFile', 'removeAllFiles', 'processQueue',
|
||||
'getAcceptedFiles', 'getRejectedFiles', 'getQueuedFiles', 'getUploadingFiles',
|
||||
'disable', 'enable', 'confirm', 'createThumbnailFromUrl'
|
||||
];
|
||||
|
||||
angular.forEach(controlMethods, function(methodName){
|
||||
scope.methods[methodName] = function(){
|
||||
dropzone[methodName].apply(dropzone, arguments);
|
||||
if(!scope.$$phase && !scope.$root.$$phase) scope.$apply();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*********************************************/
|
||||
|
||||
|
||||
//Set invents (callbacks)
|
||||
if(scope.callbacks){
|
||||
var callbackMethods = [
|
||||
'drop', 'dragstart', 'dragend',
|
||||
'dragenter', 'dragover', 'dragleave', 'addedfile', 'removedfile',
|
||||
'thumbnail', 'error', 'processing', 'uploadprogress',
|
||||
'sending', 'success', 'complete', 'canceled', 'maxfilesreached',
|
||||
'maxfilesexceeded', 'processingmultiple', 'sendingmultiple', 'successmultiple',
|
||||
'completemultiple', 'canceledmultiple', 'totaluploadprogress', 'reset', 'queuecomplete'
|
||||
];
|
||||
angular.forEach(callbackMethods, function(method){
|
||||
var callback = (scope.callbacks[method] || angular.noop);
|
||||
dropzone.on(method, function(){
|
||||
callback.apply(null, arguments);
|
||||
if(!scope.$$phase && !scope.$root.$$phase) scope.$apply();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}]);
|
||||
})();
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* ClockPicker v{package.version} (http://weareoutman.github.io/clockpicker/)
|
||||
* ClockPicker v0.0.7 (http://weareoutman.github.io/clockpicker/)
|
||||
* Copyright 2014 Wang Shenwei.
|
||||
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,114 @@
|
|||
/**!
|
||||
* AngularJS dropzone directive
|
||||
* @author Uday Hiwarale <uhiwarale@gmail.com>
|
||||
* https://www.github.com/thatisuday/ngDropzone
|
||||
*/
|
||||
|
||||
|
||||
(function(root){
|
||||
'use strict';
|
||||
function factory(angular, Dropzone){
|
||||
|
||||
angular.module('thatisuday.dropzone', []).provider('dropzoneOps', function(){
|
||||
/*
|
||||
* Add default options here
|
||||
**/
|
||||
var defOps = {
|
||||
//Add your options here
|
||||
};
|
||||
|
||||
return {
|
||||
setOptions : function(newOps){
|
||||
angular.extend(defOps, newOps);
|
||||
},
|
||||
$get : function(){
|
||||
return defOps;
|
||||
}
|
||||
}
|
||||
}).directive('ngDropzone', ['$timeout', 'dropzoneOps', function($timeout, dropzoneOps){
|
||||
return {
|
||||
restrict : 'AE',
|
||||
template : '<div></div>',
|
||||
replace : true,
|
||||
scope : {
|
||||
options : '=?', //http://www.dropzonejs.com/#configuration-options
|
||||
callbacks : '=?', //http://www.dropzonejs.com/#events
|
||||
methods : '=?' //http://www.dropzonejs.com/#dropzone-methods
|
||||
},
|
||||
link : function(scope, iElem, iAttr){
|
||||
//Set options for dropzone {override from dropzone options provider}
|
||||
scope.options = scope.options || {};
|
||||
var initOps = angular.extend({}, dropzoneOps, scope.options);
|
||||
|
||||
|
||||
//Instantiate dropzone with initOps
|
||||
var dropzone = new Dropzone(iElem[0], initOps);
|
||||
|
||||
|
||||
/*********************************************/
|
||||
|
||||
|
||||
//Instantiate Dropzone methods (Control actions)
|
||||
scope.methods = scope.methods || {};
|
||||
|
||||
scope.methods.getDropzone = function(){
|
||||
return dropzone; //Return dropzone instance
|
||||
};
|
||||
|
||||
scope.methods.getAllFiles = function(){
|
||||
return dropzone.files; //Return all files
|
||||
};
|
||||
|
||||
var controlMethods = [
|
||||
'removeFile', 'removeAllFiles', 'processQueue',
|
||||
'getAcceptedFiles', 'getRejectedFiles', 'getQueuedFiles', 'getUploadingFiles',
|
||||
'disable', 'enable', 'confirm', 'createThumbnailFromUrl'
|
||||
];
|
||||
|
||||
angular.forEach(controlMethods, function(methodName){
|
||||
scope.methods[methodName] = function(){
|
||||
dropzone[methodName].apply(dropzone, arguments);
|
||||
if(!scope.$$phase && !scope.$root.$$phase) scope.$apply();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*********************************************/
|
||||
|
||||
|
||||
//Set invents (callbacks)
|
||||
if(scope.callbacks){
|
||||
var callbackMethods = [
|
||||
'drop', 'dragstart', 'dragend',
|
||||
'dragenter', 'dragover', 'dragleave', 'addedfile', 'removedfile',
|
||||
'thumbnail', 'error', 'processing', 'uploadprogress',
|
||||
'sending', 'success', 'complete', 'canceled', 'maxfilesreached',
|
||||
'maxfilesexceeded', 'processingmultiple', 'sendingmultiple', 'successmultiple',
|
||||
'completemultiple', 'canceledmultiple', 'totaluploadprogress', 'reset', 'queuecomplete'
|
||||
];
|
||||
angular.forEach(callbackMethods, function(method){
|
||||
var callback = (scope.callbacks[method] || angular.noop);
|
||||
dropzone.on(method, function(){
|
||||
callback.apply(null, arguments);
|
||||
if(!scope.$$phase && !scope.$root.$$phase) scope.$apply();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((typeof module === 'object') && module.exports) {
|
||||
/* CommonJS module */
|
||||
module.exports = factory(require('angular'), require('dropzone'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
/* AMD module */
|
||||
define(['angular', 'dropzone'], factory);
|
||||
} else {
|
||||
/* Browser global */
|
||||
factory(root.angular, root.Dropzone);
|
||||
}
|
||||
})(this);
|
|
@ -1,5 +1,5 @@
|
|||
<div class="footer-login">
|
||||
<div>
|
||||
<strong>{{'MY_EMS_NAME' | translate}} v1.2.1 <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>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<strong><a href="https://myems.io">https://myems.io</a></strong>
|
||||
</div>
|
||||
<div>
|
||||
<strong>{{'MY_EMS_NAME' | translate}} v1.2.1</strong>
|
||||
<strong>{{'MY_EMS_NAME' | translate}} v1.3.0</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<li ui-sref-active="active"><a ui-sref="settings.distributionsystem">{{ 'MENU.SETTINGS.DISTRIBUTION_SYSTEM' | translate }}</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="settings.menu">{{ 'MENU.SETTINGS.MENU' | translate }}</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="settings.emailserver">{{ 'MENU.SETTINGS.EMAIL_SERVER' | translate }}</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="settings.gsmmodem">{{ 'MENU.SETTINGS.GSM_MODEM' | translate }}</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="settings.knowledgefile">{{ 'MENU.SETTINGS.KNOWLEDGEFILE' | translate }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
<th >{{'FDD.EXPRESSION' | translate}}</th>
|
||||
<th >{{'FDD.MESSAGE_TEMPLATE' | translate}}</th>
|
||||
<th >{{'SETTING.ACTION' | translate}}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -33,14 +32,13 @@
|
|||
<td >{{ rule.priority }}</td>
|
||||
<td >{{ rule.channel }}</td>
|
||||
<td >{{ rule.is_enabled==true?'SETTING.ON':'SETTING.OFF' | translate}}</td>
|
||||
<td >{{ rule.last_run_datetime | date:'yyyy-MM-ddTHH:mm:ss'}}</td>
|
||||
<td >{{ rule.next_run_datetime | date:'yyyy-MM-ddTHH:mm:ss'}}</td>
|
||||
<td >{{ rule.last_run_datetime }}</td>
|
||||
<td >{{ rule.next_run_datetime }}</td>
|
||||
<td > {{'FDD.CLICK_EDIT_FOR_DETAILS' | translate}} </td>
|
||||
<td > {{'FDD.CLICK_EDIT_FOR_DETAILS' | translate}} </td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-primary btn-rounded btn-xs" ng-click="editRule(rule)" >{{'SETTING.EDIT' | translate}}</a>
|
||||
<a ng-click="deleteRule(rule)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<select ng-change="changeLanguage(language)" ng-model="language" class="form-control" >
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="en">English</option>
|
||||
<option value="cn">中 文</option>
|
||||
<option value="zh_CN">简体中文</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -120,12 +120,11 @@
|
|||
download="{{costfile.file_name}}">{{ costfile.file_name }}</a>
|
||||
</td>
|
||||
<td class="text-center">{{ costfile.status }}</td>
|
||||
<td class="text-center">{{ costfile.upload_datetime | date:'yyyy-MM-dd HH:mm'}}</td>
|
||||
|
||||
<td class="text-center">{{ costfile.upload_datetime}}</td>
|
||||
<td class="text-center">
|
||||
<a ng-click="restoreCostFile(costfile)"
|
||||
class="btn btn-danger btn-rounded btn-xs">{{'SETTING.RESTORE' | translate}}</a>
|
||||
<a ng-click="deleteCostFile(costfile)"
|
||||
<a ng-click="deleteCostFile(costfile)"
|
||||
class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<td class="text-center">{{ datasource.gateway.name }}</td>
|
||||
<td class="text-center">{{ datasource.protocol }}</td>
|
||||
<td class="text-center">{{ datasource.connection }}</td>
|
||||
<td class="text-center">{{ datasource.last_seen_datetime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
|
||||
<td class="text-center">{{ datasource.last_seen_datetime }}</td>
|
||||
<td class="text-center">
|
||||
<a ng-click="editDataSource(datasource)"
|
||||
class="btn btn-primary btn-rounded btn-xs">{{'SETTING.EDIT' | translate}}</a>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<td class="text-center">{{ gateway.id }}</td>
|
||||
<td class="text-center">{{ gateway.name }}</td>
|
||||
<td class="text-center">{{ gateway.token}}</td>
|
||||
<td class="text-center">{{ gateway.last_seen_datetime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
|
||||
<td class="text-center">{{ gateway.last_seen_datetime }}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-primary btn-rounded btn-xs" ng-click="editGateway(gateway)" >{{'SETTING.EDIT' | translate}}</a>
|
||||
<a ng-click="deleteGateway(gateway)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="tabs-container">
|
||||
<uib-tabset>
|
||||
<uib-tab heading="{{'SETTING.GSM_MODEM' | translate}}">
|
||||
<div class="panel-body" ng-controller="GSMModemController">
|
||||
<!-- <a ng-click="addGSMModem()" class="btn btn-primary btn-rounded btn-outline" href=""><i class="fa fa-plus-circle"></i> {{'SETTING.ADD_GSM_MODEM' | translate}}</a> -->
|
||||
<table class="table table-bordered table-hover" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{'SETTING.ID' | translate}}</th>
|
||||
<th class="text-center">{{'SETTING.SERIAL_PORT' | translate}}</th>
|
||||
<th class="text-center">{{'SETTING.BAUD_RATE' | translate}}</th>
|
||||
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="gsmmodem in gsmmodems">
|
||||
<td class="text-center">{{ gsmmodem.id }}</td>
|
||||
<td class="text-center">{{ gsmmodem.serial_port }}</td>
|
||||
<td class="text-center">{{ gsmmodem.baud_rate }}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-primary btn-rounded btn-xs" ng-click="editGSMModem(gsmmodem)" >{{'SETTING.EDIT' | translate}}</a>
|
||||
<!-- <a ng-click="deleteGSMModem(gsmmodem)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</uib-tab>
|
||||
</uib-tabset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,31 +0,0 @@
|
|||
<div class="inmodal">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{operation | translate}}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form role="form" name="form_gsmmodem" novalidate class="form-horizontal">
|
||||
<div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.SERIAL_PORT' | translate}}</label>
|
||||
|
||||
<div class="col-sm-9"><input ng-model="gsmmodem.serial_port" type="text" name="serial_port" class="form-control" required="">
|
||||
<div class="m-t-xs" ng-show="form_gsmmodem.serial_port.$invalid && form_gsmmodem.serial_port.$dirty">
|
||||
<small class="text-danger" ng-show="form_gsmmodem.serial_port.$error.required">{{'SETTING.INPUT_SERIAL_PORT' | translate}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.BAUD_RATE' | translate}}</label>
|
||||
|
||||
<div class="col-sm-9"><input ng-model="gsmmodem.baud_rate" type="number" name="baud_rate" class="form-control" required="">
|
||||
<div class="m-t-xs" ng-show="form_gsmmodem.port.$invalid && form_gsmmodem.baud_rate.$dirty">
|
||||
<small class="text-danger" ng-show="form_gsmmodem.baud_rate.$error.required">{{'SETTING.INPUT_BAUD_RATE' | translate}}</small>
|
||||
<small class="text-danger" ng-show="form_gsmmodem.baud_rate.$error">{{'SETTING.INVALID_BAUD_RATE' | translate}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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_contact.$invalid" class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
|
@ -22,7 +22,7 @@
|
|||
<td class="text-center">{{ knowledgefile.id }}</td>
|
||||
<td class="text-center"><a href="./upload/{{knowledgefile.uuid}}" download="{{knowledgefile.file_name}}">{{ knowledgefile.file_name }}</a></td>
|
||||
<td class="text-center">{{ knowledgefile.user_display_name }}</td>
|
||||
<td class="text-center">{{ knowledgefile.upload_datetime | date:'yyyy-MM-dd HH:mm'}}</td>
|
||||
<td class="text-center">{{ knowledgefile.upload_datetime }}</td>
|
||||
<td class="text-center">
|
||||
<a ng-click="restoreKnowledgeFile(knowledgefile)"
|
||||
class="btn btn-danger btn-rounded btn-xs">{{'SETTING.RESTORE' | translate}}</a>
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
</td>
|
||||
<td class="text-center">{{ offlinemeterfile.status }}</td>
|
||||
<td class="text-center">
|
||||
{{ offlinemeterfile.upload_datetime | date:'yyyy-MM-dd HH:mm'}}</td>
|
||||
{{ offlinemeterfile.upload_datetime }}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<a ng-click="restoreOfflineMeterFile(offlinemeterfile)"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<th class="text-center">{{'SETTING.START_DATETIME' | translate}}</th>
|
||||
<th class="text-center">{{'SETTING.END_DATETIME' | translate}}</th>
|
||||
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -29,8 +28,8 @@
|
|||
<td class="text-center">{{ tariff.energy_category.name }}</td>
|
||||
<td class="text-center">{{showTariffType(tariff.tariff_type) | translate}}</td>
|
||||
<td class="text-center">{{ tariff.unit_of_price }}</td>
|
||||
<td class="text-center">{{ tariff.valid_from | date:'yyyy-MM-ddTHH:mm:ss' }}</td>
|
||||
<td class="text-center">{{ tariff.valid_through | date:'yyyy-MM-ddTHH:mm:ss' }}</td>
|
||||
<td class="text-center">{{ tariff.valid_from }}</td>
|
||||
<td class="text-center">{{ tariff.valid_through }}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-primary btn-rounded btn-xs" ng-click="editTariff(tariff)" >{{'SETTING.EDIT' | translate}}</a>
|
||||
<a ng-click="deleteTariff(tariff)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
|
||||
|
|
|
@ -48,9 +48,9 @@
|
|||
</td>
|
||||
<td class="text-center">{{ tenant.lease_number }}</td>
|
||||
<td class="text-center">
|
||||
{{ tenant.lease_start_datetime_utc | date:'yyyy-MM-ddTHH:mm:ss' }}</td>
|
||||
{{ tenant.lease_start_datetime }}</td>
|
||||
<td class="text-center">
|
||||
{{ tenant.lease_end_datetime_utc | date:'yyyy-MM-ddTHH:mm:ss' }}</td>
|
||||
{{ tenant.lease_end_datetime }}</td>
|
||||
<td class="text-center">
|
||||
{{ tenant.is_in_lease==false?'SETTING.NO':'SETTING.YES' | translate }}</td>
|
||||
<td class="text-center">{{tenant.cost_center.name}}</td>
|
||||
|
|
|
@ -96,13 +96,13 @@
|
|||
</div>
|
||||
<div class="form-group"><label class="col-sm-2 control-label">{{'TENANT.LEASE_START_DATETIME' | translate}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input date-range-picker class="form-control date-picker" type="text" ng-model="tenant.lease_start_datetime_utc" options="dtOptions"
|
||||
<input date-range-picker class="form-control date-picker" type="text" ng-model="tenant.lease_start_datetime" options="dtOptions"
|
||||
placeholder="{{'SETTING.SELECT_DATE' | translate}}" readonly="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"><label class="col-sm-2 control-label">{{'TENANT.LEASE_END_DATETIME' | translate}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input date-range-picker class="form-control date-picker" type="text" ng-model="tenant.lease_end_datetime_utc" options="dtOptions"
|
||||
<input date-range-picker class="form-control date-picker" type="text" ng-model="tenant.lease_end_datetime" options="dtOptions"
|
||||
placeholder="{{'SETTING.SELECT_DATE' | translate}}" readonly="" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
<th class="text-center">{{'USER.EMAIL' | translate}}</th>
|
||||
<th class="text-center">{{'USER.IS_ADMIN' | translate}}</th>
|
||||
<th class="text-center">{{'USER.PRIVILEGE' | translate}}</th>
|
||||
<th class="text-center">{{'USER.ACCOUNT_EXPIRATION_DATETIME' | translate}}</th>
|
||||
<th class="text-center">{{'USER.PASSWORD_EXPIRATION_DATETIME' | translate}}</th>
|
||||
<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -27,8 +28,10 @@
|
|||
<td class="text-center">{{ user.name }}</td>
|
||||
<td class="text-center">{{ user.display_name }}</td>
|
||||
<td class="text-center">{{ user.email }}</td>
|
||||
<td class="text-center">{{ user.is_admin==1?'是':'否' }}</td>
|
||||
<td class="text-center">{{ user.is_admin==1?'Y':'N' }}</td>
|
||||
<td class="text-center">{{ user.privilege.name }}</td>
|
||||
<td class="text-center">{{ user.account_expiration_datetime }}</td>
|
||||
<td class="text-center">{{ user.password_expiration_datetime }}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-primary btn-rounded btn-xs" ng-click="editUser(user)" >{{'SETTING.EDIT' | translate}}</a>
|
||||
<a ng-hide="user.name=='administrator'" class="btn btn-info btn-rounded btn-xs" ng-click="resetPassword(user)" >{{'USER.RESET_PASSWORD' | translate}}</a>
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
<form role="form" name="form_user" novalidate class="form-horizontal">
|
||||
<div class="form-group"><label class="col-sm-3 control-label">{{'USER.USERNAME' | translate}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input ng-model="user.name" type="text" name="username" class="form-control" ng-disabled="operation=='edit'" required>
|
||||
<input ng-model="user.name" type="text" name="username" class="form-control" ng-disabled="operation=='USER.EDIT_USER'" required>
|
||||
<div class="m-t-xs" ng-show="form_user.username.$invalid && form_user.username.$dirty">
|
||||
<small class="text-danger" ng-show="form_user.username.$error.required">{{'USER.INPUT_NAME' | translate}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed" ng-hide="operation=='edit'"></div>
|
||||
<div class="form-group" ng-hide="operation=='edit'"><label class="col-sm-3 control-label">{{'USER.PASSWORD' | translate}}</label>
|
||||
<div class="hr-line-dashed" ng-hide="operation=='USER.EDIT_USER'"></div>
|
||||
<div class="form-group" ng-hide="operation=='USER.EDIT_USER'"><label class="col-sm-3 control-label">{{'USER.PASSWORD' | translate}}</label>
|
||||
<div class="col-sm-9">
|
||||
<input ng-model="user.password" type="password" name="userpassword" class="form-control" ng-disabled="operation=='edit'">
|
||||
<input ng-model="user.password" type="password" name="userpassword" class="form-control" ng-disabled="operation=='USER.EDIT_USER'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed"></div>
|
||||
|
@ -59,7 +59,20 @@
|
|||
</ui-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group"><label class="col-sm-3 control-label">{{'USER.ACCOUNT_EXPIRATION_DATETIME' | translate}}</label>
|
||||
<div class="col-sm-5">
|
||||
<input date-range-picker class="form-control date-picker" type="text" ng-model="user.account_expiration_datetime" options="dtOptions"
|
||||
placeholder="{{'SETTING.SELECT_DATE' | translate}}" readonly="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group"><label class="col-sm-3 control-label">{{'USER.PASSWORD_EXPIRATION_DATETIME' | translate}}</label>
|
||||
<div class="col-sm-5">
|
||||
<input date-range-picker class="form-control date-picker" type="text" ng-model="user.password_expiration_datetime" options="dtOptions"
|
||||
placeholder="{{'SETTING.SELECT_DATE' | translate}}" readonly="" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
Providing database schema and scripts for MyEMS.
|
||||
|
||||
|
||||
### Prerequisites
|
||||
[MySQL 8.0 or later](https://www.mysql.com/)
|
||||
|
||||
|
@ -12,11 +11,11 @@ Providing database schema and scripts for MyEMS.
|
|||
|
||||
or [SingleStore 7.0 or later](https://www.singlestore.com/) (highly recommended)
|
||||
|
||||
|
||||
### Installation
|
||||
|
||||
Execute the following scripts in MySQL commandline, or execute in other MySQL client tools such as MySQL Workbench, Navicat, DBaver, phpMyAdmin, etc.
|
||||
```
|
||||
```bash
|
||||
cd myems/database/install
|
||||
mysql -u root -p < myems_billing_baseline_db.sql
|
||||
mysql -u root -p < myems_billing_db.sql
|
||||
mysql -u root -p < myems_energy_baseline_db.sql
|
||||
|
@ -28,14 +27,15 @@ mysql -u root -p < myems_system_db.sql
|
|||
mysql -u root -p < myems_user_db.sql
|
||||
```
|
||||
To insert demo data execute the following scripts,
|
||||
```
|
||||
mysql -u root -p < demo/myems_system_db.sql
|
||||
```bash
|
||||
cd myems/database/demo
|
||||
mysql -u root -p < myems_system_db.sql
|
||||
```
|
||||
#### Change COLLATE for MySQL server before version 8.0
|
||||
```
|
||||
```bash
|
||||
sudo nano /etc/mysql/my.cnf
|
||||
```
|
||||
```
|
||||
```bash
|
||||
[client]
|
||||
default-character-set = utf8mb4
|
||||
[mysql]
|
||||
|
@ -45,6 +45,16 @@ character-set-client-handshake = FALSE
|
|||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
```
|
||||
#### Fix MySQL Error: Got a packet bigger than 'max_allowed_packet' bytes
|
||||
Change the my.cnf or my.ini file (usually found in /etc/mysql/) under the mysqld section and set:
|
||||
```
|
||||
max_allowed_packet=100M
|
||||
```
|
||||
or you could run these commands in a MySQL console connected to that same server:
|
||||
```
|
||||
set global net_buffer_length=1000000;
|
||||
set global max_allowed_packet=1000000000;
|
||||
```
|
||||
|
||||
### Database Definition
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -144,12 +144,18 @@ INSERT INTO `myems_system_db`.`tbl_data_sources`
|
|||
(`id`, `name`, `uuid`,`gateway_id`, `protocol`, `connection`)
|
||||
VALUES
|
||||
(1, '示例ModbusTCP数据源', 'b3ace9d4-b63b-419b-818f-0f6d1d0603a4', 1, 'modbus-tcp', '{"host":"192.168.0.1", "port":502}'),
|
||||
(2, '示例ModbusRTU数据源', 'b903f0af-9115-448c-9d46-8caf5f9995f3', 1, 'modbus-tru', '{"port": "/dev/ttyUSB0","slaveaddress": 1, "baudrate": 9600,"bytesize": 8,"parity": "N","stopbits": 1,"timeout": 0.05,"mode": "rtu"}'),
|
||||
(2, '示例ModbusRTU数据源', 'b903f0af-9115-448c-9d46-8caf5f9995f3', 1, 'modbus-rtu', '{"port": "/dev/ttyUSB0","slaveaddress": 1, "baudrate": 9600,"bytesize": 8,"parity": "N","stopbits": 1,"timeout": 0.05,"mode": "rtu"}'),
|
||||
(3, '示例Bacnet/IP数据源', 'e2d5b30b-b554-4ebe-8ce7-f377ab380d19', 1, 'bacnet-ip', '{"host":"192.168.0.3", "port":47808}'),
|
||||
(4, '示例S7数据源', '9eb0d705-d02a-43f8-9c62-7e5ef508b255', 1, 's7', '{"host":"192.168.0.4", "port":102, "rack": 0, "slot": 2}'),
|
||||
(5, '示例ControlLogix数据源', 'd1dc9792-7861-4dd3-9b01-07511dae16c1', 1, 'control-logix', '{"host":"192.168.0.5","port":44818,"processorslot":3}'),
|
||||
(5, '示例ControlLogix数据源', 'd1dc9792-7861-4dd3-9b01-07511dae16c1', 1, 'controllogix', '{"host":"192.168.0.5","port":44818,"processorslot":3}'),
|
||||
(6, '示例OPU UA数据源', '56e1c642-8032-495b-af2e-18a77ca75e0f', 1, 'opc-ua', '{"url":"opc.tcp://192.168.0.6:49320/OPCUA/SimulationServer/"}'),
|
||||
(7, '示例天气数据源', '9bff8e95-c7c9-4002-b040-08a96ae196b5', 1, 'weather', '{"base_url":"WEATHER_API_URL", "location":"beijing", "key":"APPKEY"}');
|
||||
(7, '示例天气数据源', '9bff8e95-c7c9-4002-b040-08a96ae196b5', 1, 'weather', '{"base_url":"WEATHER_API_URL", "location":"beijing", "key":"APPKEY"}'),
|
||||
(8, '示例MySQL数据源', '409439d0-3e0a-4ab3-865a-a5c0329925f8', 1, 'mysql', '{"host":"192.168.0.8", "port":3306, "user":"myems", "password":"!MyEMS1", "database":"myems_ingestion_db" }'),
|
||||
(9, '示例SQL Server数据源', '025f0429-5088-4f2a-85a3-dff9b4523692', 1, 'sqlserver', '{"host":"192.168.0.9", "port":1433, "user":"myems", "password":"!MyEMS1", "database":"myems_ingestion_db" }'),
|
||||
(10, '示例PostgreSQL数据源', 'd89b81e6-4917-4a84-b0e9-c2e939599d3a', 1, 'postgresql', '{"host":"192.168.0.10", "port":5432, "user":"myems", "password":"!MyEMS1", "database":"myems_ingestion_db" }'),
|
||||
(11, '示例Oracle数据源', '1bdf4db8-ea71-433e-ad16-b637275073d7', 1, 'oracle', '{"host":"192.168.0.11", "port":1521, "user":"myems", "password":"!MyEMS1", "database":"myems_ingestion_db" }'),
|
||||
(12, '示例MongoDB数据源', 'c211fbad-d1d4-465c-bdf5-242f5593682e', 1, 'mongodb', '{"host":"192.168.0.12", "port":27017, "user":"myems", "password":"!MyEMS1", "database":"myems_ingestion_db" }'),
|
||||
(13, '示例InfluxDB数据源', '79cb60ff-c683-4289-ac69-bd13e1f970d1', 1, 'influxdb', '{"host":"192.168.0.13", "port":8086, "user":"myems", "password":"!MyEMS1", "database":"myems_ingestion_db" }');
|
||||
COMMIT;
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -161,7 +167,7 @@ USE `myems_system_db`;
|
|||
INSERT INTO `myems_system_db`.`tbl_distribution_circuits`
|
||||
(`id`, `name`, `uuid`, `distribution_system_id`, `distribution_room`, `switchgear`, `peak_load`, `peak_current`, `customers`, `meters`)
|
||||
VALUES
|
||||
(1, '51W91', '52f7abe1-ba0e-47a6-a327-4faac42a1d11', 1, 'EW1', '51AL9', 30, 53.6, '地下室应急照明', 'ALE-1102, ALE-1082');
|
||||
(1, 'AHa01', '52f7abe1-ba0e-47a6-a327-4faac42a1d11', 1, '1ES', 'AHa01', 5100, 1250, '11#电源进线1WHj2', 'AHa01');
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
@ -216,16 +222,21 @@ COMMIT;
|
|||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
START TRANSACTION;
|
||||
USE `myems_system_db`;
|
||||
|
||||
INSERT INTO `myems_system_db`.`tbl_energy_items`
|
||||
(`id`, `name`, `uuid`, `energy_category_id`)
|
||||
INSERT INTO myems_system_db.tbl_energy_items
|
||||
(id, name, uuid, energy_category_id)
|
||||
VALUES
|
||||
(1, '空调用电', 'c5eac07a-e889-4a56-aa1b-a0b688c4e953', 1),
|
||||
(2, '动力用电', '6875e4e0-a2ec-47a5-a88e-becb10e9603a', 1),
|
||||
(3, '照明用电', '79918598-6477-4130-a85c-4cb87d0eac23', 1);
|
||||
|
||||
(1, '照明和插座用电', 'cade4e78-2b85-4bea-ab6e-0d6accc88d03', 1),
|
||||
(2, '走廊和应急照明用电', '7a6dc086-ce08-4d66-ba75-f69af92b32f4', 1),
|
||||
(3, '室外景观照明用电', 'abcebbd1-b770-4e7c-ae54-8434d724522c', 1),
|
||||
(4, '冷热站用电', '97cdea54-04c7-4a6a-b4c2-df15874b2f49', 1),
|
||||
(5, '空调末端用电', '84ab7262-33fb-43a1-9880-9287cc268cc0', 1),
|
||||
(6, '电梯用电', '26a5fc62-3da1-41b0-bcb1-0056e25ee121', 1),
|
||||
(7, '水泵用电', 'fc6079f5-01a4-434f-9004-9382e8c3dd47', 1),
|
||||
(8, '通风机用电', 'a4bf68cd-6ae1-48dd-b281-07c95312921d', 1),
|
||||
(9, '特殊用电', '1990d151-02ff-4fd6-b298-2b2edee4e0ea', 1);
|
||||
COMMIT;
|
||||
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Demo Data for table `myems_system_db`.`tbl_energy_flow_diagrams`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -235,7 +246,7 @@ USE `myems_system_db`;
|
|||
INSERT INTO `myems_system_db`.`tbl_energy_flow_diagrams`
|
||||
(`id`, `name`, `uuid`)
|
||||
VALUES
|
||||
(1, '低压配电系统', '3ccbc9c6-9575-4212-a63a-a688d1154302');
|
||||
(1, '示例能流图', '3ccbc9c6-9575-4212-a63a-a688d1154302');
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
@ -449,25 +460,25 @@ INSERT INTO `myems_system_db`.`tbl_points`
|
|||
(`id`, `name`, `data_source_id`, `object_type`, `units`, `high_limit`, `low_limit`, `ratio`, `is_trend`, `address`, `description` )
|
||||
VALUES
|
||||
(1, 'Active Energy Import Tariff 1', 1, 'ENERGY_VALUE', 'kWh', 99999999999, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":801, \"number_of_registers\":4, \"format\":\"=d\", \"swap_adjacent_bytes\":false}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":801, \"number_of_registers\":4, \"format\":\"=d\", \"byte_swap\":false}', null),
|
||||
|
||||
(2, 'Working hours counter', 1, 'ANALOG_VALUE', 'S', 999999999, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":209, \"number_of_registers\":2, \"format\":\"=L\", \"swap_adjacent_bytes\":true}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":209, \"number_of_registers\":2, \"format\":\"=L\", \"byte_swap\":true}', null),
|
||||
|
||||
(3, 'Current a', 1, 'ANALOG_VALUE', 'A', 5, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":13, \"number_of_registers\":2, \"format\":\"=f\", \"swap_adjacent_bytes\":false}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":13, \"number_of_registers\":2, \"format\":\"=f\", \"byte_swap\":false}', null),
|
||||
|
||||
(4, 'Active Power a', 1, 'ANALOG_VALUE', 'W', 3450, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":25, \"number_of_registers\":2, \"format\":\"=f\", \"swap_adjacent_bytes\":false}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":25, \"number_of_registers\":2, \"format\":\"=f\", \"byte_swap\":false}', null),
|
||||
|
||||
(5, 'Power Factor a', 1, 'ANALOG_VALUE', 'W', 1, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":37, \"number_of_registers\":2, \"format\":\"=f\", \"swap_adjacent_bytes\":false}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":37, \"number_of_registers\":2, \"format\":\"=f\", \"byte_swap\":false}', null),
|
||||
|
||||
(6, '示例ModbusTCP数据点6', 2, 'ENERGY_VALUE', 'Wh', 99999999999, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":40001, \"number_of_registers\":2, \"format\":\"=f\", \"swap_adjacent_bytes\":false}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":40001, \"number_of_registers\":2, \"format\":\"=f\", \"byte_swap\":false}', null),
|
||||
|
||||
(7, '示例数据点7', 2, 'ANALOG_VALUE', 'V', 690, 0, 1.000, true,
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":40002, \"number_of_registers\":2, \"format\":\"=f\", \"swap_adjacent_bytes\":false}', null),
|
||||
'{\"slave_id\":1, \"function_code\":3, \"offset\":40002, \"number_of_registers\":2, \"format\":\"=f\", \"byte_swap\":false}', null),
|
||||
|
||||
(8, 'BACnet示例数据点1', 3, 'ANALOG_VALUE', 'V', 690, 0, 1.000, true,
|
||||
'{\"object_type\":\"analogValue\", \"object_id\":3004860, \"property_name\":\"presentValue\", \"property_array_index\":null}', null),
|
||||
|
@ -1131,9 +1142,9 @@ USE `myems_system_db`;
|
|||
INSERT INTO `myems_system_db`.`tbl_variables`
|
||||
(`id`, `name`, `expression_id`, `meter_type`, `meter_id`)
|
||||
VALUES
|
||||
(1, 'x', 1, 'meter', 1),
|
||||
(2, 'y', 1, 'meter', 2),
|
||||
(3, 'z', 1, 'meter', 3);
|
||||
(1, 'x1', 1, 'meter', 1),
|
||||
(2, 'x2', 1, 'meter', 2),
|
||||
(3, 'x3', 1, 'meter', 3);
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -26,30 +26,6 @@ CREATE TABLE IF NOT EXISTS `myems_fdd_db`.`tbl_email_messages` (
|
|||
PRIMARY KEY (`id`));
|
||||
CREATE INDEX `tbl_email_messages_index_1` ON `myems_fdd_db`.`tbl_email_messages` (`status`, `scheduled_datetime_utc`);
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Table `myems_fdd_db`.`tbl_gsm_modems`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS `myems_fdd_db`.`tbl_gsm_modems` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `myems_fdd_db`.`tbl_gsm_modems` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`serial_port` VARCHAR(64) NOT NULL,
|
||||
`baud_rate` INT NOT NULL,
|
||||
PRIMARY KEY (`id`));
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Data for table `myems_fdd_db`.`tbl_gsm_modems`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
START TRANSACTION;
|
||||
USE `myems_fdd_db`;
|
||||
|
||||
INSERT INTO `myems_fdd_db`.`tbl_gsm_modems`
|
||||
(`id`, `serial_port`, `baud_rate`)
|
||||
VALUES
|
||||
(1, '/dev/ttyS0', 115200);
|
||||
|
||||
COMMIT;
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Table `myems_fdd_db`.`tbl_rules`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
|
@ -26,6 +26,25 @@ CREATE TABLE IF NOT EXISTS `myems_reporting_db`.`tbl_email_messages` (
|
|||
PRIMARY KEY (`id`));
|
||||
CREATE INDEX `tbl_email_messages_index_1` ON `myems_reporting_db`.`tbl_email_messages` (`status`, `scheduled_datetime_utc`);
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Table `myems_reporting_db`.`tbl_reports`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS `myems_reporting_db`.`tbl_reports` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `myems_reporting_db`.`tbl_reports` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(128) NOT NULL,
|
||||
`uuid` CHAR(36) NOT NULL,
|
||||
`category` VARCHAR(128) NOT NULL COMMENT 'SPACE, METER, VIRTUALMETER, TENANT, STORE, SHOPFLOOR, EQUIPMENT, COMBINEDEQUIPMENT',
|
||||
`report_code` VARCHAR(128) NOT NULL COMMENT 'SPACE01, SPACE02, ... METER01, METER02, ... TENANT01, TENANT02, ...',
|
||||
`expression` JSON NOT NULL COMMENT 'JSON string of reporting objects, peroids, date ranges, and recipients',
|
||||
`is_enabled` BOOL NOT NULL,
|
||||
`last_run_datetime_utc` DATETIME,
|
||||
`next_run_datetime_utc` DATETIME,
|
||||
PRIMARY KEY (`id`));
|
||||
CREATE INDEX `tbl_reports_index_1` ON `myems_reporting_db`.`tbl_reports` (`name`);
|
||||
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Table `myems_reporting_db`.`tbl_reports_files`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
|
@ -1243,6 +1243,6 @@ USE `myems_system_db`;
|
|||
INSERT INTO `myems_system_db`.`tbl_versions`
|
||||
(`id`, `version`, `release_date`)
|
||||
VALUES
|
||||
(1, '1.2.1', '2021-08-19');
|
||||
(1, '1.3.0', '2021-09-24');
|
||||
|
||||
COMMIT;
|
|
@ -22,6 +22,8 @@ CREATE TABLE IF NOT EXISTS `myems_user_db`.`tbl_users` (
|
|||
`password` VARCHAR(256) NOT NULL,
|
||||
`is_admin` BOOL NOT NULL ,
|
||||
`privilege_id` BIGINT NULL,
|
||||
`account_expiration_datetime_utc` DATETIME NOT NULL,
|
||||
`password_expiration_datetime_utc` DATETIME NOT NULL,
|
||||
PRIMARY KEY (`id`));
|
||||
|
||||
-- --------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -31,9 +33,9 @@ START TRANSACTION;
|
|||
USE `myems_user_db`;
|
||||
-- default username: administrator
|
||||
-- default password: !MyEMS1
|
||||
INSERT INTO `myems_user_db`.`tbl_users`(`id`, `name`, `uuid`, `display_name`, `email`, `salt`, `password`, `is_admin`, `privilege_id`)
|
||||
INSERT INTO `myems_user_db`.`tbl_users`(`id`, `name`, `uuid`, `display_name`, `email`, `salt`, `password`, `is_admin`, `privilege_id`, `account_expiration_datetime_utc`, `password_expiration_datetime_utc`)
|
||||
VALUES
|
||||
(1, 'administrator', 'dcdb67d1-6116-4987-916f-6fc6cf2bc0e4', 'Administrator', 'administrator@myems.io', 'adfd6fb6d78d4e3780ebdd6afdec2c3a', 'bc00df65270b1a72b9ed37136fa95a695896edc8c114391821f5edc6b1bbdbabc3d449962f8d1c7a4ec3f2d0a1a79055623963d88ecb9b778423194ff7b6be42', 1, NULL);
|
||||
(1, 'administrator', 'dcdb67d1-6116-4987-916f-6fc6cf2bc0e4', 'Administrator', 'administrator@myems.io', 'adfd6fb6d78d4e3780ebdd6afdec2c3a', 'bc00df65270b1a72b9ed37136fa95a695896edc8c114391821f5edc6b1bbdbabc3d449962f8d1c7a4ec3f2d0a1a79055623963d88ecb9b778423194ff7b6be42', 1, NULL, '2099-12-31 16:00:00', '2099-12-31 16:00:00');
|
||||
COMMIT;
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -66,15 +68,18 @@ DROP TABLE IF EXISTS `myems_user_db`.`tbl_logs` ;
|
|||
|
||||
CREATE TABLE IF NOT EXISTS `myems_user_db`.`tbl_logs` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`user_id` BIGINT NOT NULL,
|
||||
`utc_date_time` DATETIME NOT NULL,
|
||||
`activity` VARCHAR(256) NOT NULL,
|
||||
`user_uuid` CHAR(36) NOT NULL,
|
||||
`request_datetime_utc` DATETIME NOT NULL,
|
||||
`request_method` VARCHAR(256) NOT NULL,
|
||||
`resource_type` VARCHAR(256) NOT NULL,
|
||||
`resource_id` BIGINT NULL,
|
||||
`request_body` JSON NULL,
|
||||
PRIMARY KEY (`id`));
|
||||
CREATE INDEX `tbl_logs_index_1` ON `myems_user_db`.`tbl_logs` (`user_uuid`, `request_datetime_utc`, `request_method`);
|
||||
|
||||
|
||||
-- ----------------------------------------------------------------------------------
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Table `myems_user_db`.`tbl_notifications`
|
||||
-- ----------------------------------------------------------------------------------
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS `myems_user_db`.`tbl_notifications` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `myems_user_db`.`tbl_notifications` (
|
|
@ -0,0 +1,28 @@
|
|||
import mysql.connector
|
||||
import config
|
||||
|
||||
|
||||
def test_connect():
|
||||
cursor = None
|
||||
cnx = None
|
||||
try:
|
||||
cnx = mysql.connector.connect(**config.myems_user_db)
|
||||
cursor = cnx.cursor()
|
||||
|
||||
query = (" SELECT id, name, display_name, email "
|
||||
" FROM tbl_users "
|
||||
" ORDER BY id ")
|
||||
cursor.execute(query)
|
||||
rows = cursor.fetchall()
|
||||
print("The config of database is right:", rows)
|
||||
except Exception as e:
|
||||
print("The config of database is wrong:", str(e))
|
||||
finally:
|
||||
if cursor:
|
||||
cursor.close()
|
||||
if cnx:
|
||||
cnx.disconnect()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_connect()
|
|
@ -0,0 +1,15 @@
|
|||
DROP TABLE IF EXISTS `myems_user_db`.`tbl_logs` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `myems_user_db`.`tbl_logs` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`user_uuid` CHAR(36) NOT NULL,
|
||||
`request_datetime_utc` DATETIME NOT NULL,
|
||||
`request_method` VARCHAR(256) NOT NULL,
|
||||
`resource_type` VARCHAR(256) NOT NULL,
|
||||
`resource_id` BIGINT NULL,
|
||||
`request_body` JSON NULL,
|
||||
PRIMARY KEY (`id`));
|
||||
CREATE INDEX `tbl_logs_index_1` ON `myems_user_db`.`tbl_logs` (`user_uuid`, `request_datetime_utc`, `request_method`);
|
||||
|
||||
-- UPDATE VERSION NUMBER
|
||||
UPDATE myems_system_db.tbl_versions SET version='1.2.2', release_date='2021-08-28' WHERE id=1;
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
-- Table `myems_reporting_db`.`tbl_reports`
|
||||
-- ---------------------------------------------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS `myems_reporting_db`.`tbl_reports` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `myems_reporting_db`.`tbl_reports` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(128) NOT NULL,
|
||||
`uuid` CHAR(36) NOT NULL,
|
||||
`category` VARCHAR(128) NOT NULL COMMENT 'SPACE, METER, VIRTUALMETER, TENANT, STORE, SHOPFLOOR, EQUIPMENT, COMBINEDEQUIPMENT',
|
||||
`report_code` VARCHAR(128) NOT NULL COMMENT 'SPACE01, SPACE02, ... METER01, METER02, ... TENANT01, TENANT02, ...',
|
||||
`expression` JSON NOT NULL COMMENT 'JSON string of reporting objects, peroids, date ranges, and recipients',
|
||||
`is_enabled` BOOL NOT NULL,
|
||||
`last_run_datetime_utc` DATETIME,
|
||||
`next_run_datetime_utc` DATETIME,
|
||||
PRIMARY KEY (`id`));
|
||||
CREATE INDEX `tbl_reports_index_1` ON `myems_reporting_db`.`tbl_reports` (`name`);
|
||||
|
||||
-- UPDATE VERSION NUMBER
|
||||
UPDATE myems_system_db.tbl_versions SET version='1.2.3', release_date='2021-09-04' WHERE id=1;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue