forked from pinpoint-apm/pinpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#noissue] feat: global search & add tailwind into app & new style snb
- Loading branch information
1 parent
1e3235d
commit b7dc7a8
Showing
38 changed files
with
659 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
web-frontend/src/main/v3/apps/web/src/hooks/useMenuItems.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { useAtomValue } from 'jotai'; | ||
import { APP_PATH, MenuItem } from '@pinpoint-fe/constants'; | ||
import { configurationAtom } from '@pinpoint-fe/atoms'; | ||
import { | ||
PiBugBeetle, | ||
PiChartBar, | ||
PiChartLine, | ||
PiHardDrives, | ||
PiTreeStructure, | ||
} from 'react-icons/pi'; | ||
import { useSearchParameters } from '@pinpoint-fe/hooks'; | ||
import { | ||
getServerMapPath, | ||
getInspectorPath, | ||
getUrlStatPath, | ||
getSystemMetricPath, | ||
getErrorAnalysisPath, | ||
} from '@pinpoint-fe/utils'; | ||
|
||
export const useMenuItems = () => { | ||
const configuration = useAtomValue(configurationAtom); | ||
const { application, searchParameters } = useSearchParameters(); | ||
|
||
const menuItems: MenuItem[] = [ | ||
{ | ||
icon: <PiTreeStructure />, | ||
name: 'Servermap', | ||
path: APP_PATH.SERVER_MAP, | ||
href: getServerMapPath(application, searchParameters), | ||
}, | ||
{ | ||
icon: <PiChartLine />, | ||
name: 'Inspector', | ||
path: APP_PATH.INSPECTOR, | ||
href: getInspectorPath(application, searchParameters), | ||
}, | ||
{ | ||
icon: <PiChartBar />, | ||
name: 'URL Statistic', | ||
path: APP_PATH.URL_STATISTIC, | ||
href: getUrlStatPath(application, searchParameters), | ||
hide: !configuration?.showUrlStat, | ||
}, | ||
{ | ||
icon: <PiHardDrives />, | ||
name: 'Infrastructure', | ||
path: APP_PATH.SYSTEM_METRIC, | ||
href: getSystemMetricPath(), | ||
hide: !configuration?.showSystemMetric, | ||
}, | ||
{ | ||
icon: <PiBugBeetle />, | ||
name: 'Error Analysis', | ||
path: APP_PATH.ERROR_ANALYSIS, | ||
href: getErrorAnalysisPath(application, searchParameters), | ||
hide: !configuration?.showExceptionTrace, | ||
}, | ||
]; | ||
|
||
return { menuItems }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import uiTailwindConfig from '@pinpoint-fe/ui/tailwind.config.js'; | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
...uiTailwindConfig, | ||
content: ['./index.html', './src/**/*.{ts,tsx}'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { atom } from 'jotai'; | ||
|
||
export const globalSearchDisplayAtom = atom<boolean>(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
web-frontend/src/main/v3/packages/constants/src/types/MenuItem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export type MenuItem = { | ||
name: string; | ||
path: string | string[]; | ||
href?: string; | ||
icon?: JSX.Element; | ||
hide?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.