@@ -26,7 +26,6 @@ Here’s a step-by-step guide on how to **create a new plugin** with **groups an
26
26
│ │ │ │── 📄 `constants.ts` _(Defines the group ID, title, and description)_
27
27
│ │ │ │── 📄 `index.ts` _(Registers the group and navigation details)_
28
28
│ │── 📄 `category.ts` _(Defines categories for grouping apps in UI)_
29
- │ │── 📄 `layout.tsx` _(Handles UI layout and sidebar navigation)_
30
29
```
31
30
32
31
---
@@ -109,8 +108,11 @@ export const NetworkSecurityNavGroup: Group<typeof NETWORK_SECURITY_ID> = {
109
108
}));
110
109
},
111
110
112
- getApps(updater$ ? : Subject <AppUpdater >): App [] {
113
- return getNetworkSecurityApps (updater$ );
111
+ getApps(
112
+ applicationService : ApplicationService ,
113
+ updater$ : Subject <AppUpdater >,
114
+ ): App [] {
115
+ return getNetworkSecurityApps (applicationService , updater$ );
114
116
},
115
117
};
116
118
```
@@ -168,14 +170,12 @@ import { NETWORK_SECURITY_TITLE } from '../../constants';
168
170
import { FirewallMonitoringApp } from ' ./firewall-monitoring-app' ;
169
171
import { FIREWALL_MONITORING_ID } from ' ./constants' ;
170
172
171
- export const renderApp = async (params : AppMountParameters ) => {
172
- const items = createSideNavItems ({
173
- group: NetworkSecurityNavGroup ,
174
- selectedAppId: FIREWALL_MONITORING_ID ,
175
- });
176
-
173
+ export const renderApp = async (
174
+ params : AppMountParameters ,
175
+ { Layout }: AppProps ,
176
+ ) => {
177
177
ReactDOM .render (
178
- <Layout aria-label = { NETWORK_SECURITY_TITLE } items = { items } >
178
+ <Layout >
179
179
<FirewallMonitoringApp params = { params } />
180
180
</Layout >,
181
181
params .element ,
@@ -199,12 +199,21 @@ import {
199
199
AppNavLinkStatus ,
200
200
AppUpdater ,
201
201
} from ' ../../../../../src/core/public' ;
202
+ import { ApplicationService } from ' ../../../../wazuh-core/public/services/application/application' ;
202
203
import {
203
204
FIREWALL_MONITORING_ID ,
204
205
FIREWALL_MONITORING_TITLE ,
205
206
} from ' ./apps/firewall-monitoring/constants' ;
207
+ import { NetworkSecurityNavGroup } from ' .' ;
208
+
209
+ export function getNetworkSecurityApps(
210
+ applicationService ? : ApplicationService ,
211
+ updater$ ? : Subject <AppUpdater >,
212
+ ): App [] {
213
+ const networkSecurityLayout = applicationService ?.createLayout (
214
+ NetworkSecurityNavGroup ,
215
+ );
206
216
207
- export function getNetworkSecurityApps(updater$ ? : Subject <AppUpdater >): App [] {
208
217
return [
209
218
{
210
219
id: FIREWALL_MONITORING_ID ,
@@ -215,7 +224,10 @@ export function getNetworkSecurityApps(updater$?: Subject<AppUpdater>): App[] {
215
224
const { renderApp } = await import (
216
225
' ./apps/firewall-monitoring/application'
217
226
);
218
- return await renderApp (params );
227
+
228
+ return await renderApp (params , {
229
+ Layout: networkSecurityLayout !(FIREWALL_MONITORING_ID ),
230
+ });
219
231
},
220
232
},
221
233
];
0 commit comments