UBERF-5511: Fix query and include ibm plex mono (#4764)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-02-25 12:17:49 +06:00
committed by GitHub
parent 88b91d7ce0
commit 804f514f5f
20 changed files with 162 additions and 72 deletions
+32 -16
View File
@@ -14,6 +14,8 @@
//
import core, {
DOMAIN_MODEL,
cutObjectArray,
type Account,
type AccountClient,
type Class,
@@ -23,20 +25,20 @@ import core, {
type FindOptions,
type FindResult,
type Hierarchy,
type MeasureDoneOperation,
type ModelDb,
type Ref,
type SearchOptions,
type SearchQuery,
type SearchResult,
type Tx,
type TxResult,
type WithLookup,
type SearchQuery,
type SearchOptions,
type SearchResult,
type MeasureDoneOperation,
DOMAIN_MODEL
type WithLookup
} from '@hcengineering/core'
import { devModelId } from '@hcengineering/devmodel'
import { Builder } from '@hcengineering/model'
import { type IntlString, type Resources, getMetadata } from '@hcengineering/platform'
import { getMetadata, type IntlString, type Resources } from '@hcengineering/platform'
import { testing } from '@hcengineering/ui'
import view from '@hcengineering/view'
import workbench from '@hcengineering/workbench'
import ModelView from './components/ModelView.svelte'
@@ -63,7 +65,11 @@ class ModelClient implements AccountClient {
client.notify = (...tx) => {
this.notify?.(...tx)
if (this.notifyEnabled) {
console.debug('devmodel# notify=>', tx, this.client.getModel(), getMetadata(devmodel.metadata.DevModel))
console.debug(
'devmodel# notify=>',
testing ? JSON.stringify(cutObjectArray(tx)).slice(0, 160) : tx,
getMetadata(devmodel.metadata.DevModel)
)
}
}
}
@@ -97,13 +103,11 @@ class ModelClient implements AccountClient {
if (this.notifyEnabled && !isModel) {
console.debug(
'devmodel# findOne=>',
isModel,
this.getHierarchy().findDomain(_class),
_class,
query,
testing ? JSON.stringify(cutObjectArray(query)) : query,
options,
'result => ',
result,
testing ? JSON.stringify(cutObjectArray(result)) : result,
' =>model',
this.client.getModel(),
getMetadata(devmodel.metadata.DevModel),
@@ -125,10 +129,10 @@ class ModelClient implements AccountClient {
console.debug(
'devmodel# findAll=>',
_class,
query,
testing ? JSON.stringify(cutObjectArray(query)).slice(0, 160) : query,
options,
'result => ',
result,
testing ? JSON.stringify(cutObjectArray(result)).slice(0, 160) : result,
' =>model',
this.client.getModel(),
getMetadata(devmodel.metadata.DevModel),
@@ -141,7 +145,13 @@ class ModelClient implements AccountClient {
async searchFulltext (query: SearchQuery, options: SearchOptions): Promise<SearchResult> {
const result = await this.client.searchFulltext(query, options)
if (this.notifyEnabled) {
console.debug('devmodel# searchFulltext=>', query, options, 'result => ', result)
console.debug(
'devmodel# searchFulltext=>',
testing ? JSON.stringify(cutObjectArray(query)).slice(0, 160) : query,
options,
'result => ',
result
)
}
return result
}
@@ -150,7 +160,13 @@ class ModelClient implements AccountClient {
const startTime = Date.now()
const result = await this.client.tx(tx)
if (this.notifyEnabled) {
console.debug('devmodel# tx=>', tx, result, getMetadata(devmodel.metadata.DevModel), Date.now() - startTime)
console.debug(
'devmodel# tx=>',
testing ? JSON.stringify(cutObjectArray(tx)).slice(0, 160) : tx,
result,
getMetadata(devmodel.metadata.DevModel),
Date.now() - startTime
)
}
return result
}