UBERF-10441: Fix configure and board item displayed (#8788)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-04-30 22:50:59 +07:00 committed by GitHub
parent 917828f9f8
commit 85fc90e26c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 60 additions and 80 deletions

View File

@ -23,7 +23,7 @@ services:
image: postgres
container_name: postgres
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
environment:
- POSTGRES_PASSWORD=example
volumes:
@ -98,7 +98,6 @@ services:
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://host.docker.internal:8087
- RESERVED_DB_NAMES=telegram,gmail,github
- MODEL_ENABLED=*
- LAST_NAME_FIRST=true
# - WS_LIVENESS_DAYS=1
- ACCOUNTS_URL=http://host.docker.internal:3000
@ -135,7 +134,6 @@ services:
- MAIL_URL=
- STORAGE_CONFIG=${STORAGE_CONFIG}
- RESERVED_DB_NAMES=telegram,gmail,github
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://host.docker.internal:3000
- BRANDING_PATH=/var/cfg/branding.json
# - PARALLEL=2
@ -163,7 +161,6 @@ services:
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://host.docker.internal:8087
- RESERVED_DB_NAMES=telegram,gmail,github
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://host.docker.internal:3000
- BRANDING_PATH=/var/cfg/branding.json
# - PARALLEL=2
@ -190,7 +187,6 @@ services:
- REGION=cockroach
- STORAGE_CONFIG=${STORAGE_CONFIG}
- RESERVED_DB_NAMES=telegram,gmail,github
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://host.docker.internal:3000
- BRANDING_PATH=/var/cfg/branding.json
# - PARALLEL=2
@ -372,7 +368,7 @@ services:
- AUTH_TOKEN=secret
- STATS_URL=http://host.docker.internal:4900
- DB_URL=postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable
restart: unless-stopped
restart: unless-stopped
rekoni:
image: hardcoreeng/rekoni-service
restart: unless-stopped
@ -503,23 +499,23 @@ services:
- AVATAR_PATH=./avatar.png
- AVATAR_CONTENT_TYPE=.png
- STATS_URL=http://host.docker.internal:4900
# - LOVE_ENDPOINT=http://host.docker.internal:8096
# - OPENAI_API_KEY=token
# telegram-bot:
# image: hardcoreeng/telegram-bot
# extra_hosts:
# - "host.docker.internal:host-gateway"
# restart: unless-stopped
# environment:
# - PORT=4020
# - BOT_TOKEN=token
# - MONGO_URL=${MONGO_URL}
# - MONGO_DB=telegram-bot
# - SECRET=secret
# - DOMAIN=domain
# - ACCOUNTS_URL=http://host.docker.internal:3000
# - SERVICE_ID=telegram-bot-service
# - STATS_URL=http://host.docker.internal:4900
# - LOVE_ENDPOINT=http://host.docker.internal:8096
# - OPENAI_API_KEY=token
# telegram-bot:
# image: hardcoreeng/telegram-bot
# extra_hosts:
# - "host.docker.internal:host-gateway"
# restart: unless-stopped
# environment:
# - PORT=4020
# - BOT_TOKEN=token
# - MONGO_URL=${MONGO_URL}
# - MONGO_DB=telegram-bot
# - SECRET=secret
# - DOMAIN=domain
# - ACCOUNTS_URL=http://host.docker.internal:3000
# - SERVICE_ID=telegram-bot-service
# - STATS_URL=http://host.docker.internal:4900
export:
image: hardcoreeng/export
extra_hosts:

View File

@ -23,7 +23,7 @@ services:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1024m -Xmx1024m
- http.cors.enabled=true
- http.cors.allow-origin=http://localhost:8082
- http.cors.allow-origin=http://localhost:8082
healthcheck:
interval: 20s
retries: 10
@ -46,12 +46,11 @@ services:
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://localhost:8087
- RESERVED_DB_NAMES=telegram,gmail,github
- MODEL_ENABLED=*
- LAST_NAME_FIRST=true
- ACCOUNTS_URL=http://localhost:3000
- BRANDING_PATH=/var/cfg/branding.json
- INIT_SCRIPT_URL=https://raw.githubusercontent.com/hcengineering/init/main/script.yaml
- INIT_WORKSPACE=onboarding
- INIT_WORKSPACE=onboarding
restart: unless-stopped
collaborator:
image: hardcoreeng/collaborator
@ -86,7 +85,7 @@ services:
- MONGO_URL=mongodb://host.docker.internal:27017?compressors=snappy
- 'MONGO_OPTIONS={"appName":"front","maxPoolSize":1}'
- ACCOUNTS_URL=http://localhost:3000
- UPLOAD_URL=/files
- UPLOAD_URL=/files
- GMAIL_URL=http://localhost:8088
- CALENDAR_URL=http://localhost:8095
- TELEGRAM_URL=http://localhost:8086
@ -100,7 +99,7 @@ services:
- DESKTOP_UPDATES_URL=https://dist.huly.io
- DESKTOP_UPDATES_CHANNEL=dev
- BRANDING_URL=http://localhost:8087/branding.json
restart: unless-stopped
restart: unless-stopped
transactor:
image: hardcoreeng/transactor
links:
@ -112,11 +111,11 @@ services:
ports:
- 3333:3333
volumes:
- ../branding.json:/var/cfg/branding.json
- ../branding.json:/var/cfg/branding.json
environment:
# - SERVER_PROVIDER=uweb
# - UWS_HTTP_MAX_HEADERS_SIZE="32768"
- UV_THREADPOOL_SIZE=10
- UV_THREADPOOL_SIZE=10
- SERVER_PORT=3333
- SERVER_SECRET=secret
- ENABLE_COMPRESSION=true
@ -133,7 +132,7 @@ services:
- ACCOUNTS_URL=http://account:3000
- LAST_NAME_FIRST=true
- ELASTIC_INDEX_NAME=local_storage_index
- BRANDING_PATH=/var/cfg/branding.json
- BRANDING_PATH=/var/cfg/branding.json
restart: unless-stopped
rekoni:
image: hardcoreeng/rekoni-service
@ -175,7 +174,7 @@ services:
- ACCOUNTS_URL=http://account:3000
- MINIO_SECRET_KEY=minioadmin
- CERTIFICATE_PATH=/var/cfg/certificate.p12
- SERVICE_ID=sign-service
- SERVICE_ID=sign-service
- BRANDING_PATH=/var/cfg/branding.json
deploy:
resources:

View File

@ -22,14 +22,15 @@ import { devTool } from '.'
import { addLocation } from '@hcengineering/platform'
import { serverActivityId } from '@hcengineering/server-activity'
import { serverAiBotId } from '@hcengineering/server-ai-bot'
import { serverAttachmentId } from '@hcengineering/server-attachment'
import { serverCardId } from '@hcengineering/server-card'
import { serverCalendarId } from '@hcengineering/server-calendar'
import { serverCardId } from '@hcengineering/server-card'
import { serverChunterId } from '@hcengineering/server-chunter'
import { serverCollaborationId } from '@hcengineering/server-collaboration'
import { serverContactId } from '@hcengineering/server-contact'
import { serverDriveId } from '@hcengineering/server-drive'
import { serverDocumentId } from '@hcengineering/server-document'
import { serverDriveId } from '@hcengineering/server-drive'
import { serverGmailId } from '@hcengineering/server-gmail'
import { serverGuestId } from '@hcengineering/server-guest'
import { serverHrId } from '@hcengineering/server-hr'
@ -45,7 +46,6 @@ import { serverTelegramId } from '@hcengineering/server-telegram'
import { serverTimeId } from '@hcengineering/server-time'
import { serverTrackerId } from '@hcengineering/server-tracker'
import { serverViewId } from '@hcengineering/server-view'
import { serverAiBotId } from '@hcengineering/server-ai-bot'
addLocation(serverActivityId, () => import('@hcengineering/server-activity-resources'))
addLocation(serverAttachmentId, () => import('@hcengineering/server-attachment-resources'))
@ -79,10 +79,7 @@ function prepareTools (): {
version: Data<Version>
migrateOperations: [string, MigrateOperation][]
} {
const enabled = (process.env.MODEL_ENABLED ?? '*').split(',').map((it) => it.trim())
const disabled = (process.env.MODEL_DISABLED ?? '').split(',').map((it) => it.trim())
return { ...prepareToolsRaw(builder(enabled, disabled).getTxes()), version: getModelVersion(), migrateOperations }
return { ...prepareToolsRaw(builder().getTxes()), version: getModelVersion(), migrateOperations }
}
export function getMongoDBUrl (): string {

View File

@ -1,7 +1,5 @@
import { writeFileSync } from 'fs'
import builder from './'
const enabled = (process.env.MODEL_ENABLED ?? '*').split(',').map((it) => it.trim())
const disabled = (process.env.MODEL_DISABLED ?? '').split(',').map((it) => it.trim())
const model = JSON.stringify(builder(enabled, disabled).getTxes())
const model = JSON.stringify(builder().getTxes())
writeFileSync(process.argv[2], model)

View File

@ -137,7 +137,7 @@ export type { MigrateOperation } from '@hcengineering/model'
* @param disabled - a set of disabled plugins
* @returns
*/
export default function buildModel (enabled: string[] = ['*'], disabled: string[] = []): Builder {
export default function buildModel (): Builder {
const builder = new Builder()
const defaultFilter = [
@ -303,10 +303,11 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
boardModel,
boardId,
{
label: undefined, // board.string.ConfigLabel,
label: board.string.ConfigLabel,
description: board.string.ConfigDescription,
enabled: false,
beta: true,
hidden: true,
icon: board.icon.Board,
classFilter: defaultFilter
}
@ -315,10 +316,11 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
bitrixModel,
bitrixId,
{
label: undefined, // bitrix.string.ConfigLabel,
label: bitrix.string.ConfigLabel,
description: bitrix.string.ConfigDescription,
enabled: false,
beta: true,
hidden: true,
icon: bitrix.icon.Bitrix,
classFilter: defaultFilter
}
@ -481,9 +483,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
pluginId: id,
transactions: txes.map((it) => it._id),
...config,
enabled:
config?.label === undefined ||
((config?.enabled ?? true) && (enabled.includes(id) || enabled.includes('*')) && !disabled.includes(id)),
enabled: config?.label === undefined || ((config?.enabled ?? true) && !(config.hidden ?? false)),
beta: config?.beta ?? false
},
('plugin-configuration-' + id) as Ref<PluginConfiguration>

View File

@ -1,6 +1,4 @@
import builder from './'
const enabled = (process.env.MODEL_ENABLED ?? '*').split(',').map((it) => it.trim())
const disabled = (process.env.MODEL_DISABLED ?? '').split(',').map((it) => it.trim())
const model = JSON.stringify(builder(enabled, disabled).getTxes())
const model = JSON.stringify(builder().getTxes())
console.log(model)

View File

@ -235,12 +235,14 @@ export interface PluginConfiguration extends Doc {
pluginId: Plugin
transactions: Ref<Doc>[]
// If not set will not be shown in configuration UI
label?: IntlString
icon?: Asset
description?: IntlString
enabled: boolean
// If set will not be shown in configuration UI or enabled
hidden?: boolean
// If specified, will show beta/testing label in UI.
beta: boolean

View File

@ -36,7 +36,7 @@
<Scroller align={'center'} padding={'var(--spacing-3)'} bottomPadding={'var(--spacing-3)'}>
<div class="flex-row-center flex-wrap gap-around-4">
{#each $pluginConfigurationStore.list as config}
{#if config.label}
{#if config.label && !(config.hidden ?? false)}
<div class="cardBox flex-col clear-mins" class:enabled={config.enabled ?? true}>
<div class="flex-row-center">
<span class="mr-2">

View File

@ -9,10 +9,7 @@ import { initStatisticsContext, loadBrandingMap } from '@hcengineering/server-co
import { serveWorkspaceAccount } from '@hcengineering/workspace-service'
import { join } from 'path'
const enabled = (process.env.MODEL_ENABLED ?? '*').split(',').map((it) => it.trim())
const disabled = (process.env.MODEL_DISABLED ?? '').split(',').map((it) => it.trim())
const txes = JSON.parse(JSON.stringify(builder(enabled, disabled).getTxes())) as Tx[]
const txes = JSON.parse(JSON.stringify(builder().getTxes())) as Tx[]
configureAnalytics(process.env.SENTRY_DSN, {})
Analytics.setTag('application', 'workspace')

View File

@ -1,9 +1,9 @@
version: "3"
version: '3'
services:
mongodb:
image: 'mongo:7-jammy'
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
command: mongod --port 27018
environment:
- PUID=1000
@ -41,7 +41,7 @@ services:
account:
image: hardcoreeng/account
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
pull_policy: never
links:
- mongodb
@ -57,12 +57,11 @@ services:
- DB_URL=mongodb://mongodb:27018
- TRANSACTOR_URL=ws://transactor:3334;ws://host.docker.internal:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- BRANDING_PATH=/var/cfg/branding-test.json
workspace:
image: hardcoreeng/workspace
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
links:
- mongodb
- minio
@ -74,14 +73,13 @@ services:
- MONGO_URL=mongodb://mongodb:27018
- TRANSACTOR_URL=ws://transactor:3334;ws://host.docker.internal:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://account:3003
- BRANDING_PATH=/var/cfg/branding.json
restart: unless-stopped
front:
image: hardcoreeng/front
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
pull_policy: never
links:
- account
@ -112,7 +110,7 @@ services:
transactor:
image: hardcoreeng/transactor
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
pull_policy: never
links:
- mongodb
@ -140,7 +138,7 @@ services:
collaborator:
image: hardcoreeng/collaborator
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
links:
- mongodb
- minio
@ -154,7 +152,7 @@ services:
- UPLOAD_URL=/files
- MONGO_URL=mongodb://mongodb:27018
- STORAGE_CONFIG=${STORAGE_CONFIG}
restart: unless-stopped
restart: unless-stopped
rekoni:
image: hardcoreeng/rekoni-service
restart: on-failure
@ -163,7 +161,7 @@ services:
print:
image: hardcoreeng/print
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
restart: unless-stopped
ports:
- 4003:4005
@ -179,7 +177,7 @@ services:
sign:
image: hardcoreeng/sign
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
restart: unless-stopped
ports:
- 4008:4006
@ -195,7 +193,7 @@ services:
- ACCOUNTS_URL=http://account:3003
- MINIO_SECRET_KEY=minioadmin
- CERTIFICATE_PATH=/var/cfg/certificate.p12
- SERVICE_ID=sign-service
- SERVICE_ID=sign-service
- BRANDING_PATH=/var/cfg/branding.json
deploy:
resources:
@ -218,4 +216,4 @@ services:
- ELASTIC_INDEX_NAME=local_storage_index
- STORAGE_CONFIG=${STORAGE_CONFIG}
- REKONI_URL=http://rekoni:4007
- ACCOUNTS_URL=http://account:3003
- ACCOUNTS_URL=http://account:3003

View File

@ -18,7 +18,7 @@ services:
restart: unless-stopped
healthcheck:
#CHANGE 1: this command checks if the database is ready, right on the source db server
test: [ "CMD-SHELL", "pg_isready" ]
test: ['CMD-SHELL', 'pg_isready']
interval: 5s
timeout: 5s
retries: 5
@ -62,7 +62,6 @@ services:
- DB_URL=mongodb://mongodb:27018
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://stats:4901
workspace:
@ -78,7 +77,6 @@ services:
- DB_URL=mongodb://mongodb:27018
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://account:3003
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://stats:4901
@ -128,7 +126,7 @@ services:
- ./branding-test.json:/var/cfg/branding.json
environment:
- SERVER_PORT=3334
- SERVER_SECRET=secret
- SERVER_SECRET=secret
- DB_URL=mongodb://mongodb:27018
- METRICS_CONSOLE=false
- METRICS_FILE=metrics.txt
@ -164,7 +162,7 @@ services:
- 4007:4004
environment:
- STATS_URL=http://stats:4901
fulltext:
image: hardcoreeng/fulltext
restart: unless-stopped
@ -192,4 +190,4 @@ services:
environment:
- PORT=4901
- SERVER_SECRET=secret
restart: unless-stopped
restart: unless-stopped

View File

@ -69,7 +69,6 @@ services:
- DB_URL=mongodb://huly.local:27018
- TRANSACTOR_URL=ws://huly.local:3334;ws://huly.local:3334,ws://huly.local:3335;ws://huly.local:3335;europe,
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://huly.local:4901
workspace:
@ -86,7 +85,6 @@ services:
- SERVER_SECRET=secret
- DB_URL=${DB_URL}
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- REGION=
- ACCOUNTS_URL=http://huly.local:3003
- BRANDING_PATH=/var/cfg/branding.json
@ -110,7 +108,6 @@ services:
- SERVER_SECRET=secret
- DB_URL=${DB_EU_URL}
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://huly.local:3003
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://huly.local:4901