Skip to content

Commit

Permalink
[frontend] Added auto collapse and submenu icon switches to settings (O…
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonsai8863 committed Mar 13, 2024
1 parent dea383c commit 6dc29d7
Show file tree
Hide file tree
Showing 10 changed files with 213 additions and 99 deletions.
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
"Strategic": "Strategisch",
"Link created": "Link erstellt",
"Public dashboard": "Öffentliches Dashboard",
"Show left navigation submenu icons": "Symbole des linken Navigations-Untermenüs anzeigen",
"Auto collapse submenus in left navigation": "Untermenüs in der linken Navigation automatisch einklappen",
"Unless specific groups are selected, user will be created with default groups only.": "Wenn keine spezifischen Gruppen ausgewählt werden, wird der Benutzer nur mit den Standardgruppen erstellt."
}
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
"Operational": "Operational",
"Strategic": "Strategic",
"Link created": "Link created",
"Show left navigation submenu icons": "Show left navigation submenu icons",
"Auto collapse submenus in left navigation": "Auto collapse submenus in left navigation",
"Public dashboard": "Public dashboard"
}
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
"Strategic": "Estratégico",
"Link created": "Enlace creado",
"Public dashboard": "Cuadro de mandos público",
"Show left navigation submenu icons": "Mostrar iconos del submenú de navegación izquierdo",
"Auto collapse submenus in left navigation": "Submenús contraídos automáticamente en la navegación izquierda",
"Unless specific groups are selected, user will be created with default groups only.": "A menos que se seleccionen grupos específicos, el usuario se creará sólo con los grupos por defecto."
}
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
"Strategic": "Stratégique",
"Link created": "Lien créé",
"Public dashboard": "Tableau de bord public",
"Show left navigation submenu icons": "Afficher les icônes du sous-menu de navigation de gauche",
"Auto collapse submenus in left navigation": "Sous-menus à réduction automatique dans la navigation de gauche",
"Unless specific groups are selected, user will be created with default groups only.": "À moins que des groupes spécifiques ne soient sélectionnés, l'utilisateur sera créé avec les groupes par défaut uniquement."
}
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
"Strategic": "戦略的",
"Link created": "リンク作成",
"Public dashboard": "公開ダッシュボード",
"Show left navigation submenu icons": "左側のナビゲーション サブメニュー アイコンを表示する",
"Auto collapse submenus in left navigation": "左側のナビゲーションのサブメニューを自動的に折りたたむ",
"Unless specific groups are selected, user will be created with default groups only.": "特定のグループを選択しない限り、ユーザーはデフォルトのグループのみで作成されます。"
}
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
"Strategic": "战略",
"Link created": "创建的链接",
"Public dashboard": "公共仪表板",
"Show left navigation submenu icons": "显示左侧导航子菜单图标",
"Auto collapse submenus in left navigation": "自动折叠左侧导航中的子菜单",
"Unless specific groups are selected, user will be created with default groups only.": "除非选择了特定组,否则创建的用户将只包含默认组。"
}
157 changes: 80 additions & 77 deletions opencti-platform/opencti-front/src/private/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CssBaseline from '@mui/material/CssBaseline';
import { useTheme, makeStyles } from '@mui/styles';
import { BoundaryRoute, NoMatch } from '@components/Error';
import PlatformCriticalAlertDialog from '@components/settings/platform_alerts/PlatformCriticalAlertDialog';
import LeftNavContextProvider from 'src/utils/LeftNavProvider';
import TopBar from './components/nav/TopBar';
import LeftBar from './components/nav/LeftBar';
import Message from '../components/Message';
Expand Down Expand Up @@ -86,83 +87,85 @@ const Index = ({ settings }: IndexProps) => {
marginBottom: bannerHeight,
}}
>
<CssBaseline />
<TopBar />
<LeftBar />
<Message />
<Box component="main" sx={boxSx}>
<div
className={classes.toolbar}
style={{ marginTop: settingsMessagesBannerHeight }}
/>
<Suspense fallback={<Loader />}>
<Switch>
<BoundaryRoute exact path="/dashboard" component={Dashboard} />
<BoundaryRoute exact path="/dashboard/search" component={SearchRoot} />
<BoundaryRoute exact path="/dashboard/search/:scope" component={SearchRoot} />
<BoundaryRoute exact path="/dashboard/search/:scope/:keyword" component={SearchRoot} />
<BoundaryRoute
exact
path="/dashboard/id/:id"
component={StixObjectOrStixRelationship}
/>
<BoundaryRoute
exact
path="/dashboard/search_bulk"
component={SearchBulk}
/>
<BoundaryRoute
path="/dashboard/analyses"
component={RootAnalyses}
/>
<BoundaryRoute path="/dashboard/cases" component={RootCases} />
<BoundaryRoute path="/dashboard/events" component={RootEvents} />
<Route
path="/dashboard/observations"
// Because mismatch of types between react-router v5 and v6.
// It uses types of v6, but we are using v5 here and compiler is lost.
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
/* @ts-ignore */
component={RootObservations}
/>
<BoundaryRoute path="/dashboard/threats" component={RootThreats} />
<BoundaryRoute path="/dashboard/arsenal" component={RootArsenal} />
<BoundaryRoute
path="/dashboard/techniques"
component={RootTechnique}
/>
<BoundaryRoute
path="/dashboard/entities"
component={RootEntities}
/>
<BoundaryRoute
path="/dashboard/locations"
component={RootLocation}
/>
<BoundaryRoute path="/dashboard/data" component={RootData} />
<BoundaryRoute
path="/dashboard/workspaces"
component={RootWorkspaces}
/>
<BoundaryRoute
path="/dashboard/settings"
component={RootSettings}
/>
<BoundaryRoute path="/dashboard/audits" component={RootActivity} />
<BoundaryRoute
path="/dashboard/profile"
component={RootProfile}
/>
<Route
// Because mismatch of types between react-router v5 and v6.
// It uses types of v6, but we are using v5 here and compiler is lost.
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
/* @ts-ignore */
component={NoMatch}
/>
</Switch>
</Suspense>
</Box>
<LeftNavContextProvider>
<CssBaseline />
<TopBar />
<LeftBar />
<Message />
<Box component="main" sx={boxSx}>
<div
className={classes.toolbar}
style={{ marginTop: settingsMessagesBannerHeight }}
/>
<Suspense fallback={<Loader />}>
<Switch>
<BoundaryRoute exact path="/dashboard" component={Dashboard} />
<BoundaryRoute exact path="/dashboard/search" component={SearchRoot} />
<BoundaryRoute exact path="/dashboard/search/:scope" component={SearchRoot} />
<BoundaryRoute exact path="/dashboard/search/:scope/:keyword" component={SearchRoot} />
<BoundaryRoute
exact
path="/dashboard/id/:id"
component={StixObjectOrStixRelationship}
/>
<BoundaryRoute
exact
path="/dashboard/search_bulk"
component={SearchBulk}
/>
<BoundaryRoute
path="/dashboard/analyses"
component={RootAnalyses}
/>
<BoundaryRoute path="/dashboard/cases" component={RootCases} />
<BoundaryRoute path="/dashboard/events" component={RootEvents} />
<Route
path="/dashboard/observations"
// Because mismatch of types between react-router v5 and v6.
// It uses types of v6, but we are using v5 here and compiler is lost.
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
/* @ts-ignore */
component={RootObservations}
/>
<BoundaryRoute path="/dashboard/threats" component={RootThreats} />
<BoundaryRoute path="/dashboard/arsenal" component={RootArsenal} />
<BoundaryRoute
path="/dashboard/techniques"
component={RootTechnique}
/>
<BoundaryRoute
path="/dashboard/entities"
component={RootEntities}
/>
<BoundaryRoute
path="/dashboard/locations"
component={RootLocation}
/>
<BoundaryRoute path="/dashboard/data" component={RootData} />
<BoundaryRoute
path="/dashboard/workspaces"
component={RootWorkspaces}
/>
<BoundaryRoute
path="/dashboard/settings"
component={RootSettings}
/>
<BoundaryRoute path="/dashboard/audits" component={RootActivity} />
<BoundaryRoute
path="/dashboard/profile"
component={RootProfile}
/>
<Route
// Because mismatch of types between react-router v5 and v6.
// It uses types of v6, but we are using v5 here and compiler is lost.
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
/* @ts-ignore */
component={NoMatch}
/>
</Switch>
</Suspense>
</Box>
</LeftNavContextProvider>
</Box>
</>
);
Expand Down

0 comments on commit 6dc29d7

Please sign in to comment.