Skip to content

Commit

Permalink
Clean Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentD06 committed Oct 18, 2024
1 parent 57d9aaa commit f6ff026
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
23 changes: 7 additions & 16 deletions src/web/wizard/components/configuration/ManageSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,21 +192,12 @@ const ManageSettings = createReactClass({
if (this._isLoading()) {
return <Spinner/>;
}

const tooltipReplace = (<FormattedMessage id ="wizard.tooltipReplace" defaultMessage="Replace the alert rule with the one you are importing" />);

const tooltipReplace = (
<Tooltip id="doNothing-tooltip">
<FormattedMessage id ="wizard.tooltipReplace" defaultMessage="Replace the alert rule with the one you are importing" />
</Tooltip>);

const tooltipDoNothing = (
<Tooltip id="doNothing-tooltip">
<FormattedMessage id ="wizard.tooltipDoNothing" defaultMessage="No alert rules will be changed" />
</Tooltip>);
const tooltipDoNothing = (<FormattedMessage id ="wizard.tooltipDoNothing" defaultMessage="No alert rules will be changed" />);

const tooltipRename = (
<Tooltip id="doNothing-tooltip">
<FormattedMessage id ="wizard.tooltipRename" defaultMessage="The alert rule you are importing will be renamed <title(1)>" />
</Tooltip>);
const tooltipRename = (<FormattedMessage id ="wizard.tooltipRename" defaultMessage="The alert rule you are importing will be renamed <title(1)>" />);

return (
<span>
Expand Down Expand Up @@ -243,23 +234,23 @@ const ManageSettings = createReactClass({
<h3><FormattedMessage id="wizard.importPolicy" defaultMessage="Import strategy" /></h3>
<p><FormattedMessage id="wizard.descriptionImportPolicy" defaultMessage="Choose the action when the alert rule already exists." /></p>
<FormGroup>
<OverlayTrigger overlay={tooltipDoNothing} placement="top" trigger={['hover', 'focus']} className="" rootClose>
<OverlayTrigger overlay={tooltipDoNothing} placement="top" trigger={['hover', 'focus']}>
<div className="radio">
<label>
<input type="radio" value="DONOTHING" checked={this.state.config.import_policy === 'DONOTHING'} onChange={this._onRadioChange}/>
<FormattedMessage id="wizard.doNothing" defaultMessage="Don't import" />
</label>
</div>
</OverlayTrigger>
<OverlayTrigger overlay={tooltipReplace} placement="top" trigger={['hover', 'focus']} className="" rootClose>
<OverlayTrigger overlay={tooltipReplace} placement="top" trigger={['hover', 'focus']}>
<div className="radio">
<label>
<input type="radio" value="REPLACE" checked={this.state.config.import_policy === 'REPLACE'} onChange={this._onRadioChange}/>
<FormattedMessage id="wizard.replace" defaultMessage="Import and Replace" />
</label>
</div>
</OverlayTrigger>
<OverlayTrigger overlay={tooltipRename} placement="top" trigger={['hover', 'focus']} className="" rootClose>
<OverlayTrigger overlay={tooltipRename} placement="top" trigger={['hover', 'focus']}>
<div className="radio">
<label>
<input type="radio" value="RENAME" checked={this.state.config.import_policy === 'RENAME'} onChange={this._onRadioChange}/>
Expand Down
10 changes: 2 additions & 8 deletions src/web/wizard/components/lists/AlertListDisplay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ const AlertListDisplay = createReactClass({
</div>
);

const tooltipUser = (
<Tooltip id="default-user-tooltip">
<FormattedMessage id ="wizard.tooltipUserList" defaultMessage="The last user who modified the list" />
</Tooltip>);
const tooltipUser = (<FormattedMessage id ="wizard.tooltipUserList" defaultMessage="The last user who modified the list" />);

let tabFields = [<td className="limited">{list.title}</td>];
this.props.config.field_order.map((field) => {
Expand All @@ -180,10 +177,7 @@ const AlertListDisplay = createReactClass({
tabFields.push(<td className="limited">
<OverlayTrigger overlay={tooltipUser}
placement="top"
trigger={['hover', 'focus']}
rootClose
className={''}
>
trigger={['hover', 'focus']}>
<span>{list.creator_user_id}</span>
</OverlayTrigger>
</td>);
Expand Down

0 comments on commit f6ff026

Please sign in to comment.