cc-core-cli 1.0.57 → 1.0.58
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/package.json +1 -1
- package/template/admin/public/static/styles/layout.less +32 -1
- package/template/core/src/app_cluster.service.ts +1 -0
- package/template/core/src/core/core.controller.ts +8 -3
- package/template/core/src/core/core.module.ts +2 -0
- package/template/core/src/core/core.service.ts +9 -0
- package/template/core/src/main.ts +1 -1
package/package.json
CHANGED
|
@@ -314,7 +314,7 @@ html {
|
|
|
314
314
|
|
|
315
315
|
.ant-breadcrumb-link {
|
|
316
316
|
cursor: pointer;
|
|
317
|
-
|
|
317
|
+
.hover-link-breadcrumb {
|
|
318
318
|
color: @text-color;
|
|
319
319
|
|
|
320
320
|
&:hover {
|
|
@@ -1373,3 +1373,34 @@ html {
|
|
|
1373
1373
|
.drawer-menu-resize-collapsed {
|
|
1374
1374
|
transition: transform 0.3s cubic-bezier(0, 0.52, 0, 1);
|
|
1375
1375
|
}
|
|
1376
|
+
|
|
1377
|
+
.draggable-tree {
|
|
1378
|
+
.ant-tree-switcher_close {
|
|
1379
|
+
display: none;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.ant-tree-switcher-noop {
|
|
1383
|
+
display: none;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.ant-tree-switcher_open {
|
|
1387
|
+
display: none;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.icon-collapse-render {
|
|
1391
|
+
display: flex;
|
|
1392
|
+
width: 12px;
|
|
1393
|
+
padding: 15px;
|
|
1394
|
+
align-items: center;
|
|
1395
|
+
justify-content: center;
|
|
1396
|
+
flex: 0 0 auto;
|
|
1397
|
+
touch-action: none;
|
|
1398
|
+
cursor: var(--cursor, pointer);
|
|
1399
|
+
border-radius: 5px;
|
|
1400
|
+
border: none;
|
|
1401
|
+
outline: none;
|
|
1402
|
+
appearance: none;
|
|
1403
|
+
background-color: transparent;
|
|
1404
|
+
-webkit-tap-highlight-color: transparent;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
@@ -34,6 +34,7 @@ export class AppClusterService {
|
|
|
34
34
|
`A worker is now connected to ${address.address}:${address.port}`
|
|
35
35
|
);
|
|
36
36
|
const http: AxiosInstance = axios.create();
|
|
37
|
+
http.get(`${CONST.INTERNAL_DOMAIN}/entities/init_data`);
|
|
37
38
|
http.get(`${CONST.INTERNAL_DOMAIN}/user_role/reload_system`);
|
|
38
39
|
http.get(`${CONST.INTERNAL_DOMAIN}/translate/generate`);
|
|
39
40
|
http.get(`${CONST.INTERNAL_DOMAIN}/setting/update_version`);
|
|
@@ -37,7 +37,7 @@ export class CoreController {
|
|
|
37
37
|
@Get("/:entity/init")
|
|
38
38
|
async init(@Param() params: any): Promise<string> {
|
|
39
39
|
if (
|
|
40
|
-
!["mail_setting"
|
|
40
|
+
!["mail_setting"].includes(params.entity) &&
|
|
41
41
|
params.entity.indexOf("_setting") !== -1
|
|
42
42
|
) {
|
|
43
43
|
return "Not implement yet.";
|
|
@@ -45,6 +45,11 @@ export class CoreController {
|
|
|
45
45
|
return this.service.init(params.entity);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
@Get("/:entity/init_data")
|
|
49
|
+
async initData(@Param() params: any): Promise<void> {
|
|
50
|
+
await this.service.initData(params.entity);
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
@Basic()
|
|
49
54
|
@Get("/:entity")
|
|
50
55
|
async search(
|
|
@@ -52,7 +57,7 @@ export class CoreController {
|
|
|
52
57
|
@Query() query: any
|
|
53
58
|
): Promise<SearchResultDto> {
|
|
54
59
|
if (
|
|
55
|
-
!["mail_setting"
|
|
60
|
+
!["mail_setting"].includes(params.entity) &&
|
|
56
61
|
params.entity.indexOf("_setting") !== -1
|
|
57
62
|
) {
|
|
58
63
|
return this.serviceSetting.getSetting(params.entity);
|
|
@@ -150,7 +155,7 @@ export class CoreController {
|
|
|
150
155
|
@Query() query: any
|
|
151
156
|
): Promise<any> {
|
|
152
157
|
if (
|
|
153
|
-
!["mail_setting"
|
|
158
|
+
!["mail_setting"].includes(params.entity) &&
|
|
154
159
|
params.entity.indexOf("_setting") !== -1
|
|
155
160
|
) {
|
|
156
161
|
return this.serviceSetting.getSetting(params.entity, params.key);
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
ApiKeyModule,
|
|
16
16
|
AttachmentModule,
|
|
17
17
|
CommentDataModule,
|
|
18
|
+
CompanyModule,
|
|
18
19
|
CustomFunctionModule,
|
|
19
20
|
DeployModule,
|
|
20
21
|
ExecutionLogModule,
|
|
@@ -58,6 +59,7 @@ const RUN_CUSTOM_MODULES =
|
|
|
58
59
|
AttachmentModule,
|
|
59
60
|
AuditLogModule,
|
|
60
61
|
CommentDataModule,
|
|
62
|
+
CompanyModule,
|
|
61
63
|
CustomFunctionModule,
|
|
62
64
|
DeployModule,
|
|
63
65
|
ExecutionLogModule,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
AuditLogService,
|
|
18
18
|
CommentDataService,
|
|
19
19
|
CustomFunctionService,
|
|
20
|
+
CompanyService,
|
|
20
21
|
AddressService,
|
|
21
22
|
CountryService,
|
|
22
23
|
ProvinceService,
|
|
@@ -166,6 +167,7 @@ export class CoreService implements OnModuleInit {
|
|
|
166
167
|
@Inject(CommentDataService)
|
|
167
168
|
private readonly _commentDataService: CommentDataService;
|
|
168
169
|
@Inject(CountryService) private readonly _countryService: CountryService;
|
|
170
|
+
@Inject(CompanyService) private readonly _companyService: CompanyService;
|
|
169
171
|
@Inject(CustomFunctionService)
|
|
170
172
|
private readonly _customFunctionService: CustomFunctionService;
|
|
171
173
|
@Inject(DeployDestinationService)
|
|
@@ -272,6 +274,8 @@ export class CoreService implements OnModuleInit {
|
|
|
272
274
|
return this._commentDataService;
|
|
273
275
|
case "country":
|
|
274
276
|
return this._countryService;
|
|
277
|
+
case "company":
|
|
278
|
+
return this._companyService;
|
|
275
279
|
case "custom_function":
|
|
276
280
|
return this._customFunctionService;
|
|
277
281
|
case "deploy_destination":
|
|
@@ -367,6 +371,11 @@ export class CoreService implements OnModuleInit {
|
|
|
367
371
|
return service.init();
|
|
368
372
|
}
|
|
369
373
|
|
|
374
|
+
public async initData(entityName: string): Promise<void> {
|
|
375
|
+
const service = await this._getService(entityName);
|
|
376
|
+
await service.initData();
|
|
377
|
+
}
|
|
378
|
+
|
|
370
379
|
public async search(
|
|
371
380
|
entityName: string,
|
|
372
381
|
keywords: string,
|
|
@@ -144,7 +144,6 @@ async function initial(app: NestFastifyApplication) {
|
|
|
144
144
|
await initialService(app, LanguageService);
|
|
145
145
|
await initialService(app, TranslateService);
|
|
146
146
|
await initialService(app, ActivityLogService);
|
|
147
|
-
await initialService(app, TemplateService);
|
|
148
147
|
await initialService(app, AttachmentService);
|
|
149
148
|
await initialService(app, AuditLogService);
|
|
150
149
|
|
|
@@ -196,6 +195,7 @@ async function initial(app: NestFastifyApplication) {
|
|
|
196
195
|
|
|
197
196
|
await initialCustomService(app);
|
|
198
197
|
|
|
198
|
+
await initialService(app, TemplateService);
|
|
199
199
|
await initialService(app, ImportExportService);
|
|
200
200
|
await initialService(app, ImportExportLogService);
|
|
201
201
|
|