added scrolling to data loader panes (#7605)

This commit is contained in:
Vadim Ogievetsky 2019-05-07 08:45:20 -07:00 committed by Fangjin Yang
parent dadf6a2f11
commit 9b197b436b
5 changed files with 22 additions and 9 deletions

View File

@ -37,6 +37,8 @@
width: 100%; width: 100%;
resize: none; resize: none;
white-space: pre; white-space: pre;
font-size: 11px;
line-height: 13px;
} }
} }
} }

View File

@ -35,6 +35,10 @@
overflow-y: scroll; overflow-y: scroll;
} }
&.narrow-pad {
padding: $standard-padding 10px;
}
.app-view { .app-view {
position: relative; position: relative;
} }

View File

@ -190,12 +190,12 @@ export class ConsoleApplication extends React.Component<ConsoleApplicationProps,
this.resetInitialsWithDelay(); this.resetInitialsWithDelay();
} }
private wrapInViewContainer = (active: HeaderActiveTab, el: JSX.Element, scrollable = false) => { private wrapInViewContainer = (active: HeaderActiveTab, el: JSX.Element, classType: 'normal' | 'scrollable' | 'narrow-pad' = 'normal') => {
const { hideLegacy } = this.props; const { hideLegacy } = this.props;
return <> return <>
<HeaderBar active={active} hideLegacy={hideLegacy} goToLoadDataView={this.goToLoadDataView}/> <HeaderBar active={active} hideLegacy={hideLegacy} goToLoadDataView={this.goToLoadDataView}/>
<div className={classNames('view-container', { scrollable })}>{el}</div> <div className={classNames('view-container', classType)}>{el}</div>
</>; </>;
} }
@ -205,7 +205,7 @@ export class ConsoleApplication extends React.Component<ConsoleApplicationProps,
} }
private wrappedLoadDataView = () => { private wrappedLoadDataView = () => {
return this.wrapInViewContainer('load-data', <LoadDataView seed={this.loadDataViewSeed} goToTask={this.goToTask}/>); return this.wrapInViewContainer('load-data', <LoadDataView seed={this.loadDataViewSeed} goToTask={this.goToTask}/>, 'narrow-pad');
} }
private wrappedSqlView = () => { private wrappedSqlView = () => {
@ -224,12 +224,12 @@ export class ConsoleApplication extends React.Component<ConsoleApplicationProps,
private wrappedTasksView = () => { private wrappedTasksView = () => {
const { noSqlMode } = this.state; const { noSqlMode } = this.state;
return this.wrapInViewContainer('tasks', <TasksView taskId={this.taskId} goToSql={this.goToSql} goToMiddleManager={this.goToMiddleManager} goToLoadDataView={this.goToLoadDataView} noSqlMode={noSqlMode}/>, true); return this.wrapInViewContainer('tasks', <TasksView taskId={this.taskId} goToSql={this.goToSql} goToMiddleManager={this.goToMiddleManager} goToLoadDataView={this.goToLoadDataView} noSqlMode={noSqlMode}/>, 'scrollable');
} }
private wrappedServersView = () => { private wrappedServersView = () => {
const { noSqlMode } = this.state; const { noSqlMode } = this.state;
return this.wrapInViewContainer('servers', <ServersView middleManager={this.middleManager} goToSql={this.goToSql} goToTask={this.goToTask} noSqlMode={noSqlMode}/>, true); return this.wrapInViewContainer('servers', <ServersView middleManager={this.middleManager} goToSql={this.goToSql} goToTask={this.goToTask} noSqlMode={noSqlMode}/>, 'scrollable');
} }
private wrappedLookupsView = () => { private wrappedLookupsView = () => {

View File

@ -21,9 +21,9 @@ $side-bar-width: 120px;
.table-action-dialog { .table-action-dialog {
&.bp3-dialog { &.bp3-dialog {
position: relative; position: relative;
width: 700px; width: 90vw;
height: 85vh;
top: 5%; top: 5%;
height: 70vh;
&::after { &::after {
content: ""; content: "";

View File

@ -19,7 +19,7 @@
.load-data-view { .load-data-view {
height: 100%; height: 100%;
display: grid; display: grid;
grid-gap: 10px 15px; grid-gap: 10px 5px;
grid-template-columns: 1fr 280px; grid-template-columns: 1fr 280px;
grid-template-rows: 55px 1fr 28px; grid-template-rows: 55px 1fr 28px;
grid-template-areas: grid-template-areas:
@ -60,7 +60,7 @@
&.partition, &.partition,
&.tuning, &.tuning,
&.publish { &.publish {
grid-gap: 20px 50px; grid-gap: 20px 40px;
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
grid-template-areas: grid-template-areas:
"navi navi navi" "navi navi navi"
@ -70,6 +70,8 @@
.main, .main,
.other { .other {
overflow: auto; overflow: auto;
padding: 0 5px;
margin: 0;
} }
} }
@ -77,6 +79,7 @@
grid-area: navi; grid-area: navi;
white-space: nowrap; white-space: nowrap;
overflow: auto; overflow: auto;
padding: 0 5px;
.stage-section { .stage-section {
display: inline-block; display: inline-block;
@ -98,6 +101,7 @@
.main { .main {
grid-area: main; grid-area: main;
position: relative; position: relative;
margin: 0 5px;
.raw-lines { .raw-lines {
position: absolute; position: absolute;
@ -212,6 +216,8 @@
.control { .control {
grid-area: ctrl; grid-area: ctrl;
overflow: auto;
padding: 0 5px;
.intro { .intro {
margin-bottom: 15px; margin-bottom: 15px;
@ -225,6 +231,7 @@
.next-bar { .next-bar {
grid-area: next; grid-area: next;
text-align: right; text-align: right;
padding: 0 5px;
.prev { .prev {
float: left; float: left;