Skip to content

Commit

Permalink
NAS-128628: Add other search elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Vasilenko committed May 17, 2024
1 parent f4f6ef8 commit 633af2d
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ix-page-header [pageTitle]="'Discover' | translate">
<ix-custom-app-button></ix-custom-app-button>
<ix-custom-app-button [ixUiSearch]="searchableElements.elements.customApp"></ix-custom-app-button>
</ix-page-header>

<ix-available-apps-header></ix-available-apps-header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ export const availableAppsElements = {
available: {
synonyms: [T('Apps'), T('Applications')],
},
customApp: {
hierarchy: [T('Custom App')],
anchor: 'custom-app',
},
},
} satisfies UiSearchableElement;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
{{ 'Refresh All' | translate }}
</button>

<button *ixRequiresRoles="requiredRoles" mat-button color="primary" ixTest="add-catalog" (click)="doAdd()">
<button
*ixRequiresRoles="requiredRoles"
mat-button
color="primary"
ixTest="add-catalog"
[ixUiSearch]="searchableElements.elements.add"
(click)="doAdd()"
>
{{ 'Add Catalog' | translate }}
</button>
</ix-page-header>
Expand Down
4 changes: 4 additions & 0 deletions src/app/pages/apps/components/catalogs/catalogs.elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export const catalogsElements = {
anchorRouterLink: ['/apps', 'available', 'catalogs'],
elements: {
catalogs: {},
add: {
hierarchy: [T('Add')],
synonyms: [T('Add Catalog')],
},
},
} satisfies UiSearchableElement;
43 changes: 43 additions & 0 deletions src/assets/ui-searchable-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@
"triggerAnchor": null,
"section": "ui"
},
{
"hierarchy": [
"Applications",
"Discover",
"Custom App"
],
"synonyms": [
"Discover"
],
"requiredRoles": [],
"anchorRouterLink": [
"/apps",
"available"
],
"routerLink": null,
"anchor": "custom-app",
"triggerAnchor": null,
"section": "ui"
},
{
"hierarchy": [
"Applications",
Expand All @@ -196,6 +215,30 @@
"triggerAnchor": null,
"section": "ui"
},
{
"hierarchy": [
"Applications",
"Discover",
"Catalogs",
"Add"
],
"synonyms": [
"Add Catalog",
"Catalogs"
],
"requiredRoles": [
"CATALOG_WRITE"
],
"anchorRouterLink": [
"/apps",
"available",
"catalogs"
],
"routerLink": null,
"anchor": "add",
"triggerAnchor": null,
"section": "ui"
},
{
"hierarchy": [
"Applications",
Expand Down

0 comments on commit 633af2d

Please sign in to comment.