Explorar el Código

Add tooltip to replica list item schedule icon

Sergiu Miclea hace 7 años
padre
commit
997aac542d

+ 5 - 1
src/components/molecules/MainListItem/MainListItem.jsx

@@ -221,7 +221,11 @@ class MainListItem extends React.Component<Props> {
                 style={{ marginRight: '8px' }}
                 data-test-id={`mainListItem-statusPill-${status}`}
               /> : null}
-              {this.props.showScheduleIcon ? <ScheduleImage /> : null}
+              {this.props.showScheduleIcon ? (
+                <ScheduleImage
+                  data-tip="The Replica has scheduling enabled and will execute automatically"
+                />
+              ) : null}
             </StatusWrapper>
           </Title>
           {endpointImages}

+ 3 - 0
src/components/organisms/MainList/MainList.jsx

@@ -20,6 +20,7 @@ import styled from 'styled-components'
 
 import StatusImage from '../../atoms/StatusImage'
 import Button from '../../atoms/Button'
+import Tooltip from '../../atoms/Tooltip'
 
 import type { MainItem } from '../../../types/MainItem'
 import Palette from '../../styleUtils/Palette'
@@ -184,6 +185,8 @@ class MainList extends React.Component<Props> {
       <Wrapper>
         {this.props.loading || this.props.items.length === 0 || this.props.showEmptyList ? <Separator /> : null}
         {renderContent()}
+        <Tooltip />
+        {setTimeout(() => { Tooltip.rebuild() }, 500)}
       </Wrapper>
     )
   }