Skip to content

Commit

Permalink
feat: update for fiber 0.2.0
Browse files Browse the repository at this point in the history
use node name instead of alias
  • Loading branch information
Keith-CY committed Jan 8, 2025
1 parent 97510b0 commit 8db335c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/Search/AggregateSearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const SearchResultItem: FC<{ keyword?: string; item: AggregateSearchResult }> =

<div className={classNames(styles.secondaryText, styles.subTitle, 'monospace')}>
<span style={{ marginRight: 4, flexShrink: 0 }}>
{t('search.fiber_graph_node')} # {localeNumberString(item.attributes.alias)}
{t('search.fiber_graph_node')} # {localeNumberString(item.attributes.nodeName)}
</span>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Fiber/GraphNode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ const GraphNode = () => {
<div className={styles.container} onClick={handleCopy}>
<div className={styles.overview}>
<div className={styles.fields}>
{node.alias ? (
{node.nodeName ? (
<dl>
<dt>{t('fiber.graph.alias')}</dt>
<dt>{t('fiber.graph.node')}</dt>
<dd className={styles.alias}>
<span>{node.alias}</span>
<button type="button" data-copy-text={node.alias}>
<span>{node.nodeName}</span>
<button type="button" data-copy-text={node.nodeName}>
<CopyIcon />
</button>
</dd>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Fiber/GraphNodeList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const TIME_TEMPLATE = 'YYYY/MM/DD hh:mm:ss'

const fields = [
{
key: 'alias',
label: 'alias',
key: 'name',
label: 'name',
transformer: (v: unknown, i: Fiber.Graph.Node) => {
if (typeof v !== 'string') return v
return (
Expand Down
4 changes: 2 additions & 2 deletions src/services/ExplorerService/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export type AggregateSearchResult =
>
| Response.Wrapper<
{
alias: string
nodeName: string
nodeId: string
peerId: string
},
Expand Down Expand Up @@ -1588,7 +1588,7 @@ export namespace Fiber {
}

export interface Node {
alias: string
nodeName: string
nodeId: string
addresses: string[]
timestamp: string
Expand Down

0 comments on commit 8db335c

Please sign in to comment.