@things-factory/operato-board 5.0.14 → 6.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.html +2 -0
- package/client/pages/board-list-page.js +0 -6
- package/dist-server/migrations/1610516350460-SeedRole.js +8 -9
- package/dist-server/migrations/1610516350460-SeedRole.js.map +1 -1
- package/dist-server/service/board-favorite/board-favorite-query.js +4 -6
- package/dist-server/service/board-favorite/board-favorite-query.js.map +1 -1
- package/dist-server/service/board-secret/board-resolver.js +11 -11
- package/dist-server/service/board-secret/board-resolver.js.map +1 -1
- package/dist-server/service/board-secret/board-secret.js +3 -4
- package/dist-server/service/board-secret/board-secret.js.map +1 -1
- package/dist-server/service/domain-secret/domain-resolver.js +1 -2
- package/dist-server/service/domain-secret/domain-resolver.js.map +1 -1
- package/dist-server/service/domain-secret/domain-secret.js +3 -4
- package/dist-server/service/domain-secret/domain-secret.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -32
- package/server/migrations/1610516350460-SeedRole.ts +4 -4
- package/server/service/board-favorite/board-favorite-query.ts +6 -5
- package/server/service/board-secret/board-resolver.ts +4 -4
- package/server/service/domain-secret/domain-resolver.ts +2 -2
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-board",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.0",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"author": "heartyoh",
|
|
8
|
+
"author": "heartyoh <heartyoh@hatiolab.com>",
|
|
9
9
|
"description": "App for dashboarding",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
@@ -78,38 +78,38 @@
|
|
|
78
78
|
"@operato/shell": "^1.0.1",
|
|
79
79
|
"@operato/styles": "^1.0.0",
|
|
80
80
|
"@operato/utils": "^1.0.1",
|
|
81
|
-
"@things-factory/apptool-ui": "^
|
|
82
|
-
"@things-factory/auth-ui": "^
|
|
83
|
-
"@things-factory/board-service": "^
|
|
84
|
-
"@things-factory/board-ui": "^
|
|
85
|
-
"@things-factory/context-ui": "^
|
|
86
|
-
"@things-factory/export-ui": "^
|
|
87
|
-
"@things-factory/fav-base": "^
|
|
88
|
-
"@things-factory/font-base": "^
|
|
89
|
-
"@things-factory/form-ui": "^
|
|
90
|
-
"@things-factory/help": "^
|
|
91
|
-
"@things-factory/i18n-base": "^
|
|
92
|
-
"@things-factory/import-ui": "^
|
|
93
|
-
"@things-factory/integration-notification": "^
|
|
94
|
-
"@things-factory/integration-ui": "^
|
|
95
|
-
"@things-factory/layout-ui": "^
|
|
96
|
-
"@things-factory/more-ui": "^
|
|
97
|
-
"@things-factory/notification": "^
|
|
98
|
-
"@things-factory/oauth2-client": "^
|
|
99
|
-
"@things-factory/offline-ui": "^
|
|
81
|
+
"@things-factory/apptool-ui": "^6.0.0-alpha.0",
|
|
82
|
+
"@things-factory/auth-ui": "^6.0.0-alpha.0",
|
|
83
|
+
"@things-factory/board-service": "^6.0.0-alpha.0",
|
|
84
|
+
"@things-factory/board-ui": "^6.0.0-alpha.0",
|
|
85
|
+
"@things-factory/context-ui": "^6.0.0-alpha.0",
|
|
86
|
+
"@things-factory/export-ui": "^6.0.0-alpha.0",
|
|
87
|
+
"@things-factory/fav-base": "^6.0.0-alpha.0",
|
|
88
|
+
"@things-factory/font-base": "^6.0.0-alpha.0",
|
|
89
|
+
"@things-factory/form-ui": "^6.0.0-alpha.0",
|
|
90
|
+
"@things-factory/help": "^6.0.0-alpha.0",
|
|
91
|
+
"@things-factory/i18n-base": "^6.0.0-alpha.0",
|
|
92
|
+
"@things-factory/import-ui": "^6.0.0-alpha.0",
|
|
93
|
+
"@things-factory/integration-notification": "^6.0.0-alpha.0",
|
|
94
|
+
"@things-factory/integration-ui": "^6.0.0-alpha.0",
|
|
95
|
+
"@things-factory/layout-ui": "^6.0.0-alpha.0",
|
|
96
|
+
"@things-factory/more-ui": "^6.0.0-alpha.0",
|
|
97
|
+
"@things-factory/notification": "^6.0.0-alpha.0",
|
|
98
|
+
"@things-factory/oauth2-client": "^6.0.0-alpha.0",
|
|
99
|
+
"@things-factory/offline-ui": "^6.0.0-alpha.0",
|
|
100
100
|
"@things-factory/operato-license-checker": "^3.1.0",
|
|
101
|
-
"@things-factory/pdf": "^
|
|
102
|
-
"@things-factory/print-service": "^
|
|
103
|
-
"@things-factory/print-ui": "^
|
|
104
|
-
"@things-factory/resource-ui": "^
|
|
105
|
-
"@things-factory/scene-google-map": "^
|
|
106
|
-
"@things-factory/scene-visualizer": "^
|
|
107
|
-
"@things-factory/setting-ui": "^
|
|
108
|
-
"@things-factory/system-ui": "^
|
|
101
|
+
"@things-factory/pdf": "^6.0.0-alpha.0",
|
|
102
|
+
"@things-factory/print-service": "^6.0.0-alpha.0",
|
|
103
|
+
"@things-factory/print-ui": "^6.0.0-alpha.0",
|
|
104
|
+
"@things-factory/resource-ui": "^6.0.0-alpha.0",
|
|
105
|
+
"@things-factory/scene-google-map": "^6.0.0-alpha.0",
|
|
106
|
+
"@things-factory/scene-visualizer": "^6.0.0-alpha.0",
|
|
107
|
+
"@things-factory/setting-ui": "^6.0.0-alpha.0",
|
|
108
|
+
"@things-factory/system-ui": "^6.0.0-alpha.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@things-factory/board-test": "^
|
|
112
|
-
"@things-factory/builder": "^
|
|
111
|
+
"@things-factory/board-test": "^6.0.0-alpha.0",
|
|
112
|
+
"@things-factory/builder": "^6.0.0-alpha.0"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "e5b9823ab3ebc5d6ae5bcb4b5aa60c1306e4dd7e"
|
|
115
115
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
2
|
|
|
3
3
|
import { Privilege, Role, User } from '@things-factory/auth-base'
|
|
4
|
-
import { Domain } from '@things-factory/shell'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const PRIVILEGES_SEED = {
|
|
7
7
|
modeller: [
|
|
@@ -149,7 +149,7 @@ export class SeedRole1610516350460 implements MigrationInterface {
|
|
|
149
149
|
const userRepository = getRepository(User)
|
|
150
150
|
|
|
151
151
|
let users: User[] = await userRepository.find({ where: { userType: 'admin' }, relations: ['domains'] })
|
|
152
|
-
let domain: Domain = await getRepository(Domain).
|
|
152
|
+
let domain: Domain = await getRepository(Domain).findOneBy({
|
|
153
153
|
name: 'SYSTEM'
|
|
154
154
|
})
|
|
155
155
|
|
|
@@ -201,7 +201,7 @@ export class SeedRole1610516350460 implements MigrationInterface {
|
|
|
201
201
|
public async down(queryRunner: QueryRunner): Promise<any> {
|
|
202
202
|
const repository = getRepository(Role)
|
|
203
203
|
const privilegeRepository = getRepository(Privilege)
|
|
204
|
-
const domain: Domain = await getRepository(Domain).
|
|
204
|
+
const domain: Domain = await getRepository(Domain).findOneBy({
|
|
205
205
|
name: 'SYSTEM'
|
|
206
206
|
})
|
|
207
207
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ListParam, buildQuery } from '@things-factory/shell'
|
|
1
|
+
import { Args, Ctx, Query, Resolver } from 'type-graphql'
|
|
2
|
+
|
|
4
3
|
import { Board } from '@things-factory/board-service'
|
|
4
|
+
import { config } from '@things-factory/env'
|
|
5
5
|
import { Favorite } from '@things-factory/fav-base'
|
|
6
|
+
import { buildQuery, getRepository, ListParam } from '@things-factory/shell'
|
|
7
|
+
|
|
6
8
|
import { BoardFavorite, BoardFavoriteList } from './board-favorite-type'
|
|
7
|
-
import { config } from '@things-factory/env'
|
|
8
9
|
|
|
9
10
|
const ORMCONFIG = config.get('ormconfig', {})
|
|
10
11
|
const DATABASE_TYPE = ORMCONFIG.type
|
|
@@ -12,7 +13,7 @@ const DATABASE_TYPE = ORMCONFIG.type
|
|
|
12
13
|
@Resolver(BoardFavorite)
|
|
13
14
|
export class BoardFavoriteQuery {
|
|
14
15
|
@Query(returns => BoardFavoriteList, { description: 'To fetch multiple BoardFavorites' })
|
|
15
|
-
async favoriteBoards(@Args() params: ListParam, @Ctx() context:
|
|
16
|
+
async favoriteBoards(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<BoardFavoriteList> {
|
|
16
17
|
const { user } = context.state
|
|
17
18
|
|
|
18
19
|
const queryBuilder = getRepository(Board).createQueryBuilder()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Arg, Ctx, Query, Resolver } from 'type-graphql'
|
|
2
|
-
import { getRepository } from 'typeorm'
|
|
3
2
|
|
|
4
3
|
import { Board } from '@things-factory/board-service'
|
|
5
4
|
import { checkTarget, doSomething, getPermission } from '@things-factory/operato-license-checker'
|
|
5
|
+
import { getRepository } from '@things-factory/shell'
|
|
6
6
|
|
|
7
7
|
import { LicenseError } from '../../errors/license-error'
|
|
8
8
|
import { DomainSecret } from '../domain-secret/domain-secret'
|
|
@@ -13,16 +13,16 @@ const crypto = require('crypto')
|
|
|
13
13
|
@Resolver(Board)
|
|
14
14
|
export class BoardResolver {
|
|
15
15
|
@Query(returns => [String], { description: 'Board Usage Permissions' })
|
|
16
|
-
boardPermissions(@Ctx() context:
|
|
16
|
+
boardPermissions(@Ctx() context: ResolverContext): string[] {
|
|
17
17
|
return (getPermission('Permissions For Board Usage') || 'Modeller, Viewer').split(',').map(p => p.trim())
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@Query(returns => Board, { description: 'To fetch a board' })
|
|
21
|
-
async board(@Arg('id') id: string, @Ctx() context:
|
|
21
|
+
async board(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Board> {
|
|
22
22
|
const { domain } = context.state
|
|
23
23
|
|
|
24
24
|
var board = await getRepository(Board).findOne({
|
|
25
|
-
where: { domain, id }
|
|
25
|
+
where: { domain: { id: domain.id }, id }
|
|
26
26
|
})
|
|
27
27
|
if (domain) {
|
|
28
28
|
// 1. check domainSecret is over limit quantity or not
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Arg, Directive, Mutation, Resolver } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import { Repository } from 'typeorm'
|
|
3
3
|
|
|
4
|
-
import { Domain, DomainPatch } from '@things-factory/shell'
|
|
4
|
+
import { Domain, DomainPatch, getRepository } from '@things-factory/shell'
|
|
5
5
|
import { slugger } from '@things-factory/utils'
|
|
6
6
|
|
|
7
7
|
@Resolver(Domain)
|