Explorar o código

UI: change label Approx Count to Entity Count if the collection is
loaded on the overview page

Signed-off-by: ryjiang <jiangruiyi@gmail.com>

ryjiang hai 1 ano
pai
achega
e732d2af93
Modificáronse 1 ficheiros con 10 adicións e 4 borrados
  1. 10 4
      client/src/pages/databases/collections/overview/Overview.tsx

+ 10 - 4
client/src/pages/databases/collections/overview/Overview.tsx

@@ -304,10 +304,16 @@ const Overview = () => {
 
           <div className={classes.block}>
             <Typography variant="h5">
-              {collectionTrans('rowCount')}
-              <CustomToolTip title={collectionTrans('entityCountInfo')}>
-                <Icons.question classes={{ root: classes.questionIcon }} />
-              </CustomToolTip>
+              {collection.loaded ? (
+                collectionTrans('count')
+              ) : (
+                <>
+                  {collectionTrans('rowCount')}
+                  <CustomToolTip title={collectionTrans('entityCountInfo')}>
+                    <Icons.question classes={{ root: classes.questionIcon }} />
+                  </CustomToolTip>
+                </>
+              )}
             </Typography>
             <Typography variant="h6">{collection?.rowCount || '0'}</Typography>
           </div>