Skip to content

Commit 5669e82

Browse files
authored
Merge pull request #68 from cgalibern/v7-remove-X509-support
Add reset button and fix error in ObjInstanceStateList
2 parents be03e4b + eeb66a8 commit 5669e82

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/js/components/Authenticating.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import Button from '@mui/material/Button'
99

1010
function Authenticating(props) {
1111
const {i18n, t} = useTranslation()
12+
const resetDefaultAuthChoice = () => {
13+
localStorage.setItem("opensvc.authChoice", "")
14+
window.location.reload()
15+
}
16+
1217
return (
1318
<Dialog
1419
open={true}
@@ -26,6 +31,9 @@ function Authenticating(props) {
2631
<Button onClick={() => location.reload()}>
2732
{t("Reload")}
2833
</Button>
34+
<Button onClick={resetDefaultAuthChoice}>
35+
{t("Reset authentication method")}
36+
</Button>
2937
</DialogActions>
3038
</Dialog>
3139
)

src/js/components/ObjInstanceStateList.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,16 @@ function ObjInstanceStateList(props) {
1616
if (cstat.monitor === undefined) {
1717
return null
1818
}
19-
var data = cstat.monitor.nodes[node].services.status[path]
20-
return (
19+
let nodeData = cstat.monitor.nodes[node]
20+
if (nodeData === undefined) {
21+
return null
22+
}
23+
let data = nodeData.services.status[path]
24+
if (data === undefined) {
25+
return null
26+
}
27+
28+
return (
2129
<List dense={true}>
2230
<ObjAvailItem avail={data.avail} />
2331
<MonitorStatusBadgeItem state={data.monitor.status} />

0 commit comments

Comments
 (0)