mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-10 17:30:51 +00:00
UBERF-10441: Fix configure and board item displayed (#8789)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
48997b88ea
commit
230e1ec418
@ -158,7 +158,6 @@ services:
|
|||||||
- MAIL_URL=
|
- MAIL_URL=
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- FRONT_URL=http://huly.local:8087
|
- FRONT_URL=http://huly.local:8087
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- LAST_NAME_FIRST=true
|
- LAST_NAME_FIRST=true
|
||||||
# - WS_LIVENESS_DAYS=1
|
# - WS_LIVENESS_DAYS=1
|
||||||
- ACCOUNTS_URL=http://huly.local:3000
|
- ACCOUNTS_URL=http://huly.local:3000
|
||||||
@ -193,7 +192,6 @@ services:
|
|||||||
- STATS_URL=http://huly.local:4900
|
- STATS_URL=http://huly.local:4900
|
||||||
- MAIL_URL=
|
- MAIL_URL=
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- REGION=
|
- REGION=
|
||||||
- ACCOUNTS_URL=http://huly.local:3000
|
- ACCOUNTS_URL=http://huly.local:3000
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
@ -219,7 +217,6 @@ services:
|
|||||||
- DB_URL=${DB_CR_URL}
|
- DB_URL=${DB_CR_URL}
|
||||||
- STATS_URL=http://huly.local:4900
|
- STATS_URL=http://huly.local:4900
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- ACCOUNTS_URL=http://huly.local:3000
|
- ACCOUNTS_URL=http://huly.local:3000
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
|
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
|
||||||
|
@ -46,7 +46,6 @@ services:
|
|||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- FRONT_URL=http://localhost:8087
|
- FRONT_URL=http://localhost:8087
|
||||||
- RESERVED_DB_NAMES=telegram,gmail,github
|
- RESERVED_DB_NAMES=telegram,gmail,github
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- LAST_NAME_FIRST=true
|
- LAST_NAME_FIRST=true
|
||||||
- ACCOUNTS_URL=http://localhost:3000
|
- ACCOUNTS_URL=http://localhost:3000
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
|
@ -22,14 +22,15 @@ import { devTool } from '.'
|
|||||||
|
|
||||||
import { addLocation } from '@hcengineering/platform'
|
import { addLocation } from '@hcengineering/platform'
|
||||||
import { serverActivityId } from '@hcengineering/server-activity'
|
import { serverActivityId } from '@hcengineering/server-activity'
|
||||||
|
import { serverAiBotId } from '@hcengineering/server-ai-bot'
|
||||||
import { serverAttachmentId } from '@hcengineering/server-attachment'
|
import { serverAttachmentId } from '@hcengineering/server-attachment'
|
||||||
import { serverCardId } from '@hcengineering/server-card'
|
|
||||||
import { serverCalendarId } from '@hcengineering/server-calendar'
|
import { serverCalendarId } from '@hcengineering/server-calendar'
|
||||||
|
import { serverCardId } from '@hcengineering/server-card'
|
||||||
import { serverChunterId } from '@hcengineering/server-chunter'
|
import { serverChunterId } from '@hcengineering/server-chunter'
|
||||||
import { serverCollaborationId } from '@hcengineering/server-collaboration'
|
import { serverCollaborationId } from '@hcengineering/server-collaboration'
|
||||||
import { serverContactId } from '@hcengineering/server-contact'
|
import { serverContactId } from '@hcengineering/server-contact'
|
||||||
import { serverDriveId } from '@hcengineering/server-drive'
|
|
||||||
import { serverDocumentId } from '@hcengineering/server-document'
|
import { serverDocumentId } from '@hcengineering/server-document'
|
||||||
|
import { serverDriveId } from '@hcengineering/server-drive'
|
||||||
import { serverGmailId } from '@hcengineering/server-gmail'
|
import { serverGmailId } from '@hcengineering/server-gmail'
|
||||||
import { serverGuestId } from '@hcengineering/server-guest'
|
import { serverGuestId } from '@hcengineering/server-guest'
|
||||||
import { serverHrId } from '@hcengineering/server-hr'
|
import { serverHrId } from '@hcengineering/server-hr'
|
||||||
@ -45,7 +46,6 @@ import { serverTelegramId } from '@hcengineering/server-telegram'
|
|||||||
import { serverTimeId } from '@hcengineering/server-time'
|
import { serverTimeId } from '@hcengineering/server-time'
|
||||||
import { serverTrackerId } from '@hcengineering/server-tracker'
|
import { serverTrackerId } from '@hcengineering/server-tracker'
|
||||||
import { serverViewId } from '@hcengineering/server-view'
|
import { serverViewId } from '@hcengineering/server-view'
|
||||||
import { serverAiBotId } from '@hcengineering/server-ai-bot'
|
|
||||||
|
|
||||||
addLocation(serverActivityId, () => import('@hcengineering/server-activity-resources'))
|
addLocation(serverActivityId, () => import('@hcengineering/server-activity-resources'))
|
||||||
addLocation(serverAttachmentId, () => import('@hcengineering/server-attachment-resources'))
|
addLocation(serverAttachmentId, () => import('@hcengineering/server-attachment-resources'))
|
||||||
@ -79,10 +79,7 @@ function prepareTools (): {
|
|||||||
version: Data<Version>
|
version: Data<Version>
|
||||||
migrateOperations: [string, MigrateOperation][]
|
migrateOperations: [string, MigrateOperation][]
|
||||||
} {
|
} {
|
||||||
const enabled = (process.env.MODEL_ENABLED ?? '*').split(',').map((it) => it.trim())
|
return { ...prepareToolsRaw(builder().getTxes()), version: getModelVersion(), migrateOperations }
|
||||||
const disabled = (process.env.MODEL_DISABLED ?? '').split(',').map((it) => it.trim())
|
|
||||||
|
|
||||||
return { ...prepareToolsRaw(builder(enabled, disabled).getTxes()), version: getModelVersion(), migrateOperations }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMongoDBUrl (): string {
|
export function getMongoDBUrl (): string {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import { writeFileSync } from 'fs'
|
import { writeFileSync } from 'fs'
|
||||||
import builder from './'
|
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)
|
writeFileSync(process.argv[2], model)
|
||||||
|
@ -143,7 +143,7 @@ export type { MigrateOperation } from '@hcengineering/model'
|
|||||||
* @param disabled - a set of disabled plugins
|
* @param disabled - a set of disabled plugins
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export default function buildModel (enabled: string[] = ['*'], disabled: string[] = []): Builder {
|
export default function buildModel (): Builder {
|
||||||
const builder = new Builder()
|
const builder = new Builder()
|
||||||
|
|
||||||
const defaultFilter = [
|
const defaultFilter = [
|
||||||
@ -323,10 +323,11 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
|||||||
boardModel,
|
boardModel,
|
||||||
boardId,
|
boardId,
|
||||||
{
|
{
|
||||||
label: undefined, // board.string.ConfigLabel,
|
label: board.string.ConfigLabel,
|
||||||
description: board.string.ConfigDescription,
|
description: board.string.ConfigDescription,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
beta: true,
|
beta: true,
|
||||||
|
hidden: true,
|
||||||
icon: board.icon.Board,
|
icon: board.icon.Board,
|
||||||
classFilter: defaultFilter
|
classFilter: defaultFilter
|
||||||
}
|
}
|
||||||
@ -335,10 +336,11 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
|||||||
bitrixModel,
|
bitrixModel,
|
||||||
bitrixId,
|
bitrixId,
|
||||||
{
|
{
|
||||||
label: undefined, // bitrix.string.ConfigLabel,
|
label: bitrix.string.ConfigLabel,
|
||||||
description: bitrix.string.ConfigDescription,
|
description: bitrix.string.ConfigDescription,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
beta: true,
|
beta: true,
|
||||||
|
hidden: true,
|
||||||
icon: bitrix.icon.Bitrix,
|
icon: bitrix.icon.Bitrix,
|
||||||
classFilter: defaultFilter
|
classFilter: defaultFilter
|
||||||
}
|
}
|
||||||
@ -505,9 +507,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
|||||||
pluginId: id,
|
pluginId: id,
|
||||||
transactions: txes.map((it) => it._id),
|
transactions: txes.map((it) => it._id),
|
||||||
...config,
|
...config,
|
||||||
enabled:
|
enabled: config?.label === undefined || ((config?.enabled ?? true) && !(config.hidden ?? false)),
|
||||||
config?.label === undefined ||
|
|
||||||
((config?.enabled ?? true) && (enabled.includes(id) || enabled.includes('*')) && !disabled.includes(id)),
|
|
||||||
beta: config?.beta ?? false
|
beta: config?.beta ?? false
|
||||||
},
|
},
|
||||||
('plugin-configuration-' + id) as Ref<PluginConfiguration>
|
('plugin-configuration-' + id) as Ref<PluginConfiguration>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import builder from './'
|
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)
|
console.log(model)
|
||||||
|
@ -268,12 +268,14 @@ export interface PluginConfiguration extends Doc {
|
|||||||
pluginId: Plugin
|
pluginId: Plugin
|
||||||
transactions: Ref<Doc>[]
|
transactions: Ref<Doc>[]
|
||||||
|
|
||||||
// If not set will not be shown in configuration UI
|
|
||||||
label?: IntlString
|
label?: IntlString
|
||||||
icon?: Asset
|
icon?: Asset
|
||||||
description?: IntlString
|
description?: IntlString
|
||||||
enabled: boolean
|
enabled: boolean
|
||||||
|
|
||||||
|
// If set will not be shown in configuration UI or enabled
|
||||||
|
hidden?: boolean
|
||||||
|
|
||||||
// If specified, will show beta/testing label in UI.
|
// If specified, will show beta/testing label in UI.
|
||||||
beta: boolean
|
beta: boolean
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<Scroller align={'center'} padding={'var(--spacing-3)'} bottomPadding={'var(--spacing-3)'}>
|
<Scroller align={'center'} padding={'var(--spacing-3)'} bottomPadding={'var(--spacing-3)'}>
|
||||||
<div class="flex-row-center flex-wrap gap-around-4">
|
<div class="flex-row-center flex-wrap gap-around-4">
|
||||||
{#each $pluginConfigurationStore.list as config}
|
{#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="cardBox flex-col clear-mins" class:enabled={config.enabled ?? true}>
|
||||||
<div class="flex-row-center">
|
<div class="flex-row-center">
|
||||||
<span class="mr-2">
|
<span class="mr-2">
|
||||||
|
@ -10,10 +10,7 @@ import { initStatisticsContext, loadBrandingMap } from '@hcengineering/server-co
|
|||||||
import { serveWorkspaceAccount } from '@hcengineering/workspace-service'
|
import { serveWorkspaceAccount } from '@hcengineering/workspace-service'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
||||||
const enabled = (process.env.MODEL_ENABLED ?? '*').split(',').map((it) => it.trim())
|
const txes = JSON.parse(JSON.stringify(builder().getTxes())) as Tx[]
|
||||||
const disabled = (process.env.MODEL_DISABLED ?? '').split(',').map((it) => it.trim())
|
|
||||||
|
|
||||||
const txes = JSON.parse(JSON.stringify(builder(enabled, disabled).getTxes())) as Tx[]
|
|
||||||
|
|
||||||
configureAnalytics(process.env.SENTRY_DSN, {})
|
configureAnalytics(process.env.SENTRY_DSN, {})
|
||||||
Analytics.setTag('application', 'workspace')
|
Analytics.setTag('application', 'workspace')
|
||||||
|
@ -107,7 +107,6 @@ services:
|
|||||||
- DB_URL=mongodb://mongodb:27018
|
- DB_URL=mongodb://mongodb:27018
|
||||||
- TRANSACTOR_URL=ws://transactor:3334;ws://huly.local:3334
|
- TRANSACTOR_URL=ws://transactor:3334;ws://huly.local:3334
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- BRANDING_PATH=/var/cfg/branding-test.json
|
- BRANDING_PATH=/var/cfg/branding-test.json
|
||||||
workspace:
|
workspace:
|
||||||
image: hardcoreeng/workspace
|
image: hardcoreeng/workspace
|
||||||
@ -125,7 +124,6 @@ services:
|
|||||||
- MONGO_URL=mongodb://mongodb:27018
|
- MONGO_URL=mongodb://mongodb:27018
|
||||||
- TRANSACTOR_URL=ws://transactor:3334;ws://huly.local:3334
|
- TRANSACTOR_URL=ws://transactor:3334;ws://huly.local:3334
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- ACCOUNTS_URL=http://account:3003
|
- ACCOUNTS_URL=http://account:3003
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -124,7 +124,6 @@ services:
|
|||||||
- REGION_INFO=|America
|
- REGION_INFO=|America
|
||||||
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
|
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
- STATS_URL=http://stats:4901
|
- STATS_URL=http://stats:4901
|
||||||
workspace:
|
workspace:
|
||||||
@ -142,7 +141,6 @@ services:
|
|||||||
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
|
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
|
||||||
- QUEUE_CONFIG=${QUEUE_CONFIG}
|
- QUEUE_CONFIG=${QUEUE_CONFIG}
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- REGION=
|
- REGION=
|
||||||
- ACCOUNTS_URL=http://account:3003
|
- ACCOUNTS_URL=http://account:3003
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
|
@ -143,7 +143,6 @@ services:
|
|||||||
- TRANSACTOR_URL=ws://huly.local:3334;ws://huly.local:3334,ws://huly.local:3335;ws://huly.local:3335;europe
|
- TRANSACTOR_URL=ws://huly.local:3334;ws://huly.local:3334,ws://huly.local:3335;ws://huly.local:3335;europe
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- FRONT_URL=http://huly.local:8083
|
- FRONT_URL=http://huly.local:8083
|
||||||
- MODEL_ENABLED=*
|
|
||||||
# - LAST_NAME_FIRST=true
|
# - LAST_NAME_FIRST=true
|
||||||
# - WS_LIVENESS_DAYS=1
|
# - WS_LIVENESS_DAYS=1
|
||||||
- ACCOUNTS_URL=http://huly.local:3003
|
- ACCOUNTS_URL=http://huly.local:3003
|
||||||
@ -177,7 +176,6 @@ services:
|
|||||||
- DB_URL=${DB_URL}
|
- DB_URL=${DB_URL}
|
||||||
- STATS_URL=http://huly.local:4901
|
- STATS_URL=http://huly.local:4901
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- REGION=
|
- REGION=
|
||||||
- ACCOUNTS_URL=http://huly.local:3003
|
- ACCOUNTS_URL=http://huly.local:3003
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
@ -203,7 +201,6 @@ services:
|
|||||||
- DB_URL=${DB_EU_URL}
|
- DB_URL=${DB_EU_URL}
|
||||||
- STATS_URL=http://huly.local:4901
|
- STATS_URL=http://huly.local:4901
|
||||||
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
- STORAGE_CONFIG=${STORAGE_CONFIG}
|
||||||
- MODEL_ENABLED=*
|
|
||||||
- ACCOUNTS_URL=http://huly.local:3003
|
- ACCOUNTS_URL=http://huly.local:3003
|
||||||
- BRANDING_PATH=/var/cfg/branding.json
|
- BRANDING_PATH=/var/cfg/branding.json
|
||||||
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
|
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
|
||||||
|
Loading…
Reference in New Issue
Block a user