From 0d29b130ba766c8e0d85ad68b053c6257d29acea Mon Sep 17 00:00:00 2001 From: Bartosz Ptaszynski Date: Wed, 27 Mar 2019 13:22:19 +0000 Subject: [PATCH 1/3] Fix deployment on GKE When creating postgres deployment on GKE Postgres complains about data folder being mounted directly on root of the PV claim. ``` The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. initdb: directory "/var/lib/postgresql/data" exists but is not empty It contains a lost+found directory, perhaps due to it being a mount point. Using a mount point directly as the data directory is not recommended. Create a subdirectory under the mount point. ``` A simple solution is to force Postgres to use a sub folder using PGDATA env variable. --- k8s/postgres.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/k8s/postgres.yml b/k8s/postgres.yml index 2e7f2cc815..404b564933 100644 --- a/k8s/postgres.yml +++ b/k8s/postgres.yml @@ -55,6 +55,8 @@ spec: env: - name: POSTGRES_DB value: "thingsboard" + - name: PGDATA + value: /var/lib/postgresql/data/pgdata volumeMounts: - mountPath: /var/lib/postgresql/data name: postgres-data From bb68e575e7e0ba95dccbfea3562fcd2d9c4481c3 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 28 Mar 2019 09:51:43 +0200 Subject: [PATCH 2/3] UI: Settings cards layout improvement. --- ui/src/app/admin/admin.controller.js | 3 +++ ui/src/app/admin/general-settings.tpl.html | 4 ++-- .../app/admin/outgoing-mail-settings.tpl.html | 4 ++-- ui/src/app/admin/settings-card.scss | 23 +++++++++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 ui/src/app/admin/settings-card.scss diff --git a/ui/src/app/admin/admin.controller.js b/ui/src/app/admin/admin.controller.js index c697726137..1fd0b22eeb 100644 --- a/ui/src/app/admin/admin.controller.js +++ b/ui/src/app/admin/admin.controller.js @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import './settings-card.scss'; + /*@ngInject*/ export default function AdminController(adminService, toast, $scope, $rootScope, $state, $translate) { diff --git a/ui/src/app/admin/general-settings.tpl.html b/ui/src/app/admin/general-settings.tpl.html index 7023e133dd..0e651f8233 100644 --- a/ui/src/app/admin/general-settings.tpl.html +++ b/ui/src/app/admin/general-settings.tpl.html @@ -15,8 +15,8 @@ limitations under the License. --> -
- +
+ admin.general-settings diff --git a/ui/src/app/admin/outgoing-mail-settings.tpl.html b/ui/src/app/admin/outgoing-mail-settings.tpl.html index 14049defd3..855da256c6 100644 --- a/ui/src/app/admin/outgoing-mail-settings.tpl.html +++ b/ui/src/app/admin/outgoing-mail-settings.tpl.html @@ -15,8 +15,8 @@ limitations under the License. --> -
- +
+ admin.outgoing-mail-settings diff --git a/ui/src/app/admin/settings-card.scss b/ui/src/app/admin/settings-card.scss new file mode 100644 index 0000000000..9cbf5266b0 --- /dev/null +++ b/ui/src/app/admin/settings-card.scss @@ -0,0 +1,23 @@ +/** + * Copyright © 2016-2019 The Thingsboard Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import "../../scss/constants"; + +md-card.settings-card { + @media (min-width: $layout-breakpoint-sm) { + width: 60%; + } +} From 2f06be1d0557a583617dc86177287ccd7487dd5c Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 28 Mar 2019 11:27:01 +0200 Subject: [PATCH 3/3] UI: Widgets - add entityDescription variable --- ui/src/app/common/utils.service.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/src/app/common/utils.service.js b/ui/src/app/common/utils.service.js index 0b8d23a726..f140893d2b 100644 --- a/ui/src/app/common/utils.service.js +++ b/ui/src/app/common/utils.service.js @@ -499,6 +499,8 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t label = label.split(variable).join(datasource.entityName); } else if (variableName === 'aliasName') { label = label.split(variable).join(datasource.aliasName); + } else if (variableName === 'entityDescription') { + label = label.split(variable).join(datasource.entityDescription); } match = varsRegex.exec(pattern); }