-
+
-
+
- {clClient.status.synchronized &&
- elClient.status.synchronized &&
- !walletDismissed && (
- // TODO: Prompt handler for wallet & node status messages
-
- )}
+ {renderPrompt()}
Ethereum Clients
{clients.map((client) => {
- return ;
+ return ;
})}
diff --git a/src/renderer/Presentational/ContentSingleClient/ContentSingleClient.tsx b/src/renderer/Presentational/ContentSingleClient/ContentSingleClient.tsx
index 0fe3d1741..cafe21b61 100644
--- a/src/renderer/Presentational/ContentSingleClient/ContentSingleClient.tsx
+++ b/src/renderer/Presentational/ContentSingleClient/ContentSingleClient.tsx
@@ -15,22 +15,25 @@ import {
// TODO: process retrieved client data into this format?
const client = {
- name: 'nimbus',
+ name: 'geth',
version: 'v10',
type: 'client',
- nodeType: 'consensus',
+ nodeType: 'execution',
status: {
- synchronized: false,
+ updating: false,
+ sychronized: true,
+ initialized: false,
lowPeerCount: false,
updateAvailable: false,
- blocksBehind: false,
+ blocksBehind: true,
noConnection: false,
stopped: false,
error: false,
},
stats: {
peers: 15,
- slot: '4,456,158',
+ currentBlock: 1000,
+ highestBlock: 2000,
cpuLoad: 20,
diskUsage: 600, // in MB?
},
@@ -49,7 +52,6 @@ const ContentSingleClient = () => {
return {
...client,
info: `${clientTypeLabel} -- Ethereum mainnet`, // should be more flexible for other networks
- status: 'healthy', // change this to enum to compare weights?
};
};
@@ -59,9 +61,9 @@ const ContentSingleClient = () => {
return (
-
+
-
+
);
diff --git a/src/renderer/assets/images/icons/Updating.svg b/src/renderer/assets/images/icons/Updating.svg
new file mode 100644
index 000000000..a11af96ac
--- /dev/null
+++ b/src/renderer/assets/images/icons/Updating.svg
@@ -0,0 +1,9 @@
+
diff --git a/src/renderer/assets/images/icons/index.tsx b/src/renderer/assets/images/icons/index.tsx
index b89fa2b16..7c4d17cd2 100644
--- a/src/renderer/assets/images/icons/index.tsx
+++ b/src/renderer/assets/images/icons/index.tsx
@@ -59,6 +59,7 @@ import { ReactComponent as Stop } from './Stop.svg';
import { ReactComponent as SyncSmall } from './Sync-small.svg';
import { ReactComponent as Sync } from './Sync.svg';
import { ReactComponent as Syncing } from './Syncing.svg';
+import { ReactComponent as Updating } from './Updating.svg';
import { ReactComponent as UpLarge } from './Up-large.svg';
import { ReactComponent as Up } from './Up.svg';
import { ReactComponent as WarningCircleFilled } from './Warning-circle-filled.svg';
@@ -125,6 +126,7 @@ export interface Icons {
syncsmall?: React.ReactNode;
sync?: React.ReactNode;
syncing?: React.ReactNode;
+ updating?: React.ReactNode;
uplarge?: React.ReactNode;
up?: React.ReactNode;
warningcirclefilled?: React.ReactNode;
@@ -193,9 +195,10 @@ export const ICONS: Icons = {
syncsmall:
,
sync:
,
syncing:
,
+ updating:
,
uplarge:
,
up:
,
warningcirclefilled:
,
-};
+} as const;
export type IconId = keyof Icons;
diff --git a/src/stories/Generic/ClientCard.stories.tsx b/src/stories/Generic/ClientCard.stories.tsx
new file mode 100644
index 000000000..c55d0136c
--- /dev/null
+++ b/src/stories/Generic/ClientCard.stories.tsx
@@ -0,0 +1,37 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+
+import { ClientCard } from '../../renderer/Generics/redesign/ClientCard/ClientCard';
+
+export default {
+ title: 'Generic/ClientCard',
+ component: ClientCard,
+} as ComponentMeta
;
+
+const Template: ComponentStory = (args) => (
+
+);
+
+export const Nethermind = Template.bind({});
+Nethermind.args = {
+ name: 'erigon',
+ version: 'v10',
+ type: 'single',
+ nodeType: 'execution',
+ status: {
+ updating: false,
+ initialized: true,
+ lowPeerCount: false,
+ updateAvailable: true,
+ blocksBehind: false,
+ noConnection: false,
+ stopped: false,
+ error: false,
+ },
+ stats: {
+ peers: 16,
+ currentSlot: 90,
+ highestSlot: 190,
+ cpuLoad: 82,
+ diskUsage: 5000,
+ },
+};
diff --git a/src/stories/Generic/Header.stories.tsx b/src/stories/Generic/Header.stories.tsx
index 0bd5ffce7..f475c2827 100644
--- a/src/stories/Generic/Header.stories.tsx
+++ b/src/stories/Generic/Header.stories.tsx
@@ -12,25 +12,25 @@ const Template: ComponentStory = (args) => ;
export const Primary = Template.bind({});
Primary.args = {
- //TODO: fix this so we only pass in params?
- nodeOverview: {
- name: 'ethereum',
- title: 'Ethereum node',
- info: 'Non-Validating Node — Ethereum mainnet',
- type: 'altruistic',
- status: {
- synchronized: true,
- lowPeerCount: true,
- updateAvailable: true,
- blocksBehind: false,
- noConnection: false,
- stopped: false,
- error: false,
- },
- stats: {
- block: '32,000,200',
- cpuLoad: 90,
- diskUsage: 10000,
- },
+ name: 'ethereum',
+ title: 'Ethereum node',
+ info: 'Non-Validating Node — Ethereum mainnet',
+ type: 'altruistic',
+ status: {
+ updating: false,
+ initialized: true,
+ synchronizing: 100,
+ lowPeerCount: true,
+ updateAvailable: true,
+ blocksBehind: false,
+ noConnection: false,
+ stopped: false,
+ error: false,
+ },
+ stats: {
+ currentSlot: 90,
+ highestSlot: 190,
+ cpuLoad: 90,
+ diskUsage: 10000,
},
};
diff --git a/src/stories/Generic/HeaderMetrics.stories.tsx b/src/stories/Generic/HeaderMetrics.stories.tsx
index c30e818a1..53e51802e 100644
--- a/src/stories/Generic/HeaderMetrics.stories.tsx
+++ b/src/stories/Generic/HeaderMetrics.stories.tsx
@@ -14,24 +14,25 @@ const Template: ComponentStory = (args) => (
export const Primary = Template.bind({});
Primary.args = {
- nodeOverview: {
- name: 'ethereum',
- title: 'Ethereum node',
- info: 'Non-Validating Node — Ethereum mainnet',
- type: 'altruistic',
- status: {
- synchronized: true,
- lowPeerCount: true,
- updateAvailable: true,
- blocksBehind: false,
- noConnection: false,
- stopped: false,
- error: false,
- },
- stats: {
- block: '32,000,200',
- cpuLoad: 90,
- diskUsage: 10000,
- },
+ name: 'ethereum',
+ title: 'Ethereum node',
+ info: 'Non-Validating Node — Ethereum mainnet',
+ type: 'altruistic',
+ status: {
+ updating: false,
+ initialized: true,
+ synchronizing: 100,
+ lowPeerCount: true,
+ updateAvailable: true,
+ blocksBehind: false,
+ noConnection: false,
+ stopped: false,
+ error: false,
+ },
+ stats: {
+ currentSlot: 90,
+ highestSlot: 190,
+ cpuLoad: 90,
+ diskUsage: 10000,
},
};
diff --git a/src/stories/Presentational/ContentMultipleClients.stories.tsx b/src/stories/Presentational/ContentMultipleClients.stories.tsx
index aa3ecd8cf..ee76bd3d6 100644
--- a/src/stories/Presentational/ContentMultipleClients.stories.tsx
+++ b/src/stories/Presentational/ContentMultipleClients.stories.tsx
@@ -13,4 +13,61 @@ const Template: ComponentStory = (args) => (
);
export const Primary = Template.bind({});
-Primary.args = {};
+const currentSlot = 4671269;
+const highestSlot = 4671270;
+const currentBlock = 3000;
+const highestBlock = 3000;
+Primary.args = {
+ clients: [
+ {
+ name: 'nimbus',
+ version: 'v10',
+ type: 'single',
+ nodeType: 'consensus',
+ status: {
+ updating: false,
+ initialized: true,
+ synchronized: highestSlot - currentSlot <= 3,
+ blocksBehind:
+ highestSlot - currentSlot > 3 && highestSlot - currentSlot <= 10,
+ lowPeerCount: false,
+ updateAvailable: false,
+ noConnection: false,
+ stopped: false,
+ error: false,
+ },
+ stats: {
+ currentSlot: currentSlot,
+ highestSlot: highestSlot,
+ peers: 20,
+ cpuLoad: 20,
+ diskUsage: 600, // in MB?
+ },
+ },
+ {
+ name: 'besu',
+ version: 'v10',
+ type: 'single',
+ nodeType: 'execution',
+ status: {
+ updating: false,
+ initialized: true,
+ synchronized: highestBlock - currentBlock <= 3,
+ blocksBehind:
+ highestBlock - currentBlock > 3 && highestBlock - currentBlock <= 10,
+ lowPeerCount: false,
+ updateAvailable: true,
+ noConnection: false,
+ stopped: false,
+ error: false,
+ },
+ stats: {
+ currentBlock: currentBlock,
+ highestBlock: highestBlock,
+ peers: 16,
+ cpuLoad: 82,
+ diskUsage: 5000,
+ },
+ },
+ ],
+};