mizu enterprise ui bugs (#597)

This commit is contained in:
lirazyehezkel 2022-01-10 10:01:52 +02:00 committed by GitHub
parent a2eff2654d
commit c20f74f582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 15 deletions

View File

@ -24,8 +24,10 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({isOpen, onClose, is
const [searchValue, setSearchValue] = useState(""); const [searchValue, setSearchValue] = useState("");
useEffect(() => { useEffect(() => {
if(!isOpen) return;
(async () => { (async () => {
try { try {
setSearchValue("");
setIsLoading(true); setIsLoading(true);
const tapConfig = await api.getTapConfig() const tapConfig = await api.getTapConfig()
if(isFirstLogin) { if(isFirstLogin) {
@ -43,7 +45,7 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({isOpen, onClose, is
setIsLoading(false); setIsLoading(false);
} }
})() })()
}, [isFirstLogin]) }, [isFirstLogin, isOpen])
const setAllNamespacesTappedValue = (isTap: boolean) => { const setAllNamespacesTappedValue = (isTap: boolean) => {
const newNamespaces = {}; const newNamespaces = {};

View File

@ -39,16 +39,16 @@ export const StatusBar: React.FC<Props> = ({tappingStatus}) => {
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Pod name</th> <th style={{width: "40%"}}>Pod name</th>
<th>Namespace</th> <th style={{width: "40%"}}>Namespace</th>
<th style={{marginLeft: 10}}>Tapping</th> <th style={{width: "20%", textAlign: "center"}}>Tapping</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{tappingStatus.map(pod => <tr key={pod.name}> {tappingStatus.map(pod => <tr key={pod.name}>
<td>{pod.name}</td> <td style={{width: "40%"}}>{pod.name}</td>
<td>{pod.namespace}</td> <td style={{width: "40%"}}>{pod.namespace}</td>
<td style={{textAlign: "center"}}><img style={{height: 20}} alt="status" src={pod.isTapped ? successIcon : failIcon}/></td> <td style={{width: "20%", textAlign: "center"}}><img style={{height: 20}} alt="status" src={pod.isTapped ? successIcon : failIcon}/></td>
</tr>)} </tr>)}
</tbody> </tbody>
</table> </table>

View File

@ -11,7 +11,7 @@
border-bottom-left-radius: 8px border-bottom-left-radius: 8px
border-bottom-right-radius: 8px border-bottom-right-radius: 8px
top: 0 top: 0
padding: 2px 10px padding: 10px
font-size: 14px font-size: 14px
transition: max-height 2s ease-out transition: max-height 2s ease-out
width: auto width: auto
@ -21,19 +21,30 @@
.podsCount .podsCount
display: flex display: flex
justify-content: center justify-content: center
padding: 8px
font-weight: 600 font-weight: 600
img img
margin-right: 10px margin-right: 10px
height: 22px height: 22px
table
width: 100%
margin-top: 20px
tbody
max-height: 70vh
overflow-y: auto
display: block
tr
display: table
table-layout: fixed
width: 100%
th th
text-align: left text-align: left
padding-right: 15px padding-right: 5%
td td
padding-right: 15px text-align: left
padding-top: 5px padding-right: 5%
.expandedStatusBar .expandedStatusBar
max-height: 100vh max-height: 100vh