renamed folder admin to myems-admin, and folder web to myems-web

pull/135/head
13621160019@163.com 2022-03-17 09:14:50 +08:00
parent 6fd3fddf99
commit c4324d16a6
3232 changed files with 15462 additions and 16713 deletions

View File

@ -162,7 +162,7 @@ MyEMS项目由下列组件构成:
### MyEMS 管理 UI (AngularJS version 1.x) ### MyEMS 管理 UI (AngularJS version 1.x)
详见 [myems-admin介绍与安装](./admin/README.md) 详见 [myems-admin介绍与安装](myems-admin/README.md)
### MyEMS Modbus TCP 数据采集服务 (Python) ### MyEMS Modbus TCP 数据采集服务 (Python)
@ -182,7 +182,7 @@ MyEMS项目由下列组件构成:
### MyEMS Web UI (ReactJS) ### MyEMS Web UI (ReactJS)
详见 [myems-web介绍与安装](./web/README.md) 详见 [myems-web介绍与安装](myems-web/README.md)
### 默认端口号 ### 默认端口号

View File

@ -158,7 +158,7 @@ Sehen [myems-api Introduction & Installation](./myems-api/README.md)
### MyEMS Admin UI (AngularJS) ### MyEMS Admin UI (AngularJS)
Sehen [myems-admin Introduction & Installation](./admin/README.md) Sehen [myems-admin Introduction & Installation](myems-admin/README.md)
### MyEMS Modbus TCP Acquisition Service (Python) ### MyEMS Modbus TCP Acquisition Service (Python)
@ -178,7 +178,7 @@ Sehen [myems-aggregation Introduction & Installation](./myems-aggregation/README
### MyEMS Web UI (ReactJS) ### MyEMS Web UI (ReactJS)
Sehen [myems-web Introduction & Installation](./web/README.md) Sehen [myems-web Introduction & Installation](myems-web/README.md)
### Standardports ### Standardports

View File

@ -161,7 +161,7 @@ See [myems-api Introduction & Installation](./myems-api/README.md)
### MyEMS Admin UI (ReactJS) ### MyEMS Admin UI (ReactJS)
See [myems-admin Introduction & Installation](./admin/README.md) See [myems-admin Introduction & Installation](myems-admin/README.md)
### MyEMS Modbus TCP Acquisition Service (Python) ### MyEMS Modbus TCP Acquisition Service (Python)
@ -181,7 +181,7 @@ See [myems-aggregation Introduction & Installation](./myems-aggregation/README.m
### MyEMS Web UI (AngularJS) ### MyEMS Web UI (AngularJS)
See [myems-web Introduction & Installation](./web/README.md) See [myems-web Introduction & Installation](myems-web/README.md)
### Default Ports ### Default Ports

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,99 @@
-- MyEMS Production Database
-- ---------------------------------------------------------------------------------------------------------------------
-- Schema myems_production_db
-- ---------------------------------------------------------------------------------------------------------------------
-- MyEMS Production Database
DROP DATABASE IF EXISTS `myems_production_db` ;
-- ---------------------------------------------------------------------------------------------------------------------
-- Database myems_production_db
--
-- MyEMS Production Database
-- ---------------------------------------------------------------------------------------------------------------------
CREATE DATABASE IF NOT EXISTS `myems_production_db` ;
USE `myems_production_db` ;
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_production_db`.`tbl_products`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_production_db`.`tbl_products` ;
CREATE TABLE IF NOT EXISTS `myems_production_db`.`tbl_products` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`unit_of_measure` VARCHAR(32) NOT NULL,
`tag` VARCHAR(128) NOT NULL,
`coefficient_standard_product` DECIMAL(18, 3) NOT NULL DEFAULT 1.0,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_products_index_1` ON `myems_production_db`.`tbl_products` (`name`);
-- --------------------------------------------------------------------------------------------------------------------------------------------------------
-- Table `myems_production_db`.`tbl_products_shifts`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_production_db`.`tbl_products_shifts` ;
CREATE TABLE IF NOT EXISTS `myems_production_db`.`tbl_products_shifts` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`team_id` BIGINT NOT NULL,
`product_id` BIGINT NOT NULL,
`product_count` INT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`end_datetime_utc` DATETIME NOT NULL,
`timestamp` DATETIME NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_products_shifts_index_1` ON `myems_production_db`.`tbl_products_shifts` (`line_id`, `product_id`, `end_datetime_utc` );
CREATE INDEX `tbl_products_shifts_index_2` ON `myems_production_db`.`tbl_products_shifts` (`line_id`, `product_id`, `start_datetime_utc`, `end_datetime_utc` );
CREATE INDEX `tbl_products_shifts_index_3` ON `myems_production_db`.`tbl_products_shifts` (`line_id`, `timestamp`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_production_db`.`tbl_shopfloors_products`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_production_db`.`tbl_shopfloors_products` ;
CREATE TABLE IF NOT EXISTS `myems_production_db`.`tbl_shopfloors_products` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`product_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_production_db`.`tbl_shopfloor_working_days`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_production_db`.`tbl_shopfloor_working_days` ;
CREATE TABLE IF NOT EXISTS `myems_production_db`.`tbl_shopfloor_working_days` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`date_local` DATE NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_shopfloor_working_days_index_1` ON `myems_production_db`.`tbl_shopfloor_working_days` (`shopfloor_id`, `date_local`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_production_db`.`tbl_shopfloor_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_production_db`.`tbl_shopfloor_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_production_db`.`tbl_shopfloor_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`product_id` BIGINT NOT NULL,
`product_count` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_shopfloor_hourly_index_1` ON `myems_production_db`.`tbl_shopfloor_hourly` (`shopfloor_id`, `product_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_production_db`.`tbl_teams`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_production_db`.`tbl_teams` ;
CREATE TABLE IF NOT EXISTS `myems_production_db`.`tbl_teams` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`uuid` CHAR(36) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_teams_index_1` ON `myems_production_db`.`tbl_teams` (`name`);

View File

@ -0,0 +1,12 @@
-- ---------------------------------------------------------------------------------------------------------------------
-- WARNING: BACKUP YOUR DATABASE BEFORE UPGRADING
-- THIS SCRIPT IS ONLY FOR UPGRADING 1.8.1 TO 1.8.2
-- THE CURRENT VERSION CAN BE FOUND AT `myems_system_db`.`tbl_versions`
-- ---------------------------------------------------------------------------------------------------------------------
START TRANSACTION;
-- UPDATE VERSION NUMBER
UPDATE `myems_system_db`.`tbl_versions` SET version='1.9.0', release_date='2022-03-20' WHERE id=1;
COMMIT;

View File

@ -51,8 +51,8 @@ mysql -u root -p < myems_user_db.sql
3.1 修改nginx.conf里的API配置 3.1 修改nginx.conf里的API配置
``` ```
cd myems cd myems
nano admin/nginx.conf nano myems-admin/nginx.conf
nano web/nginx.conf nano myems-web/nginx.conf
``` ```
3.2 分别复制下列目录中的example.env为.env并修改.env里的数据库IP账号密码 3.2 分别复制下列目录中的example.env为.env并修改.env里的数据库IP账号密码
@ -78,7 +78,7 @@ nano myems-normalization/.env
4. 编译Web UI 4. 编译Web UI
``` ```
cd myems/web cd myems/myems-web
npm i --unsafe-perm=true --allow-root --legacy-peer-deps npm i --unsafe-perm=true --allow-root --legacy-peer-deps
npm run build npm run build
``` ```
@ -100,11 +100,11 @@ docker-compose -f docker-compose-on-linux.yml up -d
6. 验证 6. 验证
| | 网址 | 期望结果 | | | 网址 | 期望结果 |
| ----- | ----------------------- | ---------------- | | ----------- | ----------------------- | ---------------- |
| web | 192.168.0.1:80 | 输入账号密码登录成功 | | myems-web | 192.168.0.1:80 | 输入账号密码登录成功 |
| admin | 192.168.0.1:8001 | 输入账号密码登录成功 | | myems-admin | 192.168.0.1:8001 | 输入账号密码登录成功 |
| api | 192.168.0.1:8000/version| 返回版本信息 | | myems-api | 192.168.0.1:8000/version| 返回版本信息 |
**注**如果api报错请确认.env里的数据库IP数据库账号数据库密码是否正确如果不正确请修改后执行 **注**如果api报错请确认.env里的数据库IP数据库账号数据库密码是否正确如果不正确请修改后执行

View File

@ -51,8 +51,8 @@ Anmerkung: Siehe unter [database/README.md](./database/README.md)
3.1 API-Adresse ändern in nginx.conf 3.1 API-Adresse ändern in nginx.conf
``` ```
cd myems cd myems
nano admin/nginx.conf nano myems-admin/nginx.conf
nano web/nginx.conf nano myems-web/nginx.conf
``` ```
3.2 Kopieren Sie das folgende Beispiel in das Verzeichnis bzw. Env ist Env und modifizieren Datenbank IP, Kontonummer und Passwort in Env 3.2 Kopieren Sie das folgende Beispiel in das Verzeichnis bzw. Env ist Env und modifizieren Datenbank IP, Kontonummer und Passwort in Env
@ -78,7 +78,7 @@ Make sure the upload folders in api and admin are same folder on host.
4. Web UI erstellen 4. Web UI erstellen
``` ```
cd myems/web cd myems/myems-web
npm i --unsafe-perm=true --allow-root --legacy-peer-deps npm i --unsafe-perm=true --allow-root --legacy-peer-deps
npm run build npm run build
``` ```
@ -100,11 +100,11 @@ docker-compose -f docker-compose-on-linux.yml up -d
6. Verification 6. Verification
| | Address | Erwartetes Ergebnis | | | Address | Erwartetes Ergebnis |
| ----- | ----------------------- | ---------------- | | ----------- | ----------------------- | ---------------- |
| web | 192.168.0.1:80 | Login erfolgreich durch Eingabe von Konto und Passwort | | myems-web | 192.168.0.1:80 | Login erfolgreich durch Eingabe von Konto und Passwort |
| admin | 192.168.0.1:8001 | Login erfolgreich durch Eingabe von Konto und Passwort | | myems-admin | 192.168.0.1:8001 | Login erfolgreich durch Eingabe von Konto und Passwort |
| api | 192.168.0.1:8000/version| Versionsinformationen zurückgeben | | myems-api | 192.168.0.1:8000/version| Versionsinformationen zurückgeben |
**注**Wenn die API einen Fehler meldet, bestätigen Sie bitte, ob die Datenbank-IP, das Datenbankkonto und das Datenbankkennwort in .env sind korrekt. Wenn nicht, ändern Sie sie bitte und führen Sie **注**Wenn die API einen Fehler meldet, bestätigen Sie bitte, ob die Datenbank-IP, das Datenbankkonto und das Datenbankkennwort in .env sind korrekt. Wenn nicht, ändern Sie sie bitte und führen Sie
``` ```

View File

@ -51,8 +51,8 @@ Note: Refer to [database/README.md](./database/README.md)
3.1 Modify API's address in nginx.conf 3.1 Modify API's address in nginx.conf
``` ```
cd myems cd myems
nano admin/nginx.conf nano myems-admin/nginx.conf
nano web/nginx.conf nano myems-web/nginx.conf
``` ```
3.2 Copy example.env to .env in each folder and modify database IP, username and password in .env 3.2 Copy example.env to .env in each folder and modify database IP, username and password in .env
@ -78,7 +78,7 @@ Make sure the upload folders in api and admin are same folder on host.
4. Build Web UI 4. Build Web UI
``` ```
cd myems/web cd myems/myems-web
npm i --unsafe-perm=true --allow-root --legacy-peer-deps npm i --unsafe-perm=true --allow-root --legacy-peer-deps
npm run build npm run build
``` ```
@ -100,11 +100,11 @@ docker-compose -f docker-compose-on-linux.yml up -d
6. Verification 6. Verification
| | Address | Expected Result | | | Address | Expected Result |
| ----- | ----------------------- | ---------------- | | ----------- | ----------------------- | ---------------- |
| web | 192.168.0.1:80 | Login succeeded by entering account and password | | myems-web | 192.168.0.1:80 | Login succeeded by entering account and password |
| admin | 192.168.0.1:8001 | Login succeeded by entering account and password | | myems-admin | 192.168.0.1:8001 | Login succeeded by entering account and password |
| api | 192.168.0.1:8000/version| Return version information | | myems-api | 192.168.0.1:8000/version| Return version information |
**Note**If the API reports an error, please confirm Whether the database IP, database account and database password in .env are correct. If not, please modify them then execute: **Note**If the API reports an error, please confirm Whether the database IP, database account and database password in .env are correct. If not, please modify them then execute:
``` ```

View File

@ -32,7 +32,7 @@ services:
restart: always restart: always
admin: admin:
build: ./admin build: ./myems-admin
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;" command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
healthcheck: healthcheck:
test: [ "CMD","nginx","-t" ] test: [ "CMD","nginx","-t" ]
@ -44,7 +44,7 @@ services:
ports: ports:
- "8001:8001" - "8001:8001"
web: web:
build: ./web build: ./myems-web
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;" command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
healthcheck: healthcheck:
test: [ "CMD","nginx","-t" ] test: [ "CMD","nginx","-t" ]

View File

@ -32,7 +32,7 @@ services:
restart: always restart: always
admin: admin:
build: ./admin build: ./myems-admin
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;" command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
healthcheck: healthcheck:
test: [ "CMD","nginx","-t" ] test: [ "CMD","nginx","-t" ]
@ -44,7 +44,7 @@ services:
ports: ports:
- "8001:8001" - "8001:8001"
web: web:
build: ./web build: ./myems-web
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;" command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
healthcheck: healthcheck:
test: [ "CMD","nginx","-t" ] test: [ "CMD","nginx","-t" ]

View File

@ -16,7 +16,7 @@ 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 * replace ~~127.0.0.1:8000~~ in nginx.conf with actual **HOST** ip and port of myems-api
```bash ```bash
cd myems/admin cd myems/myems-admin
nano nginx.conf nano nginx.conf
``` ```
@ -28,14 +28,14 @@ nano nginx.conf
On Windows: On Windows:
```bash ```bash
cp -r myems/admin c:\myems-admin cp -r myems/myems-admin c:\myems-admin
cd c:\myems-admin cd c:\myems-admin
docker build -t myems/myems-admin . docker build -t myems/myems-admin .
``` ```
On Linux: On Linux:
```bash ```bash
cp -r myems/admin /myems-admin cp -r myems/myems-admin /myems-admin
cd /myems-admin cd /myems-admin
docker build -t myems/myems-admin . docker build -t myems/myems-admin .
``` ```
@ -117,11 +117,11 @@ Add a new 'server' section with direstives as below:
``` ```
* Install myems-admin : * 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 If the server can not connect to the internet, please compress the myems/myems-admin folder and upload it to the server and extract it to ~/myems/myems-admin
```bash ```bash
sudo mkdir /var/www sudo mkdir /var/www
sudo mkdir /var/www/html sudo mkdir /var/www/html
sudo cp -r myems/admin /var/www/html/admin sudo cp -r myems/myems-admin /var/www/html/admin
sudo chmod 0755 -R /var/www/html/admin sudo chmod 0755 -R /var/www/html/admin
``` ```
Check the config file and change it if necessary: Check the config file and change it if necessary:
@ -169,9 +169,9 @@ Add a new 'VirtualHost' as below
``` ```
* Install myems-admin : * 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 If the server can not connect to the internet, please compress the myems/myems-admin folder and upload it to the server and extract it to ~/myems/myems-admin
```bash ```bash
sudo cp -r myems/admin /var/www/html/admin sudo cp -r myems/myems-admin /var/www/html/admin
sudo chmod 0755 -R /var/www/html/admin sudo chmod 0755 -R /var/www/html/admin
``` ```
Check the config file and change it if necessary: Check the config file and change it if necessary:

Some files were not shown because too many files have changed in this diff Show More