This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new 7f503a9  Fix #509
7f503a9 is described below

commit 7f503a9151321917264f3bb5fd7fc3aae8a3a6f2
Author: Marat Gubaidullin <marat.gubaidul...@gmail.com>
AuthorDate: Tue Nov 1 08:48:48 2022 -0400

    Fix #509
---
 .../org/apache/camel/karavan/service/StatusService.java  |  3 ---
 .../src/main/webapp/src/dashboard/DashboardPage.tsx      | 16 ++++++++--------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git 
a/karavan-app/src/main/java/org/apache/camel/karavan/service/StatusService.java 
b/karavan-app/src/main/java/org/apache/camel/karavan/service/StatusService.java
index 7f5b746..4350a22 100644
--- 
a/karavan-app/src/main/java/org/apache/camel/karavan/service/StatusService.java
+++ 
b/karavan-app/src/main/java/org/apache/camel/karavan/service/StatusService.java
@@ -107,9 +107,6 @@ public class StatusService {
                 ? String.format("http://%s-%s.%s/q/health";, projectId, 
kubernetesService.getNamespace(), kubernetesService.getCluster())
                 : String.format("http://%s.%s.%s/q/health";, projectId, 
kubernetesService.getNamespace(), "svc.cluster.local");
         CamelStatus cs = getCamelStatus(projectId, url);
-        LOGGER.info("-----");
-        LOGGER.info(cs.toString());
-        LOGGER.info("-----");
         try {
             String data = mapper.writeValueAsString(cs);
             eventBus.send(CMD_SAVE_STATUS, data);
diff --git a/karavan-app/src/main/webapp/src/dashboard/DashboardPage.tsx 
b/karavan-app/src/main/webapp/src/dashboard/DashboardPage.tsx
index 79fde5f..f1cade4 100644
--- a/karavan-app/src/main/webapp/src/dashboard/DashboardPage.tsx
+++ b/karavan-app/src/main/webapp/src/dashboard/DashboardPage.tsx
@@ -21,6 +21,7 @@ import {KaravanApi} from "../api/KaravanApi";
 import Icon from "../Logo";
 import UpIcon from "@patternfly/react-icons/dist/esm/icons/check-circle-icon";
 import DownIcon from 
"@patternfly/react-icons/dist/esm/icons/error-circle-o-icon";
+import QuestionIcon from 
"@patternfly/react-icons/dist/esm/icons/question-circle-icon";
 import RefreshIcon from "@patternfly/react-icons/dist/esm/icons/sync-alt-icon";
 
 interface Props {
@@ -299,17 +300,16 @@ export class DashboardPage extends React.Component<Props, 
State> {
                                     </Td>
                                     <Td modifier={"fitContent"}>
                                         <Flex direction={{default: "column"}}>
-                                            
{this.getCamelStatusByEnvironments(deployment).map(value => (
-                                                <FlexItem key={value[0]}>
+                                            
{this.getCamelStatusByEnvironments(deployment).map(value => {
+                                                const color = value[1] ? 
(value[1].consumerStatus === "UP" ? "green" : "red") : "grey";
+                                                const icon = value[1] ? 
(value[1].consumerStatus === "UP" ? <UpIcon/> : <DownIcon/>) : undefined;
+                                                const text = value[1] ? 
value[1]?.contextVersion : "???";
+                                                return <FlexItem 
key={value[0]}>
                                                     <LabelGroup numLabels={4} 
className="camel-label-group">
-                                                        <Label 
color={value[1]?.consumerStatus === "UP" ? "green" : "red"}
-                                                               
className="table-label"
-                                                               
icon={value[1]?.consumerStatus === "UP" ? <UpIcon/> : <DownIcon/>}>
-                                                            
{value[1]?.consumerStatus}
-                                                        </Label>
+                                                        <Label color={color} 
className="table-label" icon={icon}>{text}</Label>
                                                     </LabelGroup>
                                                 </FlexItem>
-                                            ))}
+                                            })}
                                         </Flex>
                                     </Td>
                                 </Tr>

Reply via email to