From 092e3b07c149d732746a7cc58648e4dc8314d0c7 Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Thu, 14 Sep 2023 13:44:51 +0300 Subject: [PATCH] Minor improvements for edge centos/ubuntu instruction. css minor updates --- .../centos/instructions.md | 19 +++--- .../ubuntu/instructions.md | 17 +++-- .../edge-instructions-dialog.component.scss | 63 +++++++------------ 3 files changed, 41 insertions(+), 58 deletions(-) diff --git a/application/src/main/data/json/edge/install_instructions/centos/instructions.md b/application/src/main/data/json/edge/install_instructions/centos/instructions.md index 486249e320..0e9bf251c3 100644 --- a/application/src/main/data/json/edge/install_instructions/centos/instructions.md +++ b/application/src/main/data/json/edge/install_instructions/centos/instructions.md @@ -84,8 +84,8 @@ sudo systemctl enable --now postgresql-12 {:copy-code} ``` -Once PostgreSQL is installed you may want to create a new user or set the password for the the main user. -The instructions below will help to set the password for main postgresql user +Once PostgreSQL is installed you may want to create a new user or set the password for the main user. +The instructions below will help to set the password for main PostgreSQL user: ```text sudo su - postgres @@ -132,7 +132,7 @@ psql -U postgres -d postgres -h 127.0.0.1 -W {:copy-code} ``` -Execute create database statement +Execute create database statement: ```bash CREATE DATABASE tb_edge; @@ -148,7 +148,7 @@ wget https://github.com/thingsboard/thingsboard-edge/releases/download/v${TB_EDG {:copy-code} ``` -Go to the download repository and install ThingsBoard Edge service +Go to the download repository and install ThingsBoard Edge service: ```bash sudo rpm -Uvh tb-edge-${TB_EDGE_VERSION}.rpm @@ -170,8 +170,7 @@ EOL' ``` ##### [Optional] Database Configuration -In case you changed default PostgreSQL datasource settings please update the configuration file with your actual values (**/etc/tb-edge/conf/tb-edge.conf**). -Edit ThingsBoard Edge configuration file: +In case you changed default PostgreSQL datasource settings (**postgres**/**postgres**) please update the configuration file (**/etc/tb-edge/conf/tb-edge.conf**) with your actual values: ```bash sudo nano /etc/tb-edge/conf/tb-edge.conf @@ -179,12 +178,12 @@ sudo nano /etc/tb-edge/conf/tb-edge.conf ``` Please update the following lines in your configuration file. Make sure **to replace**: -- PUT_YOUR_POSTGRESQL_PASSWORD_HERE with your actual postgres datasource username -- PUT_YOUR_POSTGRESQL_PASSWORD_HERE with your actual postgres datasource password. +- Replace 'postgres' with your actual PostgreSQL username; +- Replace 'PUT_YOUR_POSTGRESQL_PASSWORD_HERE' with your actual PostgreSQL password. ```bash export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/tb_edge -export SPRING_DATASOURCE_USERNAME=PUT_YOUR_POSTGRESQL_USERNAME_HERE +export SPRING_DATASOURCE_USERNAME=postgres export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE {:copy-code} ``` @@ -204,7 +203,7 @@ EOL' {:copy-code} ``` -Make sure that ports above (18080, 11883, 15683-15688) are not used by any other application. +Make sure that ports above (18080, 11883, 15683) are not used by any other application. #### Run installation script Once ThingsBoard Edge is installed and configured please execute the following install script: diff --git a/application/src/main/data/json/edge/install_instructions/ubuntu/instructions.md b/application/src/main/data/json/edge/install_instructions/ubuntu/instructions.md index 21eb01654a..72b85e5190 100644 --- a/application/src/main/data/json/edge/install_instructions/ubuntu/instructions.md +++ b/application/src/main/data/json/edge/install_instructions/ubuntu/instructions.md @@ -55,7 +55,7 @@ sudo service postgresql start ``` Once PostgreSQL is installed you may want to create a new user or set the password for the main user. -The instructions below will help to set the password for main postgresql user +The instructions below will help to set the password for main PostgreSQL user: ```text sudo su - postgres @@ -73,14 +73,14 @@ CREATE DATABASE tb_edge; ``` #### Thingsboard Edge service installation -Download installation package. +Download installation package: ```bash wget https://github.com/thingsboard/thingsboard-edge/releases/download/v${TB_EDGE_VERSION}/tb-edge-${TB_EDGE_VERSION}.deb {:copy-code} ``` -Go to the download repository and install ThingsBoard Edge service +Go to the download repository and install ThingsBoard Edge service: ```bash sudo dpkg -i tb-edge-${TB_EDGE_VERSION}.deb @@ -102,8 +102,7 @@ EOL' ``` ##### [Optional] Database Configuration -In case you changed default PostgreSQL datasource settings please update the configuration file with your actual values (**/etc/tb-edge/conf/tb-edge.conf**). -Edit ThingsBoard Edge configuration file: +In case you changed default PostgreSQL datasource settings (**postgres**/**postgres**) please update the configuration file (**/etc/tb-edge/conf/tb-edge.conf**) with your actual values: ```bash sudo nano /etc/tb-edge/conf/tb-edge.conf @@ -111,12 +110,12 @@ sudo nano /etc/tb-edge/conf/tb-edge.conf ``` Please update the following lines in your configuration file. Make sure **to replace**: -- PUT_YOUR_POSTGRESQL_PASSWORD_HERE with your actual postgres datasource username -- PUT_YOUR_POSTGRESQL_PASSWORD_HERE with your actual postgres datasource password. +- Replace 'postgres' with your actual PostgreSQL username; +- Replace 'PUT_YOUR_POSTGRESQL_PASSWORD_HERE' with your actual PostgreSQL password. ```bash export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/tb_edge -export SPRING_DATASOURCE_USERNAME=PUT_YOUR_POSTGRESQL_USERNAME_HERE +export SPRING_DATASOURCE_USERNAME=postgres export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE {:copy-code} ``` @@ -136,7 +135,7 @@ EOL' {:copy-code} ``` -Make sure that ports above (18080, 11883, 15683-15688) are not used by any other application. +Make sure that ports above (18080, 11883, 15683) are not used by any other application. #### Run installation script diff --git a/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss b/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss index 0c561cd8f6..a22671248a 100644 --- a/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss @@ -69,47 +69,32 @@ :host ::ng-deep { .tb-markdown-view { - padding: 16px; - .tb-command-code { - .code-wrapper { - padding: 0; - pre[class*=language-] { - margin: 0; - background: #F3F6FA; - border-color: #305680; - padding-right: 38px; - overflow: scroll; - padding-bottom: 4px; - - &::-webkit-scrollbar { - width: 4px; - height: 4px; - } + padding: 16px 16px 32px 16px; + div.code-wrapper button.clipboard-btn { + right: -2px !important; + p { + color: #305680; + } + p, div { + background-color: #F3F6FA; + } + div { + img { + display: none; + } + &:after { + content: ""; + position: initial; + display: block; + width: 18px; + height: 18px; + background: #305680; + mask-image: url(/assets/copy-code-icon.svg); + mask-repeat: no-repeat; } } - button.clipboard-btn { - right: -2px; - p { - color: #305680; - } - p, div { - background-color: #F3F6FA; - } - div { - img { - display: none; - } - &:after { - content: ""; - position: initial; - display: block; - width: 18px; - height: 18px; - background: #305680; - mask-image: url(/assets/copy-code-icon.svg); - mask-repeat: no-repeat; - } - } + &.multiline { + right: -2px !important; } } & > *:not(ul) {