Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new changes for the sidebar #124

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 66 additions & 20 deletions public/components/Main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui';
import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle, EuiPageSideBar ,EuiSideNav, EuiPanel, EuiPageTemplate, EuiPage, EuiPageContent, EuiPageContentBody, EuiFlexGrid, EuiSplitPanel, EuiComboBox, EuiText, EuiPagination, EuiPopover, EuiFieldSearch} from '@elastic/eui';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you run lint here

import { IHttpResponse } from 'angular';
import _ from 'lodash';
import React from 'react';
import React, { useState } from 'react';
Copy link
Member

@ps48 ps48 Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useState , EuiPageTemplate are unused headers can you please remove them?

import { ChromeBreadcrumb, CoreStart } from '../../../../../src/core/public';
import { MESSAGE_TAB_LABEL } from '../../utils/constants';
import {
Expand Down Expand Up @@ -683,27 +683,70 @@ export class Main extends React.Component<MainProps, MainState> {
</div>
);
}
// const [isClearable, setIsClearable] = useState(true);

// const [value, setValue] = useState('');
// const onChange = (e) => {
// setValue(e.target.value);
// };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please remove the commented code


const button = (
<EuiButton
iconType="arrowDown"
iconSide="right"
>
Create
</EuiButton>
);


return (
<div>
<div className="sql-console-query-container">
<div className="query-language-switch">
<EuiFlexGroup alignItems="center">
<>
<EuiPage paddingSize='none'>
<EuiPanel className={`col-md-3`}>
<EuiPageSideBar >
<EuiFlexGroup direction="column">
<EuiFlexItem>
<EuiTitle size="l">
<h1>Query Workbench</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<Switch onChange={this.onChange} language={this.state.language} />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton href={link} target="_blank" iconType="popout" iconSide="right">
{linkTitle}
</EuiButton>
<EuiText>
Data Connection
</EuiText>
<EuiComboBox
placeholder='Connection Name'
fullWidth
/>
<EuiSpacer/>
</EuiFlexItem>
<EuiFlexItem grow={1}>
<EuiPopover
button={button}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldSearch
placeholder="Search this"
/>
</EuiFlexItem>
<EuiSpacer/>
</EuiFlexGroup>
</div>
</EuiPageSideBar>
</EuiPanel>
<EuiPageContent>
<EuiPageContentBody>
<EuiFlexGroup>
<EuiFlexItem>
<EuiTitle size="l">
<h1>Query</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<Switch onChange={this.onChange} language={this.state.language} />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton href={link} target="_blank" iconType="popout" iconSide="right">
{linkTitle}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="l" />
<div>{page}</div>

Expand Down Expand Up @@ -746,8 +789,11 @@ export class Main extends React.Component<MainProps, MainState> {
setIsResultFullScreen={this.setIsResultFullScreen}
/>
</div>
</div>
</div>
</EuiPageContentBody>
</EuiPageContent>
</EuiPage>
</>

);
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const WorkbenchApp = ({ basename, notifications, http, navigation, chrome
<Router basename={'/' + basename}>
<I18nProvider>
<div>
<EuiPage>
<EuiPage paddingSize='none'>
<EuiPageBody>
<Route
path="/"
Expand Down
Loading