[Explore view] Use POST method for charting requests (#3993)

* [Explore view] Use POST method for charting requests

* fix per code review comments

* more code review fixes

* code review fix: remove duplicated calls for getting values from request

* [Explore view] Use POST method for charting requests

* fix per code review comments

* more code review fixes

* code review fix: remove duplicated calls for getting values from request
This commit is contained in:
Grace Guo
2018-02-13 17:21:15 -08:00
committed by GitHub
parent d2d973153f
commit 342180b263
29 changed files with 478 additions and 211 deletions

View File

@@ -3,10 +3,11 @@ import PropTypes from 'prop-types';
import { Popover, OverlayTrigger } from 'react-bootstrap';
import CopyToClipboard from './../../components/CopyToClipboard';
import { getShortUrl } from '../../../utils/common';
import { getExploreLongUrl } from '../exploreUtils';
import { t } from '../../locales';
const propTypes = {
slice: PropTypes.object.isRequired,
latestQueryFormData: PropTypes.object.isRequired,
};
export default class URLShortLinkButton extends React.Component {
@@ -24,7 +25,7 @@ export default class URLShortLinkButton extends React.Component {
}
getCopyUrl() {
const longUrl = window.location.pathname + window.location.search;
const longUrl = getExploreLongUrl(this.props.latestQueryFormData);
getShortUrl(longUrl, this.onShortUrlSuccess.bind(this));
}