diff --git a/application/src/main/data/json/edge/instructions/install/centos/instructions.md b/application/src/main/data/json/edge/instructions/install/centos/instructions.md index bcc1967dfd..86c5acad56 100644 --- a/application/src/main/data/json/edge/instructions/install/centos/instructions.md +++ b/application/src/main/data/json/edge/instructions/install/centos/instructions.md @@ -56,13 +56,13 @@ sudo yum update sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # Install packages sudo yum -y install epel-release yum-utils -sudo yum-config-manager --enable pgdg15 -sudo yum install postgresql15-server postgresql15 +sudo yum-config-manager --enable pgdg16 +sudo yum install postgresql16-server postgresql16 postgresql16-contrib # Initialize your PostgreSQL DB -sudo /usr/pgsql-15/bin/postgresql-15-setup initdb -sudo systemctl start postgresql-15 +sudo /usr/pgsql-16/bin/postgresql-16-setup initdb +sudo systemctl start postgresql-16 # Optional: Configure PostgreSQL to start on boot -sudo systemctl enable --now postgresql-15 +sudo systemctl enable --now postgresql-16 {:copy-code} ``` @@ -74,12 +74,12 @@ sudo systemctl enable --now postgresql-15 sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm # Install packages sudo dnf -qy module disable postgresql -sudo dnf -y install postgresql15 postgresql15-server +sudo dnf -y install postgresql16 postgresql16-server postgresql16-contrib # Initialize your PostgreSQL DB -sudo /usr/pgsql-15/bin/postgresql-15-setup initdb -sudo systemctl start postgresql-15 +sudo /usr/pgsql-16/bin/postgresql-16-setup initdb +sudo systemctl start postgresql-16 # Optional: Configure PostgreSQL to start on boot -sudo systemctl enable --now postgresql-15 +sudo systemctl enable --now postgresql-16 {:copy-code} ``` @@ -101,7 +101,7 @@ After configuring the password, edit the pg_hba.conf to use MD5 authentication w Edit pg_hba.conf file: ```bash -sudo nano /var/lib/pgsql/15/data/pg_hba.conf +sudo nano /var/lib/pgsql/16/data/pg_hba.conf {:copy-code} ``` @@ -121,7 +121,7 @@ host all all 127.0.0.1/32 md5 Finally, you should restart the PostgreSQL service to initialize the new configuration: ```bash -sudo systemctl restart postgresql-15.service +sudo systemctl restart postgresql-16.service {:copy-code} ``` diff --git a/application/src/main/data/json/edge/instructions/install/docker/instructions.md b/application/src/main/data/json/edge/instructions/install/docker/instructions.md index 9910124b3e..23f484f2ec 100644 --- a/application/src/main/data/json/edge/instructions/install/docker/instructions.md +++ b/application/src/main/data/json/edge/instructions/install/docker/instructions.md @@ -38,7 +38,7 @@ services: ${EXTRA_HOSTS} postgres: restart: always - image: "postgres:15" + image: "postgres:16" ports: - "5432" environment: diff --git a/application/src/main/data/json/edge/instructions/install/ubuntu/instructions.md b/application/src/main/data/json/edge/instructions/install/ubuntu/instructions.md index fe9601443f..992b5e2ee2 100644 --- a/application/src/main/data/json/edge/instructions/install/ubuntu/instructions.md +++ b/application/src/main/data/json/edge/instructions/install/ubuntu/instructions.md @@ -49,7 +49,7 @@ echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo # install and launch the postgresql service: sudo apt update -sudo apt -y install postgresql-15 +sudo apt -y install postgresql-16 sudo service postgresql start {:copy-code} ``` diff --git a/application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md b/application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md index d922fa9155..a594ebe4e7 100644 --- a/application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md +++ b/application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md @@ -21,7 +21,7 @@ services: entrypoint: upgrade-tb-edge.sh postgres: restart: always - image: "postgres:15" + image: "postgres:16" ports: - "5432" environment: diff --git a/docker/docker-compose.hybrid.yml b/docker/docker-compose.hybrid.yml index 43f1e81cd1..5bffa9fb1d 100644 --- a/docker/docker-compose.hybrid.yml +++ b/docker/docker-compose.hybrid.yml @@ -19,7 +19,7 @@ version: '3.0' services: postgres: restart: always - image: "postgres:15" + image: "postgres:16" ports: - "5432" environment: diff --git a/docker/docker-compose.postgres.yml b/docker/docker-compose.postgres.yml index 780d2ccefd..50844fa2eb 100644 --- a/docker/docker-compose.postgres.yml +++ b/docker/docker-compose.postgres.yml @@ -19,7 +19,7 @@ version: '3.0' services: postgres: restart: always - image: "postgres:15" + image: "postgres:16" ports: - "5432" environment: diff --git a/msa/tb/docker-cassandra/Dockerfile b/msa/tb/docker-cassandra/Dockerfile index 18071b249b..27613fe161 100644 --- a/msa/tb/docker-cassandra/Dockerfile +++ b/msa/tb/docker-cassandra/Dockerfile @@ -16,7 +16,7 @@ FROM thingsboard/openjdk17:bookworm-slim -ENV PG_MAJOR=15 +ENV PG_MAJOR=16 ENV DATA_FOLDER=/data diff --git a/ui-ngx/src/app/core/settings/settings.utils.ts b/ui-ngx/src/app/core/settings/settings.utils.ts index 9db2994fe1..8f0a261d08 100644 --- a/ui-ngx/src/app/core/settings/settings.utils.ts +++ b/ui-ngx/src/app/core/settings/settings.utils.ts @@ -21,6 +21,9 @@ import { Observable } from 'rxjs'; export function updateUserLang(translate: TranslateService, userLang: string, translations = env.supportedLangs): Observable { let targetLang = userLang; + if (!translations) { + translations = env.supportedLangs; + } if (!env.production) { console.log(`User lang: ${targetLang}`); } diff --git a/ui-ngx/src/app/modules/home/components/router-tabs.component.ts b/ui-ngx/src/app/modules/home/components/router-tabs.component.ts index 681558deb0..3a416073c5 100644 --- a/ui-ngx/src/app/modules/home/components/router-tabs.component.ts +++ b/ui-ngx/src/app/modules/home/components/router-tabs.component.ts @@ -25,6 +25,7 @@ import { merge, Observable } from 'rxjs'; import { MenuSection } from '@core/services/menu.models'; import { ActiveComponentService } from '@core/services/active-component.service'; import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; +import { getCurrentAuthUser } from '@core/auth/auth.selectors'; @Component({ selector: 'tb-router-tabs', @@ -115,9 +116,20 @@ export class RouterTabsComponent extends PageComponent implements OnInit { private buildTabsForRoutes(activatedRoute: ActivatedRoute): Array { const sectionPath = this.getSectionPath(activatedRoute); - if (activatedRoute.routeConfig.children.length) { - const activeRouterChildren = activatedRoute.routeConfig.children.filter(page => page.path !== ''); - return activeRouterChildren.map(tab => ({ + const authority = getCurrentAuthUser(this.store).authority; + const children = activatedRoute.routeConfig.children.filter(page => { + if (page.path !== '') { + if (page.data?.auth) { + return page.data?.auth.includes(authority); + } else { + return true; + } + } else { + return false; + } + }); + if (children.length) { + return children.map(tab => ({ id: tab.component.name, type: 'link', name: tab.data?.breadcrumb?.label ?? '',