Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f169bbabd | |||
| a5d4ecf045 |
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@ethersphere/bee-dashboard",
|
||||
"version": "0.26.0",
|
||||
"version": "0.26.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ethersphere/bee-dashboard",
|
||||
"version": "0.26.0",
|
||||
"version": "0.26.1",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@ethersphere/bee-js": "^7.0.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ethersphere/bee-dashboard",
|
||||
"version": "0.26.0",
|
||||
"version": "0.26.1",
|
||||
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
|
||||
"keywords": [
|
||||
"bee",
|
||||
|
||||
@@ -12,7 +12,7 @@ import NodeInfoCard from './NodeInfoCard'
|
||||
import { WalletInfoCard } from './WalletInfoCard'
|
||||
|
||||
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 { beeDesktopVersion } = useBeeDesktop(isDesktop, desktopUrl)
|
||||
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} />
|
||||
{chainId !== null && <ExpandableListItem label="Blockchain network" value={chainIdToName(chainId)} />}
|
||||
</div>
|
||||
|
||||
+10
-4
@@ -41,6 +41,7 @@ interface Status {
|
||||
}
|
||||
|
||||
interface ContextInterface {
|
||||
beeVersion: string | null
|
||||
status: Status
|
||||
error: Error | null
|
||||
apiHealth: boolean
|
||||
@@ -65,6 +66,7 @@ interface ContextInterface {
|
||||
}
|
||||
|
||||
const initialValues: ContextInterface = {
|
||||
beeVersion: null,
|
||||
status: {
|
||||
all: CheckState.ERROR,
|
||||
apiConnection: { isEnabled: false, checkState: CheckState.ERROR },
|
||||
@@ -164,6 +166,7 @@ interface Props {
|
||||
|
||||
export function Provider({ children }: Props): ReactElement {
|
||||
const { beeApi } = useContext(SettingsContext)
|
||||
const [beeVersion, setBeeVersion] = useState<string | null>(null)
|
||||
const [apiHealth, setApiHealth] = useState<boolean>(false)
|
||||
const [nodeAddresses, setNodeAddresses] = useState<NodeAddresses | null>(null)
|
||||
const [nodeInfo, setNodeInfo] = useState<NodeInfo | null>(null)
|
||||
@@ -262,11 +265,13 @@ export function Provider({ children }: Props): ReactElement {
|
||||
}
|
||||
|
||||
const promises = [
|
||||
// API health
|
||||
beeApi
|
||||
.isConnected({ timeout: TIMEOUT })
|
||||
.then(setApiHealth)
|
||||
.catch(() => setApiHealth(false)),
|
||||
.getHealth({ timeout: TIMEOUT })
|
||||
.then(response => setBeeVersion(response.version))
|
||||
.catch(() => setBeeVersion(null)),
|
||||
|
||||
// API health
|
||||
beeApi.isConnected({ timeout: TIMEOUT }).catch(() => setApiHealth(false)),
|
||||
|
||||
// Node Addresses
|
||||
beeApi
|
||||
@@ -376,6 +381,7 @@ export function Provider({ children }: Props): ReactElement {
|
||||
return (
|
||||
<Context.Provider
|
||||
value={{
|
||||
beeVersion,
|
||||
status,
|
||||
error,
|
||||
apiHealth,
|
||||
|
||||
Reference in New Issue
Block a user