Skip to content

Commit

Permalink
ui: add Home path
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Kurz authored and regit committed Apr 29, 2024
1 parent e824433 commit 56570e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions ui/app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export const HUNT_URL = '/rules/hunt';
export const RULE_PATH = '/rest/rules/rule';
export const CURRENT_USER_PATH = '/rest/accounts/sciriususer/current_user/';
export const LOGIN_PATH = '/accounts/login/';
export const HOME_PATH = '/stamus';
8 changes: 2 additions & 6 deletions ui/app/pages/NotFound/NotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import React from 'react';
import { Button, Empty } from 'antd';
import { useHistory } from 'react-router-dom';

import { APP_URL } from 'ui/config';
import OperationalCenter from 'ui/pages/OperationalCenter/OperationalCenter';
import { HOME_PATH } from 'ui/config';

import * as Style from './style';

Expand All @@ -20,10 +19,7 @@ const Description = () => {
<div>
<h2>Not found</h2>
<p>The page you are trying to access is either missing or contains no data.</p>
<Button
type="primary"
onClick={() => history.push({ pathname: `${APP_URL}/${OperationalCenter.metadata.url}`, search: history.location.search })}
>
<Button type="primary" onClick={() => history.push({ pathname: HOME_PATH, search: history.location.search })}>
Take me home
</Button>
</div>
Expand Down

0 comments on commit 56570e0

Please sign in to comment.