@acorex-platform/module-platform-management-client 0.0.21
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/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-V_ao4WVM.mjs +4599 -0
- package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-V_ao4WVM.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs +179 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-2Qu7aoCp.mjs +1542 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-2Qu7aoCp.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs +71 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-customize-menu.command-2319iHsD.mjs +231 -0
- package/fesm2022/acorex-platform-module-platform-management-client-customize-menu.command-2319iHsD.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs +52 -0
- package/fesm2022/acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs +55 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-execute-token.command-DNuHR-0y.mjs +152 -0
- package/fesm2022/acorex-platform-module-platform-management-client-execute-token.command-DNuHR-0y.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs +71 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs +68 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs +194 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs +136 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs +122 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-menu-list.component-C5HH5-Dw.mjs +524 -0
- package/fesm2022/acorex-platform-module-platform-management-client-menu-list.component-C5HH5-Dw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs +216 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs +81 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs +137 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-CYb2zOSj.mjs +45 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-CYb2zOSj.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BBwrzcXa.mjs +178 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BBwrzcXa.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DBlZVz6u.mjs +45 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DBlZVz6u.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-platform-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-platform-management-client-contracts.d.ts +258 -0
- package/types/acorex-platform-module-platform-management-client.d.ts +548 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-menu-list.component-C5HH5-Dw.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/menu-management/pages/menu-list/menu-list.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/menu-management/pages/menu-list/menu-list.component.html"],"sourcesContent":["\nimport { AXPActionMenuItem, AXPExecuteCommand, AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTreeViewBeforeDropEvent, AXTreeViewComponent, AXTreeViewDropEvent, AXTreeViewNode } from '@acorex/components/tree-view';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPMenuItem } from '@acorex-platform/framework-client/common';\n\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPStateMessageComponent, AXPThemeLayoutBlockComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent, AXPPageLayoutComponent } from '@acorex-platform/framework-client/layout/views';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnDestroy,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Subject, takeUntil } from 'rxjs';\nimport { AXPMenuItemAction } from '../../menu-customization.types';\nimport { AXPMenuManagementService, AXPMenuTreeNodeData } from '../../menu-management.service';\n\n//#region ---- Menu List Component ----\n\n@Component({\n selector: 'axm-menu-list',\n imports: [\n CommonModule,\n AXButtonModule,\n AXDecoratorModule,\n AXDropdownButtonModule,\n AXDropdownModule,\n AXTranslationModule,\n AXTreeViewComponent,\n AXPPageLayoutComponent,\n AXPThemeLayoutBlockComponent,\n AXPStateMessageComponent,\n AXBadgeModule,\n ],\n templateUrl: './menu-list.component.html',\n styleUrls: ['./menu-list.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMMenuListComponent,\n },\n ],\n host: { class: 'axm-menu-list-page' },\n})\nexport class AXMMenuListComponent extends AXPPageLayoutBaseComponent implements OnInit, OnDestroy {\n //#region ---- Dependencies ----\n\n private menuManagementService = inject(AXPMenuManagementService);\n private layoutBuilder = inject(AXPLayoutBuilderService);\n protected dialogService = inject(AXDialogService);\n protected override toastService = inject(AXToastService);\n private translationService = inject(AXTranslationService);\n private route = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ---- Component State ----\n\n protected tree = viewChild(AXTreeViewComponent);\n protected treeNodes = signal<AXTreeViewNode[]>([]);\n protected isLoading = signal<boolean>(false);\n protected error = signal<string>('');\n protected currentScope = signal<AXPPlatformScope>(AXPPlatformScope.User);\n private isSyncing = false; // Prevent concurrent sync operations\n private destroy$ = new Subject<void>(); // For subscription cleanup\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n\n // Get scope from route (with memory leak prevention)\n this.route.params.pipe(takeUntil(this.destroy$)).subscribe(async (params) => {\n const scope = params['scope'] as AXPPlatformScope;\n if (scope) {\n this.currentScope.set(scope);\n await this.loadMenuItems();\n this.recompute(); // Update page header after loading\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n //#endregion\n\n //#region ---- Event Handlers ----\n\n /**\n * Handle before drop validation\n */\n async handleBeforeDrop(e: AXTreeViewBeforeDropEvent): Promise<void> {\n console.log('[handleBeforeDrop] Event triggered!', {\n movedNode: e.movedNode?.['id'],\n previousParent: e.previousParent?.['id'],\n currentParent: e.currentParent?.['id'],\n previousIndex: e.previousIndex,\n currentIndex: e.currentIndex,\n });\n\n const targetParent = (e.currentParent?.['data'] as AXPMenuTreeNodeData) || null;\n\n // Prevent dropping into items with paths (leaf nodes)\n if (targetParent?.menuItem?.path) {\n e.canceled = true;\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.move',\n );\n this.toastService.warning(message);\n return;\n }\n\n // Note: Circular reference validation is handled by the tree component itself\n // Additional validation can be added here if needed based on business rules\n }\n\n /**\n * Handle after drop event to sync changes\n * The event contains information about the moved node and its new position\n */\n async handleAfterDrop(event: AXTreeViewDropEvent): Promise<void> {\n console.log('[handleAfterDrop] Event triggered!', {\n movedNode: event.node?.['id'],\n movedNodeData: event.node?.['data'],\n previousParent: event.previousParent?.['id'],\n currentParent: event.currentParent?.['id'],\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n });\n\n // Check what the tree component has\n const treeComp = this.tree();\n if (treeComp) {\n console.log('[handleAfterDrop] Tree component datasource:', treeComp.datasource);\n }\n\n // Check our signal\n console.log('[handleAfterDrop] Our treeNodes signal:', this.treeNodes());\n\n await this.syncTreeChanges();\n }\n\n //#endregion\n\n //#region ---- Data Loading ----\n\n /**\n * Load menu tree for current scope\n */\n protected async loadMenuItems(): Promise<void> {\n try {\n this.isLoading.set(true);\n this.error.set('');\n\n const treeNodes = await this.menuManagementService.getMenuTreeByScope(this.currentScope());\n this.treeNodes.set(treeNodes);\n this.recompute();\n } catch (error) {\n this.error.set(error instanceof Error ? error.message : 'Failed to load menu items');\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.load',\n );\n this.toastService.danger(message);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Sync tree changes to backend\n */\n private async syncTreeChanges(): Promise<void> {\n // Prevent concurrent sync operations\n if (this.isSyncing) {\n return;\n }\n\n try {\n this.isSyncing = true;\n const scope = this.currentScope();\n\n // Get nodes from signal - the tree component mutates the array in place\n // so this.treeNodes() will have the updated structure after drag-drop\n const nodes = this.treeNodes();\n\n console.log('[syncTreeChanges] nodes count:', nodes?.length);\n \n // Log detailed node structure\n const logNode = (n: any, level: number = 0): any => ({\n id: n['id'],\n title: n['title'],\n level,\n childrenCount: (n['children'] as any[])?.length ?? 0,\n children: (n['children'] as any[])?.map((c: any) => logNode(c, level + 1)) ?? [],\n });\n console.log('[syncTreeChanges] Full tree structure:', JSON.stringify(nodes?.map(n => logNode(n)), null, 2));\n\n if (!nodes || nodes.length === 0) {\n console.log('[syncTreeChanges] No nodes to sync');\n return;\n }\n\n await this.menuManagementService.syncTreeChangesByScope(scope, nodes);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.reorder',\n );\n this.toastService.success(message);\n } catch (error) {\n console.error('Failed to sync tree changes:', error);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.sync',\n );\n this.toastService.danger(message);\n } finally {\n this.isSyncing = false;\n }\n }\n\n //#endregion\n\n //#region ---- Page Layout Interface ----\n\n /**\n * Get page title\n */\n override async getPageTitle(): Promise<string> {\n const scopeName = this.currentScope();\n const scopeKey = scopeName === AXPPlatformScope.User ? 'user' : 'tenant';\n return this.translationService.translateAsync(`@platform-management:menu-management.menus.${scopeKey}.title`);\n }\n\n /**\n * Get page description\n */\n override async getPageDescription(): Promise<string> {\n return this.translationService.translateAsync(\n '@platform-management:menu-management.components.menu-list.description',\n );\n }\n\n /**\n * Get primary menu items (actions)\n */\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n return [\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.add-root.title',\n ),\n icon: 'fa-light fa-plus',\n color: 'primary',\n command: { name: 'add-root' },\n },\n ];\n }\n\n /**\n * Get secondary menu items\n */\n override async getSecondaryMenuItems(): Promise<AXPActionMenuItem[]> {\n return [\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.collapse.title',\n ),\n icon: 'fa-light fa-minus-square',\n command: { name: 'collapse' },\n },\n\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.expand.title',\n ),\n icon: 'fa-light fa-plus-square',\n command: { name: 'expand' },\n break: true,\n },\n {\n title: await this.translationService.translateAsync('@platform-management:menu-management.actions.reset.title'),\n icon: 'fa-light fa-rotate-left',\n color: 'danger',\n command: { name: 'reset' },\n },\n ];\n }\n\n /**\n * Execute commands from page actions\n */\n override async execute(command: AXPExecuteCommand): Promise<void> {\n switch (command.name) {\n case 'add-root':\n await this.addRootMenuItem();\n break;\n case 'collapse':\n this.tree()?.collapseAll();\n break;\n case 'expand':\n this.tree()?.expandAll();\n break;\n case 'reset':\n await this.resetCustomizations();\n break;\n }\n }\n\n //#endregion\n\n //#region ---- Action Handlers ----\n\n /**\n * Handle menu item action\n */\n protected async onAction(action: AXPMenuItemAction, nodeData: AXPMenuTreeNodeData): Promise<void> {\n switch (action) {\n case 'show':\n await this.showMenuItem(nodeData);\n break;\n case 'hide':\n await this.hideMenuItem(nodeData);\n break;\n case 'edit':\n await this.editMenuItem(nodeData);\n break;\n case 'delete':\n await this.deleteMenuItem(nodeData);\n break;\n case 'add-child':\n await this.addChildMenuItem(nodeData);\n break;\n }\n }\n\n /**\n * Add new root menu item\n */\n protected async addRootMenuItem(): Promise<void> {\n await this.showMenuItemDialog(null, null);\n }\n\n /**\n * Add new child menu item\n */\n protected async addChildMenuItem(parentNodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.showMenuItemDialog(null, parentNodeData.menuItem.name);\n }\n\n /**\n * Reset customizations\n */\n protected async resetCustomizations(): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.reset.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.reset.confirm.message',\n );\n const confirmed = await this.dialogService.confirm(title, message);\n\n if (!confirmed) return;\n\n try {\n // Reset customizations for current scope\n await this.menuManagementService.resetCustomizationsByScope(this.currentScope());\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.reset',\n );\n this.toastService.success(message);\n } catch (error) {\n console.error('Failed to reset customizations:', error);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.reset',\n );\n this.toastService.danger(message);\n } finally {\n // Reload anyway to show current state\n await this.loadMenuItems();\n }\n }\n\n //#endregion\n\n //#region ---- Menu Item Actions ----\n\n /**\n * Show menu item\n */\n private async showMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.executeMenuAction(\n () => this.menuManagementService.showMenuItemByScope(this.currentScope(), nodeData.menuItem.name!),\n '@platform-management:menu-management.messages.success.show',\n '@platform-management:menu-management.messages.error.show',\n );\n }\n\n /**\n * Hide menu item\n */\n private async hideMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.executeMenuAction(\n () => this.menuManagementService.hideMenuItemByScope(this.currentScope(), nodeData.menuItem.name!),\n '@platform-management:menu-management.messages.success.hide',\n '@platform-management:menu-management.messages.error.hide',\n );\n }\n\n /**\n * Edit menu item\n */\n private async editMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.showMenuItemDialog(nodeData);\n }\n\n /**\n * Delete custom menu item\n */\n private async deleteMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n const title = await this.translationService.translateAsync('@general:actions.delete.title');\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.delete.confirm.message',\n );\n const confirmed = await this.dialogService.confirm(title, message);\n\n if (!confirmed) return;\n\n try {\n const item = nodeData.menuItem;\n if (!item.name) return;\n\n await this.menuManagementService.deleteCustomMenuItemByScope(this.currentScope(), item.name);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.delete',\n );\n this.toastService.success(message);\n await this.loadMenuItems();\n } catch (error) {\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.delete',\n );\n this.toastService.danger(message);\n }\n }\n\n //#endregion\n\n //#region ---- Dialog Helpers ----\n\n /**\n * Show menu item dialog (add/edit)\n */\n private async showMenuItemDialog(\n nodeData: AXPMenuTreeNodeData | null,\n parentName: string | null = null,\n ): Promise<void> {\n const item = nodeData?.menuItem;\n const isEdit = !!item;\n const title = isEdit\n ? '@platform-management:menu-management.components.edit-dialog.title'\n : '@platform-management:menu-management.components.add-dialog.title';\n\n const context = {\n name: item?.name || '',\n text: item?.text || '',\n type: item?.type || 'menu',\n icon: item?.icon || '',\n path: item?.path || '',\n priority: item?.priority || 0,\n description: item?.description || '',\n };\n\n const dialogRef: any = await this.layoutBuilder\n .create()\n .dialog((dialog: any) => {\n dialog\n .setTitle(title)\n .setContext(context)\n .content((flex: any) => {\n flex\n .setDirection('column')\n .formField('@platform-management:menu-management.fields.name', (field: any) => {\n field.path('name');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.name',\n validations: [{ rule: 'required' }],\n disabled: isEdit && nodeData?.metadata?.isBuiltIn,\n });\n })\n .formField('@platform-management:menu-management.fields.text', (field: any) => {\n field.path('text');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.text',\n validations: [{ rule: 'required' }],\n });\n })\n .formField('@platform-management:menu-management.fields.icon', (field: any) => {\n field.path('icon');\n field.customWidget('icon-chooser', {});\n })\n .formField('@platform-management:menu-management.fields.path', (field: any) => {\n field.path('path');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.path',\n disabled: isEdit && nodeData?.metadata?.isBuiltIn,\n });\n })\n .formField('@platform-management:menu-management.fields.priority', (field: any) => {\n field.path('priority');\n field.numberBox({\n placeholder: '@platform-management:menu-management.fields.priority',\n step: 10,\n });\n })\n .formField('@platform-management:menu-management.fields.description', (field: any) => {\n field.path('description');\n field.largeTextBox({\n placeholder: '@platform-management:menu-management.fields.description',\n rows: 3,\n });\n });\n })\n .setActions((actions: any) => {\n actions.cancel('@general:actions.cancel.title').submit('@general:actions.save.title');\n });\n })\n .show();\n\n const action = dialogRef.action();\n if (action === 'cancel') {\n dialogRef.close();\n return;\n }\n\n const formData = dialogRef.context() as Partial<AXPMenuItem>;\n\n try {\n if (isEdit && item?.name) {\n // Update existing item\n if (nodeData?.metadata?.isCustom) {\n await this.menuManagementService.updateCustomMenuItemByScope(\n this.currentScope(),\n item.name,\n formData as AXPMenuItem,\n );\n } else {\n await this.menuManagementService.updateMenuPropertiesByScope(this.currentScope(), item.name, formData);\n }\n } else {\n // Add new custom item\n const newItem: AXPMenuItem = {\n name: formData.name!,\n text: formData.text!,\n icon: formData.icon,\n path: formData.path,\n priority: formData.priority,\n description: formData.description,\n };\n\n // If parent is specified, add as child\n if (parentName) {\n // Add custom item as child of parent\n await this.menuManagementService.addCustomMenuItemByScope(this.currentScope(), newItem, parentName);\n } else {\n // Add as root level item\n await this.menuManagementService.addCustomMenuItemByScope(this.currentScope(), newItem, null);\n }\n }\n\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.save',\n );\n this.toastService.success(message);\n await this.loadMenuItems();\n dialogRef.close();\n } catch (error) {\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.save',\n );\n this.toastService.danger(message);\n }\n }\n\n /**\n * Execute a menu action with common error handling\n */\n private async executeMenuAction(\n action: () => Promise<void>,\n successMessageKey: string,\n errorMessageKey: string,\n ): Promise<void> {\n try {\n await action();\n const message = await this.translationService.translateAsync(successMessageKey);\n this.toastService.success(message);\n await this.loadMenuItems();\n } catch (error) {\n console.error('Menu action failed:', error);\n const message = await this.translationService.translateAsync(errorMessageKey);\n this.toastService.danger(message);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions\" [look]=\"'blank'\" [size]=\"'sm'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n"],"names":["i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA;AA6BM,MAAO,oBAAqB,SAAQ,0BAA0B,CAAA;AA3BpE,IAAA,WAAA,GAAA;;;AA8BU,QAAA,IAAA,CAAA,qBAAqB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACxD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC7C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AAC9B,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;;;QAM5B,IAAA,CAAA,IAAI,GAAG,SAAS,CAAC,mBAAmB;iFAAC;QACrC,IAAA,CAAA,SAAS,GAAG,MAAM,CAAmB,EAAE;sFAAC;QACxC,IAAA,CAAA,SAAS,GAAG,MAAM,CAAU,KAAK;sFAAC;QAClC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAS,EAAE;kFAAC;AAC1B,QAAA,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;wBACtB,4BAA4B;wBAC5B,wBAAwB;wBACxB,aAAa;AACd,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC1B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oBAAsB;AAClC,yBAAA;AACF,qBAAA,EAAA,IAAA,EACK,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAA,QAAA,EAAA,mwQAAA,EAAA,MAAA,EAAA,CAAA,mnHAAA,CAAA,EAAA;sFAgBV,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
2
|
+
import { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';
|
|
3
|
+
import { runtimeQuerySuccessObject, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, Injectable } from '@angular/core';
|
|
6
|
+
import { a as queryEntityItems, P as PLATFORM_CHART_COLORS, t as titleCaseStatus, r as resolveDisplayTitle, c as countInsightErrors } from './acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs';
|
|
7
|
+
|
|
8
|
+
//#region ----- Imports -----
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ----- Tenants by status (bar) -----
|
|
11
|
+
/** Live bar series: TenantManagement.Tenant grouped by statusId. */
|
|
12
|
+
class AXMPlatformTenantsByStatusBarQuery {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.entityService = inject(AXPEntityService);
|
|
15
|
+
}
|
|
16
|
+
async fetch() {
|
|
17
|
+
try {
|
|
18
|
+
const tenants = await queryEntityItems(this.entityService, 'TenantManagement', 'Tenant');
|
|
19
|
+
const counts = new Map();
|
|
20
|
+
for (const tenant of tenants) {
|
|
21
|
+
const status = String(tenant['statusId'] ?? 'unknown');
|
|
22
|
+
counts.set(status, (counts.get(status) ?? 0) + 1);
|
|
23
|
+
}
|
|
24
|
+
// Stable order for known statuses, then any extras.
|
|
25
|
+
const preferred = ['active', 'pending', 'inactive', 'suspended', 'archived'];
|
|
26
|
+
const keys = [
|
|
27
|
+
...preferred.filter((k) => counts.has(k)),
|
|
28
|
+
...[...counts.keys()].filter((k) => !preferred.includes(k)).sort(),
|
|
29
|
+
];
|
|
30
|
+
return runtimeQuerySuccessObject({
|
|
31
|
+
items: keys.map((status, index) => ({
|
|
32
|
+
id: status,
|
|
33
|
+
label: titleCaseStatus(status),
|
|
34
|
+
value: counts.get(status) ?? 0,
|
|
35
|
+
color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],
|
|
36
|
+
})),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load tenants by status');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformTenantsByStatusBarQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformTenantsByStatusBarQuery, providedIn: 'root' }); }
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformTenantsByStatusBarQuery, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{ providedIn: 'root' }]
|
|
49
|
+
}] });
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ----- Applications by edition (donut) -----
|
|
52
|
+
/** Live donut series: ApplicationManagement.Application exploded by editionIds. */
|
|
53
|
+
class AXMPlatformApplicationsByEditionDonutQuery {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.entityService = inject(AXPEntityService);
|
|
56
|
+
}
|
|
57
|
+
async fetch() {
|
|
58
|
+
try {
|
|
59
|
+
const [apps, editions] = await Promise.all([
|
|
60
|
+
queryEntityItems(this.entityService, 'ApplicationManagement', 'Application'),
|
|
61
|
+
queryEntityItems(this.entityService, 'ApplicationManagement', 'Edition'),
|
|
62
|
+
]);
|
|
63
|
+
const editionTitleById = new Map();
|
|
64
|
+
for (const edition of editions) {
|
|
65
|
+
const id = String(edition['id'] ?? '');
|
|
66
|
+
if (id) {
|
|
67
|
+
editionTitleById.set(id, resolveDisplayTitle(edition['title']) || id);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const counts = new Map();
|
|
71
|
+
for (const app of apps) {
|
|
72
|
+
const editionIds = Array.isArray(app['editionIds']) ? app['editionIds'] : [];
|
|
73
|
+
if (editionIds.length === 0) {
|
|
74
|
+
const key = 'unassigned';
|
|
75
|
+
const current = counts.get(key) ?? { label: 'Unassigned', value: 0 };
|
|
76
|
+
current.value += 1;
|
|
77
|
+
counts.set(key, current);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
for (const editionId of editionIds) {
|
|
81
|
+
const key = String(editionId);
|
|
82
|
+
const current = counts.get(key) ?? {
|
|
83
|
+
label: editionTitleById.get(key) || key,
|
|
84
|
+
value: 0,
|
|
85
|
+
};
|
|
86
|
+
current.value += 1;
|
|
87
|
+
counts.set(key, current);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const items = [...counts.entries()]
|
|
91
|
+
.sort((a, b) => b[1].value - a[1].value || a[1].label.localeCompare(b[1].label))
|
|
92
|
+
.map(([id, row], index) => ({
|
|
93
|
+
id,
|
|
94
|
+
label: row.label,
|
|
95
|
+
value: row.value,
|
|
96
|
+
color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],
|
|
97
|
+
}));
|
|
98
|
+
return runtimeQuerySuccessObject({ items });
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load applications by edition');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformApplicationsByEditionDonutQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
105
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformApplicationsByEditionDonutQuery, providedIn: 'root' }); }
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformApplicationsByEditionDonutQuery, decorators: [{
|
|
108
|
+
type: Injectable,
|
|
109
|
+
args: [{ providedIn: 'root' }]
|
|
110
|
+
}] });
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region ----- Errors trend (line) -----
|
|
113
|
+
/** Live line series: SystemInsight error counts per day for the last 7 days. */
|
|
114
|
+
class AXMPlatformErrorsTrendLineQuery {
|
|
115
|
+
constructor() {
|
|
116
|
+
this.queryExecutor = inject(AXPQueryExecutor);
|
|
117
|
+
}
|
|
118
|
+
async fetch() {
|
|
119
|
+
try {
|
|
120
|
+
const now = new Date();
|
|
121
|
+
const dayMs = 24 * 60 * 60 * 1000;
|
|
122
|
+
const dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
123
|
+
const points = [];
|
|
124
|
+
const dayWindows = Array.from({ length: 7 }, (_, index) => {
|
|
125
|
+
const offset = 6 - index;
|
|
126
|
+
const dayEnd = new Date(now.getTime() - offset * dayMs);
|
|
127
|
+
const dayStart = new Date(dayEnd.getTime() - dayMs);
|
|
128
|
+
return { dayEnd, dayStart };
|
|
129
|
+
});
|
|
130
|
+
const counts = await Promise.all(dayWindows.map(({ dayStart, dayEnd }) => countInsightErrors(this.queryExecutor, dayStart, dayEnd)));
|
|
131
|
+
for (let i = 0; i < dayWindows.length; i++) {
|
|
132
|
+
points.push({
|
|
133
|
+
x: dayLabels[dayWindows[i].dayEnd.getDay()],
|
|
134
|
+
y: counts[i],
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return runtimeQuerySuccessObject({
|
|
138
|
+
series: [
|
|
139
|
+
{
|
|
140
|
+
id: 'errors',
|
|
141
|
+
label: 'Errors',
|
|
142
|
+
lineColor: '#ef4444',
|
|
143
|
+
fillColor: '#ef444420',
|
|
144
|
+
data: points,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load errors trend');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformErrorsTrendLineQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
154
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformErrorsTrendLineQuery, providedIn: 'root' }); }
|
|
155
|
+
}
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformErrorsTrendLineQuery, decorators: [{
|
|
157
|
+
type: Injectable,
|
|
158
|
+
args: [{ providedIn: 'root' }]
|
|
159
|
+
}] });
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region ----- Jobs by status (bar) -----
|
|
162
|
+
const JOB_STATUS_ORDER = [
|
|
163
|
+
'completed',
|
|
164
|
+
'failed',
|
|
165
|
+
'running',
|
|
166
|
+
'queued',
|
|
167
|
+
'scheduled',
|
|
168
|
+
'created',
|
|
169
|
+
'paused',
|
|
170
|
+
'cancelled',
|
|
171
|
+
'dead-lettered',
|
|
172
|
+
];
|
|
173
|
+
/** Live bar series: BackgroundJobManagement.BackgroundJob grouped by status. */
|
|
174
|
+
class AXMPlatformJobsByStatusBarQuery {
|
|
175
|
+
constructor() {
|
|
176
|
+
this.entityService = inject(AXPEntityService);
|
|
177
|
+
}
|
|
178
|
+
async fetch() {
|
|
179
|
+
try {
|
|
180
|
+
const jobs = await queryEntityItems(this.entityService, 'BackgroundJobManagement', 'BackgroundJob');
|
|
181
|
+
const counts = new Map();
|
|
182
|
+
for (const job of jobs) {
|
|
183
|
+
const status = String(job['status'] ?? 'unknown');
|
|
184
|
+
counts.set(status, (counts.get(status) ?? 0) + 1);
|
|
185
|
+
}
|
|
186
|
+
const keys = [
|
|
187
|
+
...JOB_STATUS_ORDER.filter((k) => counts.has(k)),
|
|
188
|
+
...[...counts.keys()].filter((k) => !JOB_STATUS_ORDER.includes(k)).sort(),
|
|
189
|
+
];
|
|
190
|
+
// Always show the common statuses even when empty so the chart stays readable.
|
|
191
|
+
const displayKeys = keys.length > 0
|
|
192
|
+
? keys
|
|
193
|
+
: ['completed', 'failed', 'running', 'queued'];
|
|
194
|
+
return runtimeQuerySuccessObject({
|
|
195
|
+
items: displayKeys.map((status, index) => ({
|
|
196
|
+
id: status,
|
|
197
|
+
label: titleCaseStatus(status),
|
|
198
|
+
value: counts.get(status) ?? 0,
|
|
199
|
+
color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],
|
|
200
|
+
})),
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load jobs by status');
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformJobsByStatusBarQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
208
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformJobsByStatusBarQuery, providedIn: 'root' }); }
|
|
209
|
+
}
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformJobsByStatusBarQuery, decorators: [{
|
|
211
|
+
type: Injectable,
|
|
212
|
+
args: [{ providedIn: 'root' }]
|
|
213
|
+
}] });
|
|
214
|
+
|
|
215
|
+
export { AXMPlatformApplicationsByEditionDonutQuery, AXMPlatformErrorsTrendLineQuery, AXMPlatformJobsByStatusBarQuery, AXMPlatformTenantsByStatusBarQuery };
|
|
216
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-charts.queries.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n AXPBarChartQueryResult,\n AXPDonutChartQueryResult,\n AXPLineChartQueryResult,\n} from '@acorex-platform/module-dashboard-management-contracts';\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n PLATFORM_CHART_COLORS,\n countInsightErrors,\n queryEntityItems,\n resolveDisplayTitle,\n titleCaseStatus,\n} from './platform-console-data.util';\n\n//#endregion\n\n//#region ----- Tenants by status (bar) -----\n\n/** Live bar series: TenantManagement.Tenant grouped by statusId. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformTenantsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const tenants = await queryEntityItems(this.entityService, 'TenantManagement', 'Tenant');\n const counts = new Map<string, number>();\n for (const tenant of tenants) {\n const status = String(tenant['statusId'] ?? 'unknown');\n counts.set(status, (counts.get(status) ?? 0) + 1);\n }\n\n // Stable order for known statuses, then any extras.\n const preferred = ['active', 'pending', 'inactive', 'suspended', 'archived'];\n const keys = [\n ...preferred.filter((k) => counts.has(k)),\n ...[...counts.keys()].filter((k) => !preferred.includes(k)).sort(),\n ];\n\n return runtimeQuerySuccessObject({\n items: keys.map((status, index) => ({\n id: status,\n label: titleCaseStatus(status),\n value: counts.get(status) ?? 0,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n })),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load tenants by status',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Applications by edition (donut) -----\n\n/** Live donut series: ApplicationManagement.Application exploded by editionIds. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformApplicationsByEditionDonutQuery\n implements AXPQuery<void, AXPDonutChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPDonutChartQueryResult> {\n try {\n const [apps, editions] = await Promise.all([\n queryEntityItems(this.entityService, 'ApplicationManagement', 'Application'),\n queryEntityItems(this.entityService, 'ApplicationManagement', 'Edition'),\n ]);\n\n const editionTitleById = new Map<string, string>();\n for (const edition of editions) {\n const id = String(edition['id'] ?? '');\n if (id) {\n editionTitleById.set(id, resolveDisplayTitle(edition['title']) || id);\n }\n }\n\n const counts = new Map<string, { label: string; value: number }>();\n for (const app of apps) {\n const editionIds = Array.isArray(app['editionIds']) ? (app['editionIds'] as string[]) : [];\n if (editionIds.length === 0) {\n const key = 'unassigned';\n const current = counts.get(key) ?? { label: 'Unassigned', value: 0 };\n current.value += 1;\n counts.set(key, current);\n continue;\n }\n for (const editionId of editionIds) {\n const key = String(editionId);\n const current = counts.get(key) ?? {\n label: editionTitleById.get(key) || key,\n value: 0,\n };\n current.value += 1;\n counts.set(key, current);\n }\n }\n\n const items = [...counts.entries()]\n .sort((a, b) => b[1].value - a[1].value || a[1].label.localeCompare(b[1].label))\n .map(([id, row], index) => ({\n id,\n label: row.label,\n value: row.value,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n }));\n\n return runtimeQuerySuccessObject({ items });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load applications by edition',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Errors trend (line) -----\n\n/** Live line series: SystemInsight error counts per day for the last 7 days. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformErrorsTrendLineQuery implements AXPQuery<void, AXPLineChartQueryResult> {\n private readonly queryExecutor = inject(AXPQueryExecutor);\n\n async fetch(): AXPQueryFetchResultPromise<AXPLineChartQueryResult> {\n try {\n const now = new Date();\n const dayMs = 24 * 60 * 60 * 1000;\n const dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n const points: Array<{ x: string; y: number }> = [];\n\n const dayWindows = Array.from({ length: 7 }, (_, index) => {\n const offset = 6 - index;\n const dayEnd = new Date(now.getTime() - offset * dayMs);\n const dayStart = new Date(dayEnd.getTime() - dayMs);\n return { dayEnd, dayStart };\n });\n const counts = await Promise.all(\n dayWindows.map(({ dayStart, dayEnd }) => countInsightErrors(this.queryExecutor, dayStart, dayEnd)),\n );\n for (let i = 0; i < dayWindows.length; i++) {\n points.push({\n x: dayLabels[dayWindows[i].dayEnd.getDay()],\n y: counts[i],\n });\n }\n\n return runtimeQuerySuccessObject({\n series: [\n {\n id: 'errors',\n label: 'Errors',\n lineColor: '#ef4444',\n fillColor: '#ef444420',\n data: points,\n },\n ],\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load errors trend',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Jobs by status (bar) -----\n\nconst JOB_STATUS_ORDER = [\n 'completed',\n 'failed',\n 'running',\n 'queued',\n 'scheduled',\n 'created',\n 'paused',\n 'cancelled',\n 'dead-lettered',\n] as const;\n\n/** Live bar series: BackgroundJobManagement.BackgroundJob grouped by status. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformJobsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const jobs = await queryEntityItems(\n this.entityService,\n 'BackgroundJobManagement',\n 'BackgroundJob',\n );\n const counts = new Map<string, number>();\n for (const job of jobs) {\n const status = String(job['status'] ?? 'unknown');\n counts.set(status, (counts.get(status) ?? 0) + 1);\n }\n\n const keys = [\n ...JOB_STATUS_ORDER.filter((k) => counts.has(k)),\n ...[...counts.keys()].filter((k) => !(JOB_STATUS_ORDER as readonly string[]).includes(k)).sort(),\n ];\n\n // Always show the common statuses even when empty so the chart stays readable.\n const displayKeys =\n keys.length > 0\n ? keys\n : (['completed', 'failed', 'running', 'queued'] as string[]);\n\n return runtimeQuerySuccessObject({\n items: displayKeys.map((status, index) => ({\n id: status,\n label: titleCaseStatus(status),\n value: counts.get(status) ?? 0,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n })),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load jobs by status',\n );\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAwBA;AAEA;AAEA;MAEa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,G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AA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { runtimeQueryCollectionData } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXMSystemInsightQueryKeys } from '@acorex-platform/module-system-insight-contracts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared helpers for Platform Console dashboard queries (entity counts + insight windows).
|
|
6
|
+
*/
|
|
7
|
+
//#region ----- Entity helpers -----
|
|
8
|
+
async function queryEntityTotal(entityService, moduleName, entityName) {
|
|
9
|
+
const data = entityService.withEntity(moduleName, entityName).data();
|
|
10
|
+
const result = await data.query({ skip: 0, take: 1 });
|
|
11
|
+
return typeof result.total === 'number' ? result.total : (result.items?.length ?? 0);
|
|
12
|
+
}
|
|
13
|
+
async function queryEntityItems(entityService, moduleName, entityName, take = 5000) {
|
|
14
|
+
const data = entityService.withEntity(moduleName, entityName).data();
|
|
15
|
+
const result = await data.query({ skip: 0, take });
|
|
16
|
+
return (result.items ?? []);
|
|
17
|
+
}
|
|
18
|
+
function resolveDisplayTitle(value) {
|
|
19
|
+
if (value == null) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
if (typeof value === 'string') {
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
26
|
+
const map = value;
|
|
27
|
+
return map['en-US'] || map['fa-IR'] || Object.values(map).find((v) => typeof v === 'string' && v) || '';
|
|
28
|
+
}
|
|
29
|
+
return String(value);
|
|
30
|
+
}
|
|
31
|
+
function titleCaseStatus(statusId) {
|
|
32
|
+
if (!statusId) {
|
|
33
|
+
return 'Unknown';
|
|
34
|
+
}
|
|
35
|
+
return statusId
|
|
36
|
+
.split(/[-_]/)
|
|
37
|
+
.filter(Boolean)
|
|
38
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
39
|
+
.join(' ');
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ----- System insight errors -----
|
|
43
|
+
function insightTimeFilter(from, to) {
|
|
44
|
+
return {
|
|
45
|
+
logic: 'and',
|
|
46
|
+
filters: [
|
|
47
|
+
{ field: 'from', operator: { type: 'equal' }, value: from.toISOString() },
|
|
48
|
+
{ field: 'to', operator: { type: 'equal' }, value: to.toISOString() },
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** Counts SystemInsight error events in `[from, to)` via the remote ErrorEvent:List query. */
|
|
53
|
+
async function countInsightErrors(queryExecutor, from, to) {
|
|
54
|
+
try {
|
|
55
|
+
const result = await queryExecutor.fetch(AXMSystemInsightQueryKeys.ErrorEvent.List, {
|
|
56
|
+
skip: 0,
|
|
57
|
+
take: 1,
|
|
58
|
+
filter: insightTimeFilter(from, to),
|
|
59
|
+
});
|
|
60
|
+
const page = runtimeQueryCollectionData(result);
|
|
61
|
+
return typeof page?.total === 'number' ? page.total : (page?.items?.length ?? 0);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ----- Chart colors -----
|
|
69
|
+
const PLATFORM_CHART_COLORS = [
|
|
70
|
+
'#43b57f',
|
|
71
|
+
'#3b82f6',
|
|
72
|
+
'#f59e0b',
|
|
73
|
+
'#ef4444',
|
|
74
|
+
'#8b5cf6',
|
|
75
|
+
'#0ea5e9',
|
|
76
|
+
'#64748b',
|
|
77
|
+
];
|
|
78
|
+
//#endregion
|
|
79
|
+
|
|
80
|
+
export { PLATFORM_CHART_COLORS as P, queryEntityItems as a, countInsightErrors as c, queryEntityTotal as q, resolveDisplayTitle as r, titleCaseStatus as t };
|
|
81
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-data.util.ts"],"sourcesContent":["/**\n * Shared helpers for Platform Console dashboard queries (entity counts + insight windows).\n */\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { runtimeQueryCollectionData } from '@acorex-platform/framework-shared/core';\nimport { AXMSystemInsightQueryKeys } from '@acorex-platform/module-system-insight-contracts';\n\n//#region ----- Entity helpers -----\n\nexport async function queryEntityTotal(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n): Promise<number> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take: 1 });\n return typeof result.total === 'number' ? result.total : (result.items?.length ?? 0);\n}\n\nexport async function queryEntityItems(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n take = 5000,\n): Promise<Record<string, unknown>[]> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take });\n return (result.items ?? []) as unknown as Record<string, unknown>[];\n}\n\nexport function resolveDisplayTitle(value: unknown): string {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (typeof value === 'object' && !Array.isArray(value)) {\n const map = value as Record<string, string>;\n return map['en-US'] || map['fa-IR'] || Object.values(map).find((v) => typeof v === 'string' && v) || '';\n }\n return String(value);\n}\n\nexport function titleCaseStatus(statusId: string): string {\n if (!statusId) {\n return 'Unknown';\n }\n return statusId\n .split(/[-_]/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(' ');\n}\n\n//#endregion\n\n//#region ----- System insight errors -----\n\nfunction insightTimeFilter(from: Date, to: Date): Record<string, unknown> {\n return {\n logic: 'and',\n filters: [\n { field: 'from', operator: { type: 'equal' }, value: from.toISOString() },\n { field: 'to', operator: { type: 'equal' }, value: to.toISOString() },\n ],\n };\n}\n\n/** Counts SystemInsight error events in `[from, to)` via the remote ErrorEvent:List query. */\nexport async function countInsightErrors(\n queryExecutor: AXPQueryExecutor,\n from: Date,\n to: Date,\n): Promise<number> {\n try {\n const result = await queryExecutor.fetch<Record<string, unknown>, unknown>(\n AXMSystemInsightQueryKeys.ErrorEvent.List,\n {\n skip: 0,\n take: 1,\n filter: insightTimeFilter(from, to),\n },\n );\n const page = runtimeQueryCollectionData(result);\n return typeof page?.total === 'number' ? page.total : (page?.items?.length ?? 0);\n } catch {\n return 0;\n }\n}\n\n//#endregion\n\n//#region ----- Chart colors -----\n\nexport const PLATFORM_CHART_COLORS = [\n '#43b57f',\n '#3b82f6',\n '#f59e0b',\n '#ef4444',\n '#8b5cf6',\n '#0ea5e9',\n '#64748b',\n] as const;\n\n//#endregion\n"],"names":[],"mappings":";;;AAAA;;AAEG;AAOH;AAEO,eAAe,gBAAgB,CACpC,aAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAAA;AAElB,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE;AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrD,OAAO,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC;AACtF;AAEO,eA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'@acorex-platform/framework-client/runtime';
|
|
3
|
+
import { runtimeQuerySuccessObject, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, Injectable } from '@angular/core';
|
|
6
|
+
import { q as queryEntityTotal, c as countInsightErrors } from './acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs';
|
|
7
|
+
|
|
8
|
+
//#region ----- Imports -----
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ----- Tenants KPI -----
|
|
11
|
+
/** Live KPI: total rows in TenantManagement.Tenant. */
|
|
12
|
+
class AXMPlatformTenantsKpiQuery {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.entityService = inject(AXPEntityService);
|
|
15
|
+
}
|
|
16
|
+
async fetch() {
|
|
17
|
+
try {
|
|
18
|
+
const value = await queryEntityTotal(this.entityService, 'TenantManagement', 'Tenant');
|
|
19
|
+
return runtimeQuerySuccessObject({
|
|
20
|
+
title: 'Tenants',
|
|
21
|
+
value,
|
|
22
|
+
icon: 'fa-light fa-building',
|
|
23
|
+
iconTone: 'primary',
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load tenants KPI');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformTenantsKpiQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
31
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformTenantsKpiQuery, providedIn: 'root' }); }
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformTenantsKpiQuery, decorators: [{
|
|
34
|
+
type: Injectable,
|
|
35
|
+
args: [{ providedIn: 'root' }]
|
|
36
|
+
}] });
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ----- Users KPI -----
|
|
39
|
+
/** Live KPI: total memberships in TenantManagement.TenantUser (platform-wide). */
|
|
40
|
+
class AXMPlatformUsersKpiQuery {
|
|
41
|
+
constructor() {
|
|
42
|
+
this.entityService = inject(AXPEntityService);
|
|
43
|
+
}
|
|
44
|
+
async fetch() {
|
|
45
|
+
try {
|
|
46
|
+
const value = await queryEntityTotal(this.entityService, 'TenantManagement', 'TenantUser');
|
|
47
|
+
return runtimeQuerySuccessObject({
|
|
48
|
+
title: 'Users',
|
|
49
|
+
value,
|
|
50
|
+
icon: 'fa-light fa-users',
|
|
51
|
+
iconTone: 'info',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load users KPI');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformUsersKpiQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
59
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformUsersKpiQuery, providedIn: 'root' }); }
|
|
60
|
+
}
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformUsersKpiQuery, decorators: [{
|
|
62
|
+
type: Injectable,
|
|
63
|
+
args: [{ providedIn: 'root' }]
|
|
64
|
+
}] });
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ----- Applications KPI -----
|
|
67
|
+
/** Live KPI: total rows in ApplicationManagement.Application. */
|
|
68
|
+
class AXMPlatformApplicationsKpiQuery {
|
|
69
|
+
constructor() {
|
|
70
|
+
this.entityService = inject(AXPEntityService);
|
|
71
|
+
}
|
|
72
|
+
async fetch() {
|
|
73
|
+
try {
|
|
74
|
+
const value = await queryEntityTotal(this.entityService, 'ApplicationManagement', 'Application');
|
|
75
|
+
return runtimeQuerySuccessObject({
|
|
76
|
+
title: 'Applications',
|
|
77
|
+
value,
|
|
78
|
+
icon: 'fa-light fa-grid-2',
|
|
79
|
+
iconTone: 'secondary',
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load applications KPI');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformApplicationsKpiQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
87
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformApplicationsKpiQuery, providedIn: 'root' }); }
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformApplicationsKpiQuery, decorators: [{
|
|
90
|
+
type: Injectable,
|
|
91
|
+
args: [{ providedIn: 'root' }]
|
|
92
|
+
}] });
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region ----- Errors KPI -----
|
|
95
|
+
/** Live KPI: SystemInsight error events in the last 24 hours vs prior 24 hours. */
|
|
96
|
+
class AXMPlatformErrorsKpiQuery {
|
|
97
|
+
constructor() {
|
|
98
|
+
this.queryExecutor = inject(AXPQueryExecutor);
|
|
99
|
+
}
|
|
100
|
+
async fetch() {
|
|
101
|
+
try {
|
|
102
|
+
const now = new Date();
|
|
103
|
+
const dayMs = 24 * 60 * 60 * 1000;
|
|
104
|
+
const from24h = new Date(now.getTime() - dayMs);
|
|
105
|
+
const from48h = new Date(now.getTime() - 2 * dayMs);
|
|
106
|
+
const [current, previous] = await Promise.all([
|
|
107
|
+
countInsightErrors(this.queryExecutor, from24h, now),
|
|
108
|
+
countInsightErrors(this.queryExecutor, from48h, from24h),
|
|
109
|
+
]);
|
|
110
|
+
const delta = current - previous;
|
|
111
|
+
const trendValue = delta === 0 ? '0' : delta > 0 ? `+${delta}` : String(delta);
|
|
112
|
+
return runtimeQuerySuccessObject({
|
|
113
|
+
title: 'Errors (24h)',
|
|
114
|
+
value: current,
|
|
115
|
+
icon: 'fa-light fa-triangle-exclamation',
|
|
116
|
+
iconTone: current > 0 ? 'danger' : 'success',
|
|
117
|
+
trendValue,
|
|
118
|
+
trendLabel: 'vs prior day',
|
|
119
|
+
trendStatus: delta > 0 ? 'danger' : delta < 0 ? 'success' : 'neutral',
|
|
120
|
+
titleBadgeText: '24h',
|
|
121
|
+
titleBadgeTone: 'warning',
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load errors KPI');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformErrorsKpiQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
129
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformErrorsKpiQuery, providedIn: 'root' }); }
|
|
130
|
+
}
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPlatformErrorsKpiQuery, decorators: [{
|
|
132
|
+
type: Injectable,
|
|
133
|
+
args: [{ providedIn: 'root' }]
|
|
134
|
+
}] });
|
|
135
|
+
|
|
136
|
+
export { AXMPlatformApplicationsKpiQuery, AXMPlatformErrorsKpiQuery, AXMPlatformTenantsKpiQuery, AXMPlatformUsersKpiQuery };
|
|
137
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-kpi.queries.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPKpiStatCardQueryResult } from '@acorex-platform/module-dashboard-management-contracts';\n\nimport { Injectable, inject } from '@angular/core';\nimport { countInsightErrors, queryEntityTotal } from './platform-console-data.util';\n\n//#endregion\n\n//#region ----- Tenants KPI -----\n\n/** Live KPI: total rows in TenantManagement.Tenant. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformTenantsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'TenantManagement', 'Tenant');\n return runtimeQuerySuccessObject({\n title: 'Tenants',\n value,\n icon: 'fa-light fa-building',\n iconTone: 'primary',\n });\n } catch (error) {\n return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load tenants KPI');\n }\n }\n}\n\n//#endregion\n\n//#region ----- Users KPI -----\n\n/** Live KPI: total memberships in TenantManagement.TenantUser (platform-wide). */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformUsersKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'TenantManagement', 'TenantUser');\n return runtimeQuerySuccessObject({\n title: 'Users',\n value,\n icon: 'fa-light fa-users',\n iconTone: 'info',\n });\n } catch (error) {\n return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load users KPI');\n }\n }\n}\n\n//#endregion\n\n//#region ----- Applications KPI -----\n\n/** Live KPI: total rows in ApplicationManagement.Application. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformApplicationsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'ApplicationManagement', 'Application');\n return runtimeQuerySuccessObject({\n title: 'Applications',\n value,\n icon: 'fa-light fa-grid-2',\n iconTone: 'secondary',\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load applications KPI',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Errors KPI -----\n\n/** Live KPI: SystemInsight error events in the last 24 hours vs prior 24 hours. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformErrorsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly queryExecutor = inject(AXPQueryExecutor);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const now = new Date();\n const dayMs = 24 * 60 * 60 * 1000;\n const from24h = new Date(now.getTime() - dayMs);\n const from48h = new Date(now.getTime() - 2 * dayMs);\n\n const [current, previous] = await Promise.all([\n countInsightErrors(this.queryExecutor, from24h, now),\n countInsightErrors(this.queryExecutor, from48h, from24h),\n ]);\n\n const delta = current - previous;\n const trendValue = delta === 0 ? '0' : delta > 0 ? `+${delta}` : String(delta);\n\n return runtimeQuerySuccessObject({\n title: 'Errors (24h)',\n value: current,\n icon: 'fa-light fa-triangle-exclamation',\n iconTone: current > 0 ? 'danger' : 'success',\n trendValue,\n trendLabel: 'vs prior day',\n trendStatus: delta > 0 ? 'danger' : delta < 0 ? 'success' : 'neutral',\n titleBadgeText: '24h',\n titleBadgeTone: 'warning',\n });\n } catch (error) {\n return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load errors KPI');\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAcA;AAEA;AAEA;MAEa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAe1D,IAAA;AAbC,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,IAAI;AACF,YAAA,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,kBAAkB,EAAE,QAAQ,CAAC;AACtF,YAAA,OAAO,yBAAyB,CAAC;AAC/B,gBAAA,KAAK,EAAE,SAAS;gBAChB,KAAK;AACL,gBAAA,IAAI,EAAE,sBAAsB;AAC5B,gBAAA,QAAQ,EAAE,SAAS;AACpB,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CAAC,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,4BAA4B,CAAC;QACnG;IACF;8GAfW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAA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