Skip to content

Commit

Permalink
add menu item for user credential, fix domain map check
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanwerfling committed Aug 3, 2024
1 parent cf35d35 commit 1efaee2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions frontend/src/inc/Pages/Credential/CredentialUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ContentColSize,
ContentRow,
IconFa,
LeftNavbarLink,
LeftNavbarLink, SidebarMenuItem, SidebarMenuTree,
Table,
Td,
Th,
Expand All @@ -28,7 +28,7 @@ export class CredentialUsers extends BasePage {
* name
* @protected
*/
protected override _name: string = 'credential';
protected override _name: string = 'credential_user';

/**
* Credential
Expand Down Expand Up @@ -113,6 +113,22 @@ export class CredentialUsers extends BasePage {
* loadContent
*/
public override async loadContent(): Promise<void> {
// Menu Tree ---------------------------------------------------------------------------------------------------

const menuItem = this._wrapper.getMainSidebar().getSidebar().getMenu().getMenuItem('credential');

if (menuItem !== null) {
menuItem.setActiv(true);

const menuTree = new SidebarMenuTree(menuItem);

const pmenuItem = new SidebarMenuItem(menuTree);
pmenuItem.setActiv(true);
pmenuItem.setTitle(`User-List: ${this._credential.name}`);
}

// -------------------------------------------------------------------------------------------------------------

const row1 = new ContentRow(this._wrapper.getContentWrapper().getContent());
const card = new Card(new ContentCol(row1, ContentColSize.col12));

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/inc/Pages/Domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ export class Domains extends BasePage {
const row1 = new ContentRow(content);
loadDomain(0, new ContentCol(row1, ContentColSize.col12));

if (domainMap.size <= 1) {
if (domainMap.size <= 0) {
const ib = new InfoBox(new ContentCol(row1, ContentColSize.col12), InfoBoxBg.none, InfoBoxMb.none);
ib.setIcon(IconFa.info, InfoBoxBg.info);
ib.getTextElement().append('None Domain exist, please add a new Domain!');
Expand Down

0 comments on commit 1efaee2

Please sign in to comment.