Update ACP system navigation
All checks were successful
CI/CD Pipeline / test (push) Successful in 2s
CI/CD Pipeline / deploy (push) Successful in 19s

This commit is contained in:
2026-02-10 19:52:24 +01:00
parent c67a3ec6d0
commit 95ebc7778d
2 changed files with 343 additions and 240 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 2026-02-10
- Reshaped ACP System tab with left navigation and dedicated views (Overview, Live Update, CLI, CI/CD).
- Moved system requirements table into the CI/CD view with refresh controls.
## 2026-02-08
- Achieved 100% test coverage across the backend.
- Added comprehensive Feature and Unit tests for controllers, models, services, and console commands.

View File

@@ -96,6 +96,7 @@ function Acp({ isAdmin }) {
const [systemStatus, setSystemStatus] = useState(null)
const [systemLoading, setSystemLoading] = useState(false)
const [systemError, setSystemError] = useState('')
const [systemSection, setSystemSection] = useState('info')
const [usersPage, setUsersPage] = useState(1)
const [usersPerPage, setUsersPerPage] = useState(10)
const [userSort, setUserSort] = useState({ columnId: 'name', direction: 'asc' })
@@ -3507,7 +3508,93 @@ function Acp({ isAdmin }) {
<Tab eventKey="system" title={t('acp.system')}>
{systemError && <p className="text-danger">{systemError}</p>}
{systemLoading && <p className="bb-muted">{t('acp.loading')}</p>}
{!systemLoading && systemStatus && (
{!systemLoading && (
<Row className="g-4">
<Col lg={3} xl={2}>
<div className="bb-acp-sidebar">
<div className="bb-acp-sidebar-section">
<div className="bb-acp-sidebar-title">{t('acp.system')}</div>
<div className="list-group">
<button
type="button"
className={`list-group-item list-group-item-action ${
systemSection === 'info' ? 'is-active' : ''
}`}
onClick={() => setSystemSection('info')}
>
Overview
</button>
<button
type="button"
className={`list-group-item list-group-item-action ${
systemSection === 'insite' ? 'is-active' : ''
}`}
onClick={() => setSystemSection('insite')}
>
Live Update
</button>
<button
type="button"
className={`list-group-item list-group-item-action ${
systemSection === 'cli' ? 'is-active' : ''
}`}
onClick={() => setSystemSection('cli')}
>
CLI
</button>
<button
type="button"
className={`list-group-item list-group-item-action ${
systemSection === 'ci' ? 'is-active' : ''
}`}
onClick={() => setSystemSection('ci')}
>
CI/CD
</button>
</div>
</div>
</div>
</Col>
<Col lg={9} xl={10}>
{systemSection === 'info' && (
<div className="bb-acp-panel">
<div className="bb-acp-panel-header">
<h5 className="mb-0">System overview</h5>
</div>
<div className="bb-acp-panel-body">
<p className="bb-muted mb-0">
Placeholder: summary, upgrade guidance, and environment health notes will
live here.
</p>
</div>
</div>
)}
{systemSection === 'insite' && (
<div className="bb-acp-panel">
<div className="bb-acp-panel-header">
<h5 className="mb-0">Live Update</h5>
</div>
<div className="bb-acp-panel-body">
<p className="bb-muted mb-0">
Placeholder: run a live update from inside the forum, with safety checks
and status details.
</p>
</div>
</div>
)}
{systemSection === 'cli' && (
<div className="bb-acp-panel">
<div className="bb-acp-panel-header">
<h5 className="mb-0">CLI</h5>
</div>
<div className="bb-acp-panel-body">
<p className="bb-muted mb-0">
Placeholder: CLI upgrade commands and automation helpers will live here.
</p>
</div>
</div>
)}
{systemSection === 'ci' && (
<div className="bb-acp-panel">
<div className="bb-acp-panel-header">
<div className="d-flex align-items-center justify-content-between">
@@ -3524,6 +3611,12 @@ function Acp({ isAdmin }) {
</div>
</div>
<div className="bb-acp-panel-body">
{!systemStatus && (
<p className="bb-muted mb-0">
{t('system.not_found')}
</p>
)}
{systemStatus && (
<table className="bb-acp-stats-table">
<thead>
<tr>
@@ -3538,7 +3631,9 @@ function Acp({ isAdmin }) {
<tbody>
<tr>
<td>PHP</td>
<td className="bb-acp-stats-value">{systemStatus.php_selected_path || '—'}</td>
<td className="bb-acp-stats-value">
{systemStatus.php_selected_path || '—'}
</td>
<td className="bb-acp-stats-value">
{systemStatus.min_versions?.php || '—'}
</td>
@@ -3753,9 +3848,13 @@ function Acp({ isAdmin }) {
</tr>
</tbody>
</table>
)}
</div>
</div>
)}
</Col>
</Row>
)}
</Tab>
</Tabs>
<Modal show={showModal} onHide={handleReset} centered size="lg">