Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #463 from dottorblaster/address-settings-modal-quirks
Browse files Browse the repository at this point in the history
Address HANA cluster settings modal quirks
  • Loading branch information
dottorblaster authored Nov 16, 2021
2 parents 4209048 + e20b2b1 commit 5a068b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions web/checks_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package web
import (
"fmt"
"net/http"
"sort"

"github.com/gin-gonic/gin"

Expand Down Expand Up @@ -60,6 +61,11 @@ func ApiChecksCatalogHandler(s services.ChecksService) gin.HandlerFunc {
g := JSONChecksGroup{Group: group.Group, Checks: group.Checks}
groupedCatalog = append(groupedCatalog, &g)
}

sort.SliceStable(groupedCatalog, func(i, j int) bool {
return groupedCatalog[i].Group < groupedCatalog[j].Group
})

c.JSON(http.StatusOK, groupedCatalog)
}
}
Expand Down
5 changes: 4 additions & 1 deletion web/frontend/components/Accordion/Toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const AccordionToggle = ({ className = '', eventKey, callback = () => {} }) => {
);

return (
<i className={`eos-icons eos-18 ${className}`} onClick={decoratedOnClick}>
<i
className={`eos-icons eos-18 trento-pointer ${className}`}
onClick={decoratedOnClick}
>
keyboard_arrow_down
</i>
);
Expand Down
5 changes: 3 additions & 2 deletions web/frontend/javascripts/cluster_check_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const SettingsButton = () => {
post(`/api/checks/${clusterId}/settings`, payload)
.then(() => {
setLoading(false);
setModalOpen(false);
showSuccessToast({
content: 'Cluster settings successfully saved.',
});
Expand All @@ -96,8 +97,8 @@ const SettingsButton = () => {
<Button variant="secondary" size="sm" onClick={() => setModalOpen(true)}>
<i className="eos-icons eos-18">settings</i>Settings
</Button>
<Modal show={modalOpen}>
<Modal.Header>
<Modal show={modalOpen} onHide={() => setModalOpen(false)}>
<Modal.Header closeButton>
<Modal.Title>Cluster settings</Modal.Title>
</Modal.Header>
<Modal.Body>
Expand Down
4 changes: 4 additions & 0 deletions web/frontend/stylesheets/stylesheets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,7 @@ td i.critical {
.color-red {
color: $eos-bc-red-500;
}

.trento-pointer {
cursor: pointer;
}

0 comments on commit 5a068b3

Please sign in to comment.