From cd190b385add368b5907b61004361e8c58f83c09 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Mon, 23 Feb 2026 02:41:07 +0530 Subject: [PATCH] WEB-636 feat(system): implement system information section (#3207) WEB-636 fix(system): address code review feedback for stylelint and link security --- src/app/shared/icons.module.ts | 2 + .../system-information.component.html | 50 ++++++++ .../system-information.component.scss | 111 ++++++++++++++++++ .../system-information.component.ts | 45 +++++++ src/app/system/system-routing.module.ts | 6 + src/app/system/system.component.html | 34 ++++++ src/app/system/system.component.ts | 2 +- src/app/system/system.module.ts | 4 +- src/assets/translations/en-US.json | 15 +++ 9 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 src/app/system/system-information/system-information.component.html create mode 100644 src/app/system/system-information/system-information.component.scss create mode 100644 src/app/system/system-information/system-information.component.ts diff --git a/src/app/shared/icons.module.ts b/src/app/shared/icons.module.ts index 88fdb5d48..b57b37427 100644 --- a/src/app/shared/icons.module.ts +++ b/src/app/shared/icons.module.ts @@ -114,6 +114,7 @@ import { faAddressCard, faKeyboard, faInfo, + faInfoCircle, faTasks, faCoins, faPiggyBank, @@ -267,6 +268,7 @@ export class IconsModule { faAddressCard, faKeyboard, faInfo, + faInfoCircle, faTasks, faCoins, faPiggyBank, diff --git a/src/app/system/system-information/system-information.component.html b/src/app/system/system-information/system-information.component.html new file mode 100644 index 000000000..90a821e16 --- /dev/null +++ b/src/app/system/system-information/system-information.component.html @@ -0,0 +1,50 @@ + + +
+ +
+ + + + + + + + + + + + + + + + + +
{{ 'labels.version.Tenant' | translate }}{{ tenant }}
{{ 'labels.version.Mifos WebApp' | translate }}{{ mifosVersion }}
{{ 'labels.version.Apache Fineract' | translate }}{{ fineractVersion }}
{{ 'labels.version.Server' | translate }}{{ server }}
+
+ +
+

{{ 'labels.heading.Software Licensing' | translate }}

+ +

+ +

+ +

+ +
    +
  • +
  • +
  • +
  • +
  • +
+
+
+
diff --git a/src/app/system/system-information/system-information.component.scss b/src/app/system/system-information/system-information.component.scss new file mode 100644 index 000000000..3d0293f0e --- /dev/null +++ b/src/app/system/system-information/system-information.component.scss @@ -0,0 +1,111 @@ +/** + * Copyright since 2025 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +.system-info-section { + padding: 24px 16px; +} + +.system-info-table { + width: 100%; + max-width: 600px; + border-collapse: collapse; + + tr { + border-bottom: 1px solid var(--md-sys-color-outline-variant, #e0e0e0); + } + + td { + padding: 12px 16px; + } + + .info-label { + font-weight: 500; + color: var(--md-sys-color-on-surface-variant, #555); + width: 40%; + } + + .info-value { + font-weight: 600; + color: var(--md-sys-color-on-surface, #333); + } +} + +.licensing-section { + padding: 16px 24px; + + h2 { + color: #4caf50; + margin-top: 24px; + margin-bottom: 16px; + font-size: 1.5rem; + font-weight: 400; + } + + p { + line-height: 1.6; + margin-bottom: 12px; + color: var(--md-sys-color-on-surface-variant, #555); + } + + // stylelint-disable-next-line selector-pseudo-element-no-unknown + ::ng-deep a { + color: #4caf50; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + ul { + padding-left: 24px; + margin-top: 12px; + + li { + margin-bottom: 8px; + line-height: 1.5; + color: var(--md-sys-color-on-surface-variant, #555); + } + } +} + +// Dark theme support +:host-context(.dark-theme) { + .system-info-table { + tr { + border-bottom-color: rgb(255 255 255 / 30%); + } + + .info-label { + color: #bbb; + } + + .info-value { + color: rgb(255 255 255 / 87%); + } + } + + .licensing-section { + h2 { + color: #66bb6a; + } + + p { + color: rgb(255 255 255 / 70%); + } + + // stylelint-disable-next-line selector-pseudo-element-no-unknown + ::ng-deep a { + color: #0098ff; + } + + ul li { + color: rgb(255 255 255 / 70%); + } + } +} diff --git a/src/app/system/system-information/system-information.component.ts b/src/app/system/system-information/system-information.component.ts new file mode 100644 index 000000000..63a57a958 --- /dev/null +++ b/src/app/system/system-information/system-information.component.ts @@ -0,0 +1,45 @@ +/** + * Copyright since 2025 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +import { Component, OnInit, inject } from '@angular/core'; +import { MatCard } from '@angular/material/card'; +import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; +import { SettingsService } from 'app/settings/settings.service'; +import { VersionService } from 'app/system/version.service'; +import { environment } from '../../../environments/environment'; + +@Component({ + selector: 'mifosx-system-information', + templateUrl: './system-information.component.html', + styleUrls: ['./system-information.component.scss'], + imports: [ + ...STANDALONE_SHARED_IMPORTS, + MatCard + ] +}) +export class SystemInformationComponent implements OnInit { + private settingsService = inject(SettingsService); + private versionService = inject(VersionService); + + tenant = ''; + mifosVersion = ''; + fineractVersion = ''; + server = ''; + + ngOnInit(): void { + this.tenant = this.settingsService.tenantIdentifier || 'default'; + this.mifosVersion = environment.version; + this.server = this.settingsService.server; + + this.versionService.getBackendInfo().subscribe((data: any) => { + if (data.git && data.git.build && data.git.build.version) { + this.fineractVersion = data.git.build.version; + } + }); + } +} diff --git a/src/app/system/system-routing.module.ts b/src/app/system/system-routing.module.ts index ae2fd72af..1248fee93 100644 --- a/src/app/system/system-routing.module.ts +++ b/src/app/system/system-routing.module.ts @@ -54,6 +54,7 @@ import { EditRoleComponent } from './roles-and-permissions/edit-role/edit-role.c import { RolesAndPermissionsComponent } from './roles-and-permissions/roles-and-permissions.component'; import { ViewRoleComponent } from './roles-and-permissions/view-role/view-role.component'; import { SystemComponent } from './system.component'; +import { SystemInformationComponent } from './system-information/system-information.component'; /** Custom Resolvers */ import { AccountNumberPreferencesResolver } from './account-number-preferences/account-number-preferences.resolver'; @@ -582,6 +583,11 @@ const routes: Routes = [ } ] }, + { + path: 'system-information', + component: SystemInformationComponent, + data: { title: 'System Information', breadcrumb: 'System Information' } + }, { path: 'audit-trails', data: { title: 'Audit Trails', breadcrumb: 'Audit Trails' }, diff --git a/src/app/system/system.component.html b/src/app/system/system.component.html index 8e300e286..a7cadb5bd 100644 --- a/src/app/system/system.component.html +++ b/src/app/system/system.component.html @@ -290,6 +290,40 @@ + + + + diff --git a/src/app/system/system.component.ts b/src/app/system/system.component.ts index ce1a9ac91..dbd9c488a 100644 --- a/src/app/system/system.component.ts +++ b/src/app/system/system.component.ts @@ -69,7 +69,7 @@ export class SystemComponent implements AfterViewInit { @ViewChild('templateManageReports') templateManageReports: TemplateRef; // Initialize an array of 15 boolean values, all set to false isDisabled: boolean = true; - arrowBooleans: boolean[] = new Array(15).fill(false); + arrowBooleans: boolean[] = new Array(16).fill(false); /** * Popover function diff --git a/src/app/system/system.module.ts b/src/app/system/system.module.ts index 3abe953e3..91f070bdf 100644 --- a/src/app/system/system.module.ts +++ b/src/app/system/system.module.ts @@ -85,6 +85,7 @@ import { CustomParametersTableComponent } from './manage-jobs/scheduler-jobs/cus import { ErrorLogPopoverComponent } from './manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component'; import { RunSelectedJobsPopoverComponent } from './manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component'; import { RunSelectedJobsTableComponent } from './manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-table/run-selected-jobs-table.component'; +import { SystemInformationComponent } from './system-information/system-information.component'; @NgModule({ imports: [ @@ -159,7 +160,8 @@ import { RunSelectedJobsTableComponent } from './manage-jobs/scheduler-jobs/run- CustomParametersTableComponent, ErrorLogPopoverComponent, RunSelectedJobsPopoverComponent, - RunSelectedJobsTableComponent + RunSelectedJobsTableComponent, + SystemInformationComponent ] }) export class SystemModule {} diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json index 4deb0424e..77420d25e 100644 --- a/src/assets/translations/en-US.json +++ b/src/assets/translations/en-US.json @@ -294,6 +294,16 @@ "Name": "Name", "Render Time": "Render Time" }, + "licensing": { + "Apache Fineract Description": "The Apache Fineract platform is licensed under the Apache License, Version 2.0. The Mifos Initiative was the guiding force behind Apache Fineract, launching it as Mifos X in 2011 and contributing to Apache in 2016 with graduation to a top-level project of the Apache Software Foundation in 2017.", + "Mifos X Distribution": "The open source Mifos X distribution powered by Apache Fineract (including web apps, mobile apps, and business intelligence engine) is licensed under the Mozilla Public License, v2.0.", + "Legacy Codebase": "Our legacy codebase (Mifos 2) is governed by the Apache 2.0 License. Please read the following to learn how to correctly adhere to the terms of the license.", + "How to License Code": "How to properly license Mifos code that you are contributing.", + "Contributor Agreement": "Mifos Contributor Agreement", + "License FAQs": "Implications of what this means when modifying the source code can be found in the Apache License FAQs", + "Adding External Software": "Considerations to factor in when adding external software to Mifos.", + "Code of Conduct": "Mifos Code of Conduct to abide by when collaborating in the community." + }, "accounting": { "Accrual (periodic)": "Accrual (periodic)", "Accrual (upfront)": "Accrual (upfront)", @@ -1245,6 +1255,8 @@ "Success!": "Success!", "Successfully completed": "You have successfully completed the setup of", "Summary Details": "Summary Details", + "System Information": "System Information", + "Software Licensing": "Software Licensing", "Tax Components": "Tax Components", "Tax Group": "Tax Group", "Teller / Cashier Management": "Teller / Cashier Management", @@ -3623,6 +3635,9 @@ "Step": "Step", "Supports Loan charges, Savings & deposits": "This option allows you to create new charges. It supports Loan charges, Savings and deposits charges and Client charges.", "System": "System", + "System Information": "System Information", + "Software Licensing": "Software Licensing", + "View system version, server and licensing information": "View system version, server and licensing information", "Table": "Table", "Tax Components": "Tax Components", "tenant_app_key": "tenant_app_key",