cc-core-cli 1.0.56 → 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/package.json +1 -1
- package/template/admin/public/static/styles/detail.less +1979 -1975
- package/template/admin/public/static/styles/layout.less +93 -52
- 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
|
@@ -43,7 +43,7 @@ html {
|
|
|
43
43
|
|
|
44
44
|
.main-body {
|
|
45
45
|
padding: 0 26px;
|
|
46
|
-
display
|
|
46
|
+
display: grid;
|
|
47
47
|
// width: calc(100% - 250px);
|
|
48
48
|
|
|
49
49
|
&.collapsed {
|
|
@@ -280,7 +280,7 @@ html {
|
|
|
280
280
|
.ant-card-body {
|
|
281
281
|
border: none;
|
|
282
282
|
// padding: 12px 16px;
|
|
283
|
-
padding
|
|
283
|
+
padding: 0px;
|
|
284
284
|
.ant-page-header {
|
|
285
285
|
padding: 0;
|
|
286
286
|
}
|
|
@@ -313,7 +313,8 @@ html {
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
.ant-breadcrumb-link {
|
|
316
|
-
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
.hover-link-breadcrumb {
|
|
317
318
|
color: @text-color;
|
|
318
319
|
|
|
319
320
|
&:hover {
|
|
@@ -420,11 +421,10 @@ html {
|
|
|
420
421
|
&.sider-collapsed {
|
|
421
422
|
z-index: 12;
|
|
422
423
|
// position: absolute;
|
|
423
|
-
|
|
424
424
|
|
|
425
425
|
.header-title,
|
|
426
426
|
.icon-collapsed {
|
|
427
|
-
display: none !important ;
|
|
427
|
+
display: none !important ;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
.logo-collapsed {
|
|
@@ -466,21 +466,20 @@ html {
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
&:hover {
|
|
469
|
-
|
|
470
469
|
.header-title,
|
|
471
|
-
.icon-collapsed {
|
|
472
|
-
display: inline-block !important;
|
|
473
|
-
justify-content: flex-end;
|
|
470
|
+
.icon-collapsed {
|
|
471
|
+
display: inline-block !important;
|
|
472
|
+
justify-content: flex-end;
|
|
474
473
|
}
|
|
475
474
|
.icon-collapsed {
|
|
476
|
-
justify-content: flex-end;
|
|
475
|
+
justify-content: flex-end;
|
|
477
476
|
display: flex !important;
|
|
478
477
|
}
|
|
479
478
|
|
|
480
479
|
.logo-collapsed {
|
|
481
480
|
width: 80%;
|
|
482
481
|
}
|
|
483
|
-
|
|
482
|
+
|
|
484
483
|
.main-sider {
|
|
485
484
|
.ant-menu {
|
|
486
485
|
.ant-menu-submenu
|
|
@@ -537,17 +536,17 @@ html {
|
|
|
537
536
|
.label {
|
|
538
537
|
white-space: nowrap;
|
|
539
538
|
overflow: hidden;
|
|
540
|
-
text-overflow: ellipsis;
|
|
539
|
+
text-overflow: ellipsis;
|
|
541
540
|
font-size: 15px;
|
|
542
541
|
font-weight: 500;
|
|
543
|
-
}
|
|
542
|
+
}
|
|
544
543
|
}
|
|
545
544
|
|
|
546
|
-
.icon-collapsed {
|
|
547
|
-
padding: 0px !important;
|
|
545
|
+
.icon-collapsed {
|
|
546
|
+
padding: 0px !important;
|
|
548
547
|
justify-content: flex-end;
|
|
549
548
|
display: flex;
|
|
550
|
-
|
|
549
|
+
|
|
551
550
|
.anticon {
|
|
552
551
|
svg {
|
|
553
552
|
cursor: pointer;
|
|
@@ -571,9 +570,9 @@ html {
|
|
|
571
570
|
}
|
|
572
571
|
|
|
573
572
|
.main-sider {
|
|
574
|
-
height: calc(100vh - 68px);
|
|
573
|
+
height: calc(100vh - 68px);
|
|
575
574
|
overflow: auto;
|
|
576
|
-
// width: 250px;
|
|
575
|
+
// width: 250px;
|
|
577
576
|
transition: width 0.2s;
|
|
578
577
|
z-index: 12;
|
|
579
578
|
|
|
@@ -1247,8 +1246,6 @@ html {
|
|
|
1247
1246
|
background-color: @primary-color !important;
|
|
1248
1247
|
}
|
|
1249
1248
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
1249
|
// ********* custom menu Lv4-5 **********
|
|
1253
1250
|
|
|
1254
1251
|
.layouts-card-header {
|
|
@@ -1257,31 +1254,34 @@ html {
|
|
|
1257
1254
|
}
|
|
1258
1255
|
}
|
|
1259
1256
|
|
|
1260
|
-
.layouts-sub-sider-horizontal {
|
|
1257
|
+
.layouts-sub-sider-horizontal {
|
|
1261
1258
|
border-top: solid 1px #e9e9e9;
|
|
1262
|
-
.ant-menu {
|
|
1263
|
-
.ant-menu-item {
|
|
1264
|
-
padding: 0px !important;
|
|
1265
|
-
margin-top: 0;
|
|
1266
|
-
}
|
|
1259
|
+
.ant-menu {
|
|
1260
|
+
.ant-menu-item {
|
|
1261
|
+
padding: 0px !important;
|
|
1262
|
+
margin-top: 0;
|
|
1263
|
+
}
|
|
1267
1264
|
}
|
|
1268
|
-
|
|
1265
|
+
|
|
1269
1266
|
.ant-menu-submenu-title {
|
|
1270
1267
|
.menu-label {
|
|
1271
1268
|
transition: padding 0.2s;
|
|
1272
|
-
}
|
|
1269
|
+
}
|
|
1273
1270
|
}
|
|
1274
1271
|
|
|
1275
1272
|
.ant-typography.ant-typography-secondary {
|
|
1276
|
-
color: @menu-item-color;
|
|
1273
|
+
color: @menu-item-color;
|
|
1277
1274
|
}
|
|
1278
1275
|
|
|
1279
|
-
.ant-menu-item .ant-menu-item-icon,
|
|
1276
|
+
.ant-menu-item .ant-menu-item-icon,
|
|
1277
|
+
.ant-menu-submenu-title .ant-menu-item-icon,
|
|
1278
|
+
.ant-menu-item .anticon,
|
|
1279
|
+
.ant-menu-submenu-title .anticon {
|
|
1280
1280
|
margin-right: 5px !important;
|
|
1281
1281
|
}
|
|
1282
|
-
|
|
1282
|
+
|
|
1283
1283
|
.ant-menu-item {
|
|
1284
|
-
a {
|
|
1284
|
+
a {
|
|
1285
1285
|
color: @menu-item-color;
|
|
1286
1286
|
|
|
1287
1287
|
&:hover {
|
|
@@ -1293,48 +1293,59 @@ html {
|
|
|
1293
1293
|
color: @menu-item-active-bg;
|
|
1294
1294
|
}
|
|
1295
1295
|
|
|
1296
|
-
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover,
|
|
1296
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover,
|
|
1297
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover,
|
|
1298
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-active,
|
|
1299
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-active,
|
|
1300
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-open,
|
|
1301
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-open,
|
|
1302
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected,
|
|
1303
|
+
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected {
|
|
1297
1304
|
color: @menu-item-active-bg !important;
|
|
1298
1305
|
border-bottom: 2px solid @menu-item-active-bg !important;
|
|
1299
1306
|
}
|
|
1300
1307
|
|
|
1301
|
-
.ant-menu-item:hover,
|
|
1302
|
-
|
|
1308
|
+
.ant-menu-item:hover,
|
|
1309
|
+
.ant-menu-item-active,
|
|
1310
|
+
.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,
|
|
1311
|
+
.ant-menu-submenu-active,
|
|
1312
|
+
.ant-menu-submenu-title:hover {
|
|
1313
|
+
color: @menu-item-group-title-color !important;
|
|
1303
1314
|
}
|
|
1304
|
-
|
|
1305
1315
|
}
|
|
1306
1316
|
|
|
1307
1317
|
.menu-item-a {
|
|
1308
|
-
display: block !important;
|
|
1318
|
+
display: block !important;
|
|
1309
1319
|
}
|
|
1310
1320
|
|
|
1311
1321
|
.sum-menu-item {
|
|
1312
1322
|
.ant-menu.ant-menu-sub.ant-menu-vertical {
|
|
1313
|
-
background-color: @menu-popup-bg !important;
|
|
1314
|
-
border-radius: 0px !important;
|
|
1323
|
+
background-color: @menu-popup-bg !important;
|
|
1324
|
+
border-radius: 0px !important;
|
|
1315
1325
|
}
|
|
1316
1326
|
|
|
1317
|
-
.ant-menu-item-selected a,
|
|
1327
|
+
.ant-menu-item-selected a,
|
|
1328
|
+
.ant-menu-item-selected a:hover {
|
|
1318
1329
|
color: @menu-item-active-bg;
|
|
1319
1330
|
}
|
|
1320
1331
|
|
|
1321
|
-
.ant-menu-item-selected a,
|
|
1322
|
-
|
|
1332
|
+
.ant-menu-item-selected a,
|
|
1333
|
+
.ant-menu-item-selected a {
|
|
1334
|
+
color: @menu-item-active-bg;
|
|
1323
1335
|
}
|
|
1324
1336
|
|
|
1325
1337
|
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
|
1326
|
-
background-color: unset !important;
|
|
1338
|
+
background-color: unset !important;
|
|
1327
1339
|
}
|
|
1328
1340
|
|
|
1329
1341
|
.ant-menu-item a:hover {
|
|
1330
|
-
color:
|
|
1342
|
+
color: @menu-item-active-bg;
|
|
1331
1343
|
}
|
|
1332
1344
|
}
|
|
1333
1345
|
|
|
1334
1346
|
// ********* end custom menu Lv4-5 **********
|
|
1335
1347
|
|
|
1336
|
-
|
|
1337
|
-
//
|
|
1348
|
+
//
|
|
1338
1349
|
.drawer-menu-resize {
|
|
1339
1350
|
display: flex;
|
|
1340
1351
|
position: relative;
|
|
@@ -1350,16 +1361,46 @@ html {
|
|
|
1350
1361
|
z-index: 100;
|
|
1351
1362
|
}
|
|
1352
1363
|
|
|
1353
|
-
.drawer-content {
|
|
1354
|
-
overflow: auto;
|
|
1355
|
-
transition: width 0.2s;
|
|
1364
|
+
.drawer-content {
|
|
1365
|
+
overflow: auto;
|
|
1366
|
+
transition: width 0.2s;
|
|
1356
1367
|
}
|
|
1357
1368
|
.open-drawer {
|
|
1358
1369
|
transition: width 0.2s;
|
|
1359
1370
|
}
|
|
1360
|
-
|
|
1361
1371
|
}
|
|
1362
1372
|
|
|
1363
1373
|
.drawer-menu-resize-collapsed {
|
|
1364
|
-
transition: transform .3s cubic-bezier(0, .52, 0, 1);
|
|
1365
|
-
}
|
|
1374
|
+
transition: transform 0.3s cubic-bezier(0, 0.52, 0, 1);
|
|
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
|
|