Add button to show service statistics

This commit is contained in:
Sebastian Seedorf
2022-09-09 21:30:34 +02:00
parent d964748a66
commit 2eaf8f719b
17 changed files with 1496 additions and 19 deletions

View File

@@ -2,13 +2,10 @@ import { FC, HTMLProps } from 'react'
import { EnrichedEntity } from '../../../src/types'
import cx from 'classnames'
import styles from './NodeOverview.module.css'
import Link from 'next/link'
import { EntityIcon } from '../../home/EntityIcon/EntityIcon'
import { GraphNode } from '../../../src/graph-untangle/types'
import { fixedEncodeURIComponent } from '../../../src/utils'
import { useRouter } from 'next/router'
import { GraphIcon } from '../../icons/GraphIcon'
import { I18n } from '../../shared/I18n/I18n'
import { ButtonVisualize } from '../../shared/ButtonVisualize/ButtonVisualize'
export type OverviewGraphNode = GraphNode<{
icons: (EnrichedEntity | string)[]
@@ -19,20 +16,10 @@ interface Props extends HTMLProps<HTMLDivElement> {
}
export const NodeOverview: FC<Props> = ({ node, className, ...props }) => {
const { query } = useRouter()
return (
<div {...props} className={cx(className, styles.root)}>
<h3>
<span className={styles.linkOut}>
<Link
href={{
pathname: `/visualize/${fixedEncodeURIComponent(node.name)}`,
query
}}
>
<GraphIcon />
</Link>
</span>
<ButtonVisualize groupId={node.name} />
{node.name}
</h3>
{node.icons?.length ? (