fixed issue of EnergyCategory in admin and updated README of admin
parent
27f9bb8629
commit
d937acd1bb
|
@ -14,6 +14,16 @@ nginx-1.18.0 or later
|
||||||
|
|
||||||
In this section, you will install myems-admin on Docker.
|
In this section, you will install myems-admin on Docker.
|
||||||
|
|
||||||
|
* replace ~~127.0.0.1:8000~~ in nginx.conf with actual **HOST** ip and port of myems-api
|
||||||
|
```bash
|
||||||
|
cd myems/admin
|
||||||
|
nano nginx.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
proxy_pass http://127.0.0.1:8000/;
|
||||||
|
```
|
||||||
|
|
||||||
* Build a Docker image
|
* Build a Docker image
|
||||||
```bash
|
```bash
|
||||||
cd myems/admin
|
cd myems/admin
|
||||||
|
@ -141,6 +151,8 @@ sudo nano /var/www/html/admin/app/api.js
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
1. https://myems.io
|
[1]. https://myems.io
|
||||||
2. https://dev.mysql.com/doc/connector-python/en/
|
|
||||||
3. https://nginx.org/
|
[2]. https://dev.mysql.com/doc/connector-python/en/
|
||||||
|
|
||||||
|
[3]. https://nginx.org/
|
|
@ -1,7 +1,13 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
app.controller('EnergyCategoryController', function($scope, $translate,$uibModal, CategoryService,toaster,SweetAlert) {
|
app.controller('EnergyCategoryController', function($scope,
|
||||||
|
$window,
|
||||||
|
$translate,
|
||||||
|
$uibModal,
|
||||||
|
CategoryService,
|
||||||
|
toaster,
|
||||||
|
SweetAlert) {
|
||||||
|
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||||
$scope.getAllCategories = function() {
|
$scope.getAllCategories = function() {
|
||||||
CategoryService.getAllCategories(function (response) {
|
CategoryService.getAllCategories(function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 200) {
|
if (angular.isDefined(response.status) && response.status === 200) {
|
||||||
|
@ -10,7 +16,6 @@ app.controller('EnergyCategoryController', function($scope, $translate,$uibModal
|
||||||
$scope.categories = [];
|
$scope.categories = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addCategory = function() {
|
$scope.addCategory = function() {
|
||||||
|
|
Loading…
Reference in New Issue