Skip to content

Commit

Permalink
Include latest features on the menu panels (NOJIRA) (#345)
Browse files Browse the repository at this point in the history
* Include latest features on the menu panels (NOJIRA)

* Improve platform-notice dark-mode color (NOJIRA)

* Improve menu-panel submenu (NOJIRA)

* Improve tests for COmanange CO (CFM-218)

* De-emphasize "Authentication Events" in panel menus (CFM-218)
  • Loading branch information
arlen authored Oct 10, 2025
1 parent b7d403d commit e54e449
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 72 deletions.
9 changes: 9 additions & 0 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ msgstr "Groups"
msgid "co.operations"
msgstr "Operations"

msgid "co.operations.authentication.events.desc"
msgstr "Review login attempts"

msgid "co.operations.panel.title"
msgstr "Operations"

Expand All @@ -102,6 +105,9 @@ msgstr "Operational activities"
msgid "co.operations.jobs.desc"
msgstr "Manage this CO's asynchronous process queue"

msgid "co.operations.notifications.desc"
msgstr "View CO notifications"

msgid "co.operations.reports.desc"
msgstr "Create, view, and export reports"

Expand Down Expand Up @@ -225,6 +231,9 @@ msgstr "my canvas"
msgid "registries"
msgstr "Available {0} Registries"

msgid "related.artifacts"
msgstr "Related Artifacts"

msgid "related.configurations"
msgstr "Related Configurations"

Expand Down
2 changes: 1 addition & 1 deletion app/templates/ApiUsers/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/

// Output advisory banner when co=1
if($vv_cur_co->id == 1) {
if($vv_cur_co->isCOmanageCO()) {
$banners = [
__d('information','api.cmp')
];
Expand Down
227 changes: 163 additions & 64 deletions app/templates/element/menuPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,43 +89,48 @@
</a>
</li>
</ul>

<?php /* XXX These sidepanel links are disabled until needed, but we will leave them in the code to
provide hints to where they may belong. Plugins related to this panel may also appear here. */ ?>

<div class="menu-panel-sidepanel">
<?php /* XXX if we want a title for the side menu, use an h3 like so:
<h3>
<?= __d('menu','related.configurations') ?>
</h3> */
?>
</h3>
<div class="menu-panel-sidepanel-content">
<ul class="menu-panel-links menu-panel-links-inner">
<?php /* Placeholders below. Replace with real links and text replacement:
<li><a href="#"><em class="material-symbols" aria-hidden="true">lock</em> Authenticators</a></li> */ ?>
<?php /*
<li><a href="#"><em class="material-symbols" aria-hidden="true">access_alarm</em> Expiration Policies</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">developer_board</em> Extended Attributes</a></li>
*/ ?>
<li>
<?php
$menuUrl = $this->Url->build([
'plugin' => null,
'controller' => 'authenticators',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]
]);
?>
<a href="<?= $menuUrl ?>">
<em class="material-symbols" aria-hidden="true">lock</em>
<span class="menu-panel-link-text"><?= __d('controller', 'Authenticators', [99]) ?></span>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'identifier_assignments',
'controller' => 'types',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<div class="material-symbols-outlined" aria-hidden="true">badge</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller', 'IdentifierAssignments', [99]) ?></div>
<a href="<?= $menuUrl ?>">
<em class="material-symbols" aria-hidden="true">widgets</em>
<span class="menu-panel-link-text"><?= __d('controller', 'Types', [99]) ?></span>
</a>
</li>
<?php /*
<?php /* Placeholders below. Replace with real links and text replacement:
<li><a href="#"><em class="material-symbols" aria-hidden="true">access_alarm</em> Expiration Policies</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">developer_board</em> Extended Attributes</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">check_circle</em> Identifier Validators</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">cloud_upload</em> Provisioning Targets</a></li>
<li><!-- more links here, including plugins --></li>
*/ ?>
</ul>
Expand Down Expand Up @@ -218,7 +223,7 @@
);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-primary-link">
<div class="material-symbols" aria-hidden="true">cable</div>
<div class="material-symbols" aria-hidden="true">valve</div>
<div class="menu-panel-primary-link-text">
<h3><?= __d('controller','Pipelines', [99]) ?></h3>
<div class="menu-panel-link-desc"><?= __d('menu','co.connections.pipelines.desc') ?></div>
Expand All @@ -243,6 +248,23 @@
<div class="menu-panel-link-desc"><?= __d('menu','co.connections.external_identity_sources.desc') ?></div>
</div>
</a>
<ul class="menu-panel-submenu">
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'ext_identity_source_records',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<a href="<?= $menuUrl ?>">
<div class="menu-panel-link-text"><?= __d('controller','ExtIdentitySourceRecords', [99]) ?></div>
</a>
</li>
</ul>
</li>
<li>
<?php
Expand All @@ -265,24 +287,11 @@
</ul>
<!-- menu-panel-sidepanel for plugins and other links -->
<div class="menu-panel-sidepanel">
<h3>
<?= __d('menu','related.configurations') ?>
</h3>
<div class="menu-panel-sidepanel-content">
<ul class="menu-panel-links menu-panel-links-inner">
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'ext_identity_source_records',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<div class="material-symbols-outlined" aria-hidden="true">assignment</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller','ExtIdentitySourceRecords', [99]) ?></div>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build(
Expand All @@ -294,9 +303,9 @@
]]
);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<a href="<?= $menuUrl ?>">
<div class="material-symbols-outlined" aria-hidden="true">computer</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller','Servers', [2]) ?></div>
<div class="menu-panel-link-text"><?= __d('controller','Servers', [2]) ?></div>
</a>
</li>
</ul>
Expand All @@ -311,14 +320,14 @@
<ul class="menu-panel-links">
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'jobs',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
$menuUrl = $this->Url->build([
'plugin' => null,
'controller' => 'jobs',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]
]);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-primary-link">
<div class="material-symbols-outlined" aria-hidden="true">assignment</div>
Expand All @@ -328,35 +337,58 @@
</div>
</a>
</li>
<?php
/* XXX Enable highlighted menu items as needed:
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'reports',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
$menuUrl = $this->Url->build([
'plugin' => null,
'controller' => 'notifications',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]
]);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-primary-link">
<div class="material-symbols-outlined" aria-hidden="true">summarize</div>
<div class="material-symbols-outlined" aria-hidden="true">notifications_active</div>
<div class="menu-panel-primary-link-text">
<h3><?= __d('controller', 'Reports', [99]) ?></h3>
<div class="menu-panel-link-desc"><?= __d('menu','co.operations.reports.desc') ?></div>
<h3><?= __d('controller', 'Notifications', [99]) ?></h3>
<div class="menu-panel-link-desc"><?= __d('menu','co.operations.notifications.desc') ?></div>
</div>
</a>
</li>
*/ ?>
</ul>
<!-- menu-panel-sidepanel for plugins and other links -->
<?php if($vv_cur_co->isCOmanageCO()): ?>
<div class="menu-panel-sidepanel">
<h3>
<?= __d('menu','related.artifacts') ?>
</h3>
<div class="menu-panel-sidepanel-content">
<ul class="menu-panel-links menu-panel-links-inner">
<li>
<?php
$menuUrl = $this->Url->build([
'plugin' => null,
'controller' => 'authentication_events',
'action' => 'index',
'platform' => true
]);
?>
<a href="<?= $menuUrl ?>">
<div class="material-symbols-outlined" aria-hidden="true">lock</div>
<div class="menu-panel-link-text"><?= __d('controller','AuthenticationEvents', [2]) ?></div>
</a>
</li>
</ul>
</div>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($panel == 'config'): ?>
<h2><?= __d('menu','co.configuration.panel.title') ?></h2>
<div class="menu-panel-content">
<?php if($vv_cur_co->id == 1): ?>
<?php if($vv_cur_co->isCOmanageCO()): ?>
<?php
$platformMenuItems = [
__d('controller', 'Cos', [99]) => [
Expand All @@ -368,6 +400,11 @@
'icon' => 'electrical_services',
'controller' => 'plugins',
'action' => 'index'
],
__d('controller', 'TrafficDetours', [99]) => [
'icon' => 'fork_right',
'controller' => 'traffic_detours',
'action' => 'index'
]
];
?>
Expand All @@ -380,7 +417,7 @@
<li>
<?php
$linkContent = '<em class="material-symbols" aria-hidden="true">' . $cfg['icon'] . '</em>'
. '<span class="menu-title">' . $label . '</span>';
. '<span class="menu-panel-link-text">' . $label . '</span>';
print $this->Html->link(
$linkContent,
['plugin' => null,
Expand Down Expand Up @@ -416,6 +453,22 @@
<span class="menu-panel-link-text"><?= __d('controller', 'CoSettings', [99]) ?></span>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build([
'plugin' => null,
'controller' => 'apis',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]
]);
?>
<a href="<?= $menuUrl ?>">
<em class="material-symbols" aria-hidden="true">api</em>
<span class="menu-panel-link-text"><?= __d('controller', 'Apis', [99]) ?></span>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build(
Expand All @@ -432,14 +485,60 @@
<span class="menu-panel-link-text"><?= __d('controller', 'ApiUsers', [99]) ?></span>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build([
'plugin' => null,
'controller' => 'authenticators',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]
]);
?>
<a href="<?= $menuUrl ?>">
<em class="material-symbols" aria-hidden="true">lock</em>
<span class="menu-panel-link-text"><?= __d('controller', 'Authenticators', [99]) ?></span>
</a>
</li>
<?php /* Placeholders below. Replace with real links and text replacement:
<li><a href="#"><em class="material-symbols" aria-hidden="true">filter_list</em> Data Filters</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">sync</em> External Identity Sources</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">input</em> Pipelines</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">extension</em> Plugins</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">apps</em> Services</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">assignment_late</em> Terms and Conditions</a></li>
*/ ?>
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'identifier_assignments',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<a href="<?= $menuUrl ?>">
<div class="material-symbols-outlined" aria-hidden="true">badge</div>
<div class="menu-panel-link-text"><?= __d('controller', 'IdentifierAssignments', [99]) ?></div>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'servers',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<a href="<?= $menuUrl ?>">
<div class="material-symbols-outlined" aria-hidden="true">computer</div>
<div class="menu-panel-link-text"><?= __d('controller','Servers', [2]) ?></div>
</a>
</li>
<li>
<?php
$menuUrl = $this->Url->build(
Expand Down
2 changes: 1 addition & 1 deletion app/templates/layout/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

// add hints that we're in the platform-level (COmanage) CO
$isPlatformCO = false;
if(!empty($vv_cur_co) && ($vv_cur_co->id == 1) && !($vv_controller == 'Cos' && $vv_action == 'select')) {
if(!empty($vv_cur_co) && ($vv_cur_co->isCOmanageCO()) && !($vv_controller == 'Cos' && $vv_action == 'select')) {
$isPlatformCO = true;
$bodyClasses .= ' platform-co';
}
Expand Down
Loading

0 comments on commit e54e449

Please sign in to comment.