Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a00ca77b3e | |||
| cae90c1a82 | |||
| 7f169bbabd | |||
| a5d4ecf045 |
@@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.26.2](https://github.com/ethersphere/bee-dashboard/compare/v0.26.1...v0.26.2) (2024-06-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* merge version and health check ([#662](https://github.com/ethersphere/bee-dashboard/issues/662)) ([cae90c1](https://github.com/ethersphere/bee-dashboard/commit/cae90c1a82e16ee8c7908c43e2fd17f7130eb89d))
|
||||||
|
|
||||||
|
## [0.26.1](https://github.com/ethersphere/bee-dashboard/compare/v0.26.0...v0.26.1) (2024-06-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add bee version ([#659](https://github.com/ethersphere/bee-dashboard/issues/659)) ([a5d4ecf](https://github.com/ethersphere/bee-dashboard/commit/a5d4ecf045f691b9059fcca925d0f30675d12db0))
|
||||||
|
|
||||||
## [0.26.0](https://github.com/ethersphere/bee-dashboard/compare/v0.25.0...v0.26.0) (2024-06-03)
|
## [0.26.0](https://github.com/ethersphere/bee-dashboard/compare/v0.25.0...v0.26.0) (2024-06-03)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@ethersphere/bee-dashboard",
|
"name": "@ethersphere/bee-dashboard",
|
||||||
"version": "0.26.0",
|
"version": "0.26.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ethersphere/bee-dashboard",
|
"name": "@ethersphere/bee-dashboard",
|
||||||
"version": "0.26.0",
|
"version": "0.26.2",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ethersphere/bee-js": "^7.0.0",
|
"@ethersphere/bee-js": "^7.0.0",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ethersphere/bee-dashboard",
|
"name": "@ethersphere/bee-dashboard",
|
||||||
"version": "0.26.0",
|
"version": "0.26.2",
|
||||||
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
|
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"bee",
|
"bee",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import NodeInfoCard from './NodeInfoCard'
|
|||||||
import { WalletInfoCard } from './WalletInfoCard'
|
import { WalletInfoCard } from './WalletInfoCard'
|
||||||
|
|
||||||
export default function Status(): ReactElement {
|
export default function Status(): ReactElement {
|
||||||
const { status, topology, nodeInfo, chainId } = useContext(BeeContext)
|
const { beeVersion, status, topology, nodeInfo, chainId } = useContext(BeeContext)
|
||||||
const { isDesktop, desktopUrl } = useContext(SettingsContext)
|
const { isDesktop, desktopUrl } = useContext(SettingsContext)
|
||||||
const { beeDesktopVersion } = useBeeDesktop(isDesktop, desktopUrl)
|
const { beeDesktopVersion } = useBeeDesktop(isDesktop, desktopUrl)
|
||||||
const { newBeeDesktopVersion } = useNewBeeDesktopVersion(isDesktop, desktopUrl, false)
|
const { newBeeDesktopVersion } = useNewBeeDesktopVersion(isDesktop, desktopUrl, false)
|
||||||
@@ -52,6 +52,7 @@ export default function Status(): ReactElement {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
<ExpandableListItem label="Bee version" value={beeVersion} />
|
||||||
<ExpandableListItem label="Mode" value={nodeInfo?.beeMode} />
|
<ExpandableListItem label="Mode" value={nodeInfo?.beeMode} />
|
||||||
{chainId !== null && <ExpandableListItem label="Blockchain network" value={chainIdToName(chainId)} />}
|
{chainId !== null && <ExpandableListItem label="Blockchain network" value={chainIdToName(chainId)} />}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+11
-3
@@ -41,6 +41,7 @@ interface Status {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ContextInterface {
|
interface ContextInterface {
|
||||||
|
beeVersion: string | null
|
||||||
status: Status
|
status: Status
|
||||||
error: Error | null
|
error: Error | null
|
||||||
apiHealth: boolean
|
apiHealth: boolean
|
||||||
@@ -65,6 +66,7 @@ interface ContextInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const initialValues: ContextInterface = {
|
const initialValues: ContextInterface = {
|
||||||
|
beeVersion: null,
|
||||||
status: {
|
status: {
|
||||||
all: CheckState.ERROR,
|
all: CheckState.ERROR,
|
||||||
apiConnection: { isEnabled: false, checkState: CheckState.ERROR },
|
apiConnection: { isEnabled: false, checkState: CheckState.ERROR },
|
||||||
@@ -164,6 +166,7 @@ interface Props {
|
|||||||
|
|
||||||
export function Provider({ children }: Props): ReactElement {
|
export function Provider({ children }: Props): ReactElement {
|
||||||
const { beeApi } = useContext(SettingsContext)
|
const { beeApi } = useContext(SettingsContext)
|
||||||
|
const [beeVersion, setBeeVersion] = useState<string | null>(null)
|
||||||
const [apiHealth, setApiHealth] = useState<boolean>(false)
|
const [apiHealth, setApiHealth] = useState<boolean>(false)
|
||||||
const [nodeAddresses, setNodeAddresses] = useState<NodeAddresses | null>(null)
|
const [nodeAddresses, setNodeAddresses] = useState<NodeAddresses | null>(null)
|
||||||
const [nodeInfo, setNodeInfo] = useState<NodeInfo | null>(null)
|
const [nodeInfo, setNodeInfo] = useState<NodeInfo | null>(null)
|
||||||
@@ -264,9 +267,13 @@ export function Provider({ children }: Props): ReactElement {
|
|||||||
const promises = [
|
const promises = [
|
||||||
// API health
|
// API health
|
||||||
beeApi
|
beeApi
|
||||||
.isConnected({ timeout: TIMEOUT })
|
.getHealth({ timeout: TIMEOUT })
|
||||||
.then(setApiHealth)
|
.then(response => setBeeVersion(response.version))
|
||||||
.catch(() => setApiHealth(false)),
|
.then(() => setApiHealth(true))
|
||||||
|
.catch(() => {
|
||||||
|
setBeeVersion(null)
|
||||||
|
setApiHealth(false)
|
||||||
|
}),
|
||||||
|
|
||||||
// Node Addresses
|
// Node Addresses
|
||||||
beeApi
|
beeApi
|
||||||
@@ -376,6 +383,7 @@ export function Provider({ children }: Props): ReactElement {
|
|||||||
return (
|
return (
|
||||||
<Context.Provider
|
<Context.Provider
|
||||||
value={{
|
value={{
|
||||||
|
beeVersion,
|
||||||
status,
|
status,
|
||||||
error,
|
error,
|
||||||
apiHealth,
|
apiHealth,
|
||||||
|
|||||||
Reference in New Issue
Block a user