Skip to content

Commit

Permalink
[Widget Params] Updated help url and tooltip (#3428)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbena authored and arikfr committed Feb 13, 2019
1 parent 901f28a commit 9b1f277
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/app/components/ParameterMappingInput.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/no-multi-comp */

import { isString, extend, each, map, includes, findIndex, find, fromPairs, clone, isEmpty, replace } from 'lodash';
import { isString, extend, each, map, includes, findIndex, find, fromPairs, clone, isEmpty } from 'lodash';
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
Expand All @@ -23,7 +23,10 @@ import './ParameterMappingInput.less';

const { Option } = Select;

const HELP_URL = 'https://redash.io/help/user-guide/querying/query-parameters?source={0}';
const HELP_URL = [
'https://redash.io/help/user-guide/querying/query-parameters?source=dialog#Value-Source-Options',
'Guide: Value Source Options',
];

export const MappingType = {
DashboardAddNew: 'dashboard-add-new',
Expand Down Expand Up @@ -336,15 +339,15 @@ class MappingEditor extends React.Component {

renderContent() {
const { mapping, inputError } = this.state;
const helpUrl = replace(HELP_URL, '{0}', 'edit_mapping');
const [helpUrl, tooltip] = HELP_URL;

return (
<div className="parameter-mapping-editor">
<header>
Edit Source and Value
{/* eslint-disable-next-line react/jsx-no-target-blank */}
<a href={helpUrl} target="_blank" rel="noopener">
<Tooltip title="Learn more about editing query paramaters (opens in a new window)">
<Tooltip title={tooltip}>
<Icon type="question-circle" />
</Tooltip>
</a>
Expand Down

0 comments on commit 9b1f277

Please sign in to comment.