-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update links to VDisk and PDisk Developer UI (#582)
- Loading branch information
1 parent
e02128e
commit 97dda88
Showing
7 changed files
with
85 additions
and
41 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
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,4 @@ | ||
{ | ||
"pdisk.developer-ui-button-title": "PDisk Developer UI page", | ||
"vdisk.developer-ui-button-title": "VDisk Developer UI page" | ||
} |
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,11 @@ | ||
import {i18n, Lang} from '../../../utils/i18n'; | ||
|
||
import en from './en.json'; | ||
import ru from './ru.json'; | ||
|
||
const COMPONENT = 'ydb-node-page'; | ||
|
||
i18n.registerKeyset(Lang.En, COMPONENT, en); | ||
i18n.registerKeyset(Lang.Ru, COMPONENT, ru); | ||
|
||
export default i18n.keyset(COMPONENT); |
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,4 @@ | ||
{ | ||
"pdisk.developer-ui-button-title": "Страница PDisk в Developer UI", | ||
"vdisk.developer-ui-button-title": "Страница VDisk в Developer UI" | ||
} |
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,32 @@ | ||
import {backend} from '../store'; | ||
import {pad9} from './utils'; | ||
|
||
// Current node connects with target node by itself using nodeId | ||
export const createDeveloperUILinkWithNodeId = (nodeId: number | string) => { | ||
return `${backend}/node/${nodeId}/`; | ||
}; | ||
|
||
interface PDiskDeveloperUILinkParams { | ||
nodeId: number | string; | ||
pDiskId: number | string; | ||
} | ||
|
||
export const createPDiskDeveloperUILink = ({nodeId, pDiskId}: PDiskDeveloperUILinkParams) => { | ||
const pdiskPath = 'actors/pdisks/pdisk' + pad9(pDiskId); | ||
|
||
return createDeveloperUILinkWithNodeId(nodeId) + pdiskPath; | ||
}; | ||
|
||
interface VDiskDeveloperUILinkParams extends PDiskDeveloperUILinkParams { | ||
vDiskSlotId: number | string; | ||
} | ||
|
||
export const createVDiskDeveloperUILink = ({ | ||
nodeId, | ||
pDiskId, | ||
vDiskSlotId, | ||
}: VDiskDeveloperUILinkParams) => { | ||
const vdiskPath = 'actors/vdisks/vdisk' + pad9(pDiskId) + '_' + pad9(vDiskSlotId); | ||
|
||
return createDeveloperUILinkWithNodeId(nodeId) + vdiskPath; | ||
}; |