Skip to content

Commit 893a7d3

Browse files
committed
Merge branch 'develop'
2 parents 440c6b5 + bd8970a commit 893a7d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3581
-376
lines changed

Dockerfile.dev

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ COPY --from=git-data /usr/src/app/.git-data.json $GIT_DATA_PATH
2929
COPY package.json yarn.lock .yarnrc.yml tsconfig.json ./
3030
COPY packages packages
3131

32-
# link instructions must be executed in runtime due to the way the volumes are mounted
33-
ENTRYPOINT ["/bin/sh", "-c", "ln -sf /app/packages/admin-ui/build/ /app/packages/dappmanager/dist && \
34-
ln -sf /usr/src/app/dnp_repo/ /app/packages/dappmanager && \
35-
ln -sf /usr/src/app/DNCORE/ /app/packages/dappmanager && \
32+
ENTRYPOINT ["/bin/sh", "-c", "mkdir -p /app/packages/dappmanager/dnp_repo /app/packages/dappmanager/DNCORE && \
33+
ln -sf /app/packages/admin-ui/build/ /app/packages/dappmanager/dist && \
3634
yarn && yarn build && yarn run dev"]

docker-compose-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ services:
1919
restart: always
2020
volumes:
2121
- "/run/dbus/system_bus_socket:/run/dbus/system_bus_socket"
22-
- "/var/lib/docker/volumes/dncore_dappmanagerdnpdappnodeeth_data/_data:/usr/src/app/dnp_repo/"
23-
- "/usr/src/dappnode/DNCORE/:/usr/src/app/DNCORE/"
22+
- "/var/lib/docker/volumes/dncore_dappmanagerdnpdappnodeeth_data/_data:/app/packages/dappmanager/dnp_repo/"
23+
- "/usr/src/dappnode/DNCORE/:/app/packages/dappmanager/DNCORE/" # left side must be absolute path where DNCORE is located in the host. i.e on macos /Users/<user>/dappnode/DNCORE/
2424
- "/var/run/docker.sock:/var/run/docker.sock"
2525
- "/etc/hostname:/etc/dappnodename:ro"
2626
- "./:/app"
@@ -29,6 +29,7 @@ services:
2929
- ETH_MAINNET_RPC_URL_REMOTE=
3030
- IPFS_HOST=
3131
- DISABLE_UPNP=
32+
3233
networks:
3334
dncore_network:
3435
aliases:

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ services:
2424
- DISABLE_UPNP=
2525
- ALWAYS_DAPPGETBASIC=
2626
- SKIP_COMPOSE_VALIDATION=
27+
- TEST=
28+
2729
networks:
2830
dncore_network:
2931
aliases:

packages/admin-ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"@types/react-dom": "^18.3.0",
6565
"nodemon": "^3.1.4",
6666
"prettier": "^1.16.4",
67-
"ts-node": "^10.9.2"
67+
"ts-node": "^10.9.2",
68+
"vite-plugin-svgr": "^4.5.0"
6869
},
6970
"optionalDependencies": {
7071
"@rollup/rollup-linux-x64-gnu": "4.18.0"

packages/admin-ui/src/__mock-backend__/index.ts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,44 @@ export const otherCalls: Omit<Routes, keyof typeof namedSpacedCalls> = {
5656
progress: 0.83027522935
5757
}
5858
],
59+
nodeStatusGetByNetwork: async () => ({
60+
mainnet: {
61+
ec: {
62+
name: "Nethermind",
63+
dnp: "nethermind.dnp.dappnode.eth",
64+
isSynced: true,
65+
currentBlock: 23648945,
66+
progress: 100,
67+
peers: 50
68+
},
69+
cc: {
70+
name: "Nimbus",
71+
dnp: "nimbus.dnp.dappnode.eth",
72+
isSynced: true,
73+
currentBlock: 12875373,
74+
progress: 100,
75+
peers: 40
76+
}
77+
},
78+
hoodi: {
79+
ec: {
80+
name: "besu",
81+
dnp: "besu-hoodi.dnp.dappnode.eth",
82+
isSynced: true,
83+
currentBlock: 1480848,
84+
progress: 100,
85+
peers: 30
86+
},
87+
cc: {
88+
name: "Prysm",
89+
dnp: "prysm-hoodi.dnp.dappnode.eth",
90+
isSynced: false,
91+
currentBlock: 1592925,
92+
progress: 100,
93+
peers: 20
94+
}
95+
}
96+
}),
5997
changeIpfsTimeout: async () => {},
6098
cleanCache: async () => {},
6199
cleanDb: async () => {},
@@ -226,6 +264,8 @@ export const otherCalls: Omit<Routes, keyof typeof namedSpacedCalls> = {
226264
ipfsClientTarget: IpfsClientTarget.remote,
227265
ipfsGateway: "https://ipfs-gateway.dappnode.net"
228266
}),
267+
mirrorProviderGet: async () => ({ enabled: false }),
268+
mirrorProviderSet: async () => {},
229269
enableEthicalMetrics: async () => {},
230270
getEthicalMetricsConfig: async () => ({
231271
mail: "@example.com",
@@ -411,6 +451,12 @@ export const otherCalls: Omit<Routes, keyof typeof namedSpacedCalls> = {
411451
gnosis: "prysm-gnosis.dnp.dappnode.eth"
412452
};
413453
},
454+
executionClientsGetByNetworks: async () => {
455+
return {
456+
mainnet: "geth.dnp.dappnode.eth",
457+
gnosis: "nethermind-xdai.dnp.dappnode.eth"
458+
};
459+
},
414460
premiumBeaconBackupActivate: async () => {},
415461
premiumBeaconBackupDeactivate: async () => {},
416462
premiumBeaconBackupStatus: async (): Promise<Record<string, BeaconBackupNetworkStatus>> => {
@@ -433,6 +479,43 @@ export const otherCalls: Omit<Routes, keyof typeof namedSpacedCalls> = {
433479
mainnet: { validators: ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"] },
434480
hoodi: { validators: [] },
435481
gnosis: null
482+
}),
483+
484+
validatorsDataByNetwork: async () => ({
485+
mainnet: {
486+
active: { validators: ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"] },
487+
attesting: { validators: ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"] },
488+
balances: {
489+
balances: {
490+
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef": "32000000000"
491+
}
492+
}
493+
},
494+
hoodi: {
495+
active: { validators: [] },
496+
attesting: { validators: [] },
497+
balances: { balances: {} }
498+
},
499+
gnosis: {
500+
active: null,
501+
attesting: null,
502+
balances: null
503+
}
504+
}),
505+
506+
signerByNetworkGet: async () => ({
507+
mainnet: {
508+
isInstalled: true,
509+
brainRunning: true
510+
},
511+
hoodi: {
512+
isInstalled: true,
513+
brainRunning: false
514+
},
515+
gnosis: {
516+
isInstalled: false,
517+
brainRunning: false
518+
}
436519
})
437520
};
438521

packages/admin-ui/src/components/Loading.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import React, { useState, useEffect } from "react";
22
import logoAnimated from "img/dappNodeAnimation.gif";
33
import "./loading.scss";
44

5-
export default function Loading({ steps }: { steps: string[] }) {
5+
export default function Loading({ steps, small }: { steps?: string[]; small?: boolean }) {
66
const [index, setIndex] = useState(0);
77
useEffect(() => {
88
const interval = setInterval(() => setIndex((i) => i + 1), 3000);
99
return () => clearInterval(interval);
1010
}, []);
1111

1212
return (
13-
<div className="loading-view">
13+
<div className={`loading-view ${small && "small"}`}>
1414
<img src={logoAnimated} alt="Loading icon" />
15-
<p className="steps">{steps[index] || steps[steps.length - 1]}...</p>
15+
{steps && <p className="steps">{steps[index] || steps[steps.length - 1]}...</p>}
1616
</div>
1717
);
1818
}

packages/admin-ui/src/components/loading.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@
1212
p {
1313
opacity: 0.6;
1414
}
15+
16+
&.small {
17+
margin: 1rem 0px;
18+
img {
19+
width: 50px;
20+
height: 50px;
21+
margin: 0px;
22+
}
23+
}
1524
}

0 commit comments

Comments
 (0)