mirror of https://github.com/apache/druid.git
fix save button (#8732)
This commit is contained in:
parent
cc3650ee3b
commit
efd669757e
|
@ -25,7 +25,7 @@ exports[`show log describe show log 1`] = `
|
||||||
<a
|
<a
|
||||||
class="bp3-button bp3-minimal"
|
class="bp3-button bp3-minimal"
|
||||||
download="test"
|
download="test"
|
||||||
href="test"
|
href="/some/base_url/druid/index/test/log"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
|
|
|
@ -23,7 +23,9 @@ import { ShowLog } from './show-log';
|
||||||
|
|
||||||
describe('show log', () => {
|
describe('show log', () => {
|
||||||
it('describe show log', () => {
|
it('describe show log', () => {
|
||||||
const showLog = <ShowLog status={'RUNNING'} endpoint={'test'} downloadFilename={'test'} />;
|
const showLog = (
|
||||||
|
<ShowLog status={'RUNNING'} endpoint={'/druid/index/test/log'} downloadFilename={'test'} />
|
||||||
|
);
|
||||||
const { container } = render(showLog);
|
const { container } = render(showLog);
|
||||||
expect(container.firstChild).toMatchSnapshot();
|
expect(container.firstChild).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
|
@ -148,7 +148,12 @@ export class ShowLog extends React.PureComponent<ShowLogProps, ShowLogState> {
|
||||||
)}
|
)}
|
||||||
<ButtonGroup className="right-buttons">
|
<ButtonGroup className="right-buttons">
|
||||||
{downloadFilename && (
|
{downloadFilename && (
|
||||||
<AnchorButton text="Save" minimal download={downloadFilename} href={endpoint} />
|
<AnchorButton
|
||||||
|
text="Save"
|
||||||
|
minimal
|
||||||
|
download={downloadFilename}
|
||||||
|
href={UrlBaser.base(endpoint)}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
text="Copy"
|
text="Copy"
|
||||||
|
|
|
@ -20,4 +20,8 @@ import 'core-js/stable';
|
||||||
import { configure } from 'enzyme';
|
import { configure } from 'enzyme';
|
||||||
import enzymeAdapterReact16 from 'enzyme-adapter-react-16';
|
import enzymeAdapterReact16 from 'enzyme-adapter-react-16';
|
||||||
|
|
||||||
|
import { UrlBaser } from './singletons/url-baser';
|
||||||
|
|
||||||
configure({ adapter: new (enzymeAdapterReact16 as any)() });
|
configure({ adapter: new (enzymeAdapterReact16 as any)() });
|
||||||
|
|
||||||
|
UrlBaser.baseUrl = '/some/base_url';
|
||||||
|
|
Loading…
Reference in New Issue