You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2021/05/22 08:32:21 UTC

[incubator-pinot] branch master updated: fixed UI crashing when server or brokers are offline (#6935)

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

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d6ca90  fixed UI crashing when server or brokers are offline (#6935)
0d6ca90 is described below

commit 0d6ca90059babaa4fbbd70e7a466bedd6bf18e60
Author: Sanket Shah <sh...@users.noreply.github.com>
AuthorDate: Sat May 22 14:01:55 2021 +0530

    fixed UI crashing when server or brokers are offline (#6935)
---
 pinot-controller/src/main/resources/app/pages/HomePage.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pinot-controller/src/main/resources/app/pages/HomePage.tsx b/pinot-controller/src/main/resources/app/pages/HomePage.tsx
index c61ef3f..88e3681 100644
--- a/pinot-controller/src/main/resources/app/pages/HomePage.tsx
+++ b/pinot-controller/src/main/resources/app/pages/HomePage.tsx
@@ -101,7 +101,7 @@ const HomePage = () => {
           <Link to="/tenants" className={classes.paperLinks}>
             <Paper className={classes.paper}>
               <h4>Tenants</h4>
-              <h2>{tenantsData.records.length}</h2>
+              <h2>{Array.isArray(tenantsData.records) ? tenantsData.records.length : 0}</h2>
             </Paper>
           </Link>
         </Grid>
@@ -109,7 +109,7 @@ const HomePage = () => {
           <Link to="/controllers" className={classes.paperLinks}>
             <Paper className={classes.paper}>
               <h4>Controllers</h4>
-              <h2>{instances.Controller.length}</h2>
+              <h2>{Array.isArray(instances.Controller) ? instances.Controller.length : 0}</h2>
             </Paper>
           </Link>
         </Grid>
@@ -117,7 +117,7 @@ const HomePage = () => {
           <Link to="/brokers" className={classes.paperLinks}>
             <Paper className={classes.paper}>
               <h4>Brokers</h4>
-              <h2>{instances.Broker.length}</h2>
+              <h2>{Array.isArray(instances.Broker) ? instances.Broker.length : 0}</h2>
             </Paper>
           </Link>
         </Grid>
@@ -125,7 +125,7 @@ const HomePage = () => {
           <Link to="/servers" className={classes.paperLinks}>
             <Paper className={classes.paper}>
               <h4>Servers</h4>
-              <h2>{instances.Server.length}</h2>
+              <h2>{Array.isArray(instances.Server) ? instances.Server.length : 0}</h2>
             </Paper>
           </Link>
         </Grid>
@@ -133,7 +133,7 @@ const HomePage = () => {
           <Link to="/tables" className={classes.paperLinks}>
             <Paper className={classes.paper}>
               <h4>Tables</h4>
-              <h2>{tables.length}</h2>
+              <h2>{Array.isArray(tables) ? tables.length : 0}</h2>
             </Paper>
           </Link>
         </Grid>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org