Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Su <[email protected]>
  • Loading branch information
zhongnansu committed Apr 5, 2023
1 parent 638b6bf commit f059d32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
IScopedClusterClient,
opensearchDashboardsResponseFactory,
} from '../../../../../../../../core/server';
import { getProxyRouteHandlerDeps, buildBufferedBodyMock } from './mocks';
import { getProxyRouteHandlerDeps } from './mocks';
import { createHandler } from '../create_handler';
import { coreMock } from '../../../../../../../../core/server/mocks';

Expand All @@ -42,7 +42,6 @@ describe('Console Proxy Route', () => {
beforeEach(() => {
const requestHandlerContextMock = coreMock.createRequestHandlerContext();
opensearchClient = requestHandlerContextMock.opensearch.client;
// buildBufferedBodyMock.mockResolvedValue(Buffer.from('body'));

request = async (method: string, path: string) => {
const handler = createHandler(getProxyRouteHandlerDeps({}));
Expand All @@ -64,8 +63,6 @@ describe('Console Proxy Route', () => {
describe('contains full url', () => {
it('treats the url as a path', async () => {
await request('GET', 'http://evil.com/test');
// const res = opensearchClient.asCurrentUser.transport.request.mock.calls;
// console.log(res);
const [[args]] = opensearchClient.asCurrentUser.transport.request.mock.calls;

expect(args.path).toBe('/http://evil.com/test?pretty=true');
Expand Down
13 changes: 10 additions & 3 deletions src/plugins/dev_tools/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function DevToolsWrapper({

return (
<main className="devApp">
<div className="tabNav">
<div>
<EuiFlexGroup gutterSize="none">
<EuiFlexItem>
<EuiTabs>
Expand All @@ -178,8 +178,15 @@ function DevToolsWrapper({
{dataSourceEnabled ? (
<EuiFlexItem grow={false} className="dataSourceSelector">
<EuiComboBox
aria-label="Select a Data Source"
placeholder="Select a Data Source"
aria-label={i18n.translate('devTool.devToolWrapper.DataSourceComboBoxAriaLabel', {
defaultMessage: 'Select a Data Source',
})}
placeholder={i18n.translate(
'devTool.devToolWrapper.DataSourceComboBoxPlaceholder',
{
defaultMessage: 'Select a Data Source',
}
)}
singleSelection={{ asPlainText: true }}
options={dataSources}
selectedOptions={selectedOptions}
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/dev_tools/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
flex-grow: 1;
}

.tabNav {
flex-grow: 0;
}

.dataSourceSelector {
margin: 5px 10px 5px 5px;
min-width: 400px;
Expand Down

0 comments on commit f059d32

Please sign in to comment.