"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "7c4c31cf2c526083731e37a0551177ed195b764c"
Unverified Commit 59b76c2e authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

Some little style (#2762)


Co-authored-by: default avatarLijiao <15910218274@163.com>
parent 995f6259
import * as React from 'react'; import * as React from 'react';
import { Stack, Modal, IconButton } from 'office-ui-fabric-react'; import { Stack, Modal, IconButton, IDragOptions, ContextualMenu } from 'office-ui-fabric-react';
import ReactEcharts from 'echarts-for-react'; import ReactEcharts from 'echarts-for-react';
import IntermediateVal from '../public-child/IntermediateVal'; import IntermediateVal from '../public-child/IntermediateVal';
import { TRIALS } from '../../static/datamodel'; import { TRIALS } from '../../static/datamodel';
import { TableRecord, Intermedia, TooltipForIntermediate } from '../../static/interface';
import { contentStyles, iconButtonStyles } from '../Buttons/ModalTheme'; import { contentStyles, iconButtonStyles } from '../Buttons/ModalTheme';
import '../../static/style/compare.scss'; import '../../static/style/compare.scss';
import { TableRecord, Intermedia, TooltipForIntermediate } from '../../static/interface';
const dragOptions: IDragOptions = {
moveMenuItemText: 'Move',
closeMenuItemText: 'Close',
menu: ContextualMenu
};
// the modal of trial compare // the modal of trial compare
interface CompareProps { interface CompareProps {
...@@ -79,7 +85,8 @@ class Compare extends React.Component<CompareProps, {}> { ...@@ -79,7 +85,8 @@ class Compare extends React.Component<CompareProps, {}> {
containLabel: true containLabel: true
}, },
legend: { legend: {
data: idsList // more than 10 trials will hide legend
data: idsList.length > 10 ? null : idsList
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -209,6 +216,8 @@ class Compare extends React.Component<CompareProps, {}> { ...@@ -209,6 +216,8 @@ class Compare extends React.Component<CompareProps, {}> {
isOpen={true} isOpen={true}
containerClassName={contentStyles.container} containerClassName={contentStyles.container}
className="compare-modal" className="compare-modal"
allowTouchBodyScroll={true}
dragOptions={dragOptions}
> >
<div> <div>
<div className={contentStyles.header}> <div className={contentStyles.header}>
......
...@@ -12,6 +12,18 @@ import TrialInfo from './overview/TrialProfile'; ...@@ -12,6 +12,18 @@ import TrialInfo from './overview/TrialProfile';
import '../static/style/overview.scss'; import '../static/style/overview.scss';
import '../static/style/logPath.scss'; import '../static/style/logPath.scss';
const stackTokens: IStackTokens = {
childrenGap: 30,
};
const entriesOption = [
{ key: '10', text: 'Display top 10 trials' },
{ key: '20', text: 'Display top 20 trials' },
{ key: '30', text: 'Display top 30 trials' },
{ key: '50', text: 'Display top 50 trials' },
{ key: '100', text: 'Display top 100 trials' }
];
interface OverviewProps { interface OverviewProps {
experimentUpdateBroadcast: number; experimentUpdateBroadcast: number;
trialsUpdateBroadcast: number; trialsUpdateBroadcast: number;
...@@ -70,17 +82,6 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -70,17 +82,6 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
const titleMaxbgcolor = (metricGraphMode === 'max' ? '#333' : '#b3b3b3'); const titleMaxbgcolor = (metricGraphMode === 'max' ? '#333' : '#b3b3b3');
const titleMinbgcolor = (metricGraphMode === 'min' ? '#333' : '#b3b3b3'); const titleMinbgcolor = (metricGraphMode === 'min' ? '#333' : '#b3b3b3');
const stackTokens: IStackTokens = {
childrenGap: 30,
};
const entriesOption = [
{ key: '10', text: 'Display top 10 trials' },
{ key: '20', text: 'Display top 20 trials' },
{ key: '30', text: 'Display top 30 trials' },
{ key: '50', text: 'Display top 50 trials' },
{ key: '100', text: 'Display top 100 trials' }
];
return ( return (
<div className="overview"> <div className="overview">
{/* status and experiment block */} {/* status and experiment block */}
...@@ -123,7 +124,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -123,7 +124,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
</Stack> </Stack>
<Stack style={{backgroundColor: '#fff'}}> <Stack style={{backgroundColor: '#fff'}}>
<Stack horizontal className="top10bg" style={{position: 'relative'}}> <Stack horizontal className="top10bg" style={{position: 'relative', height: 42}}>
<div <div
className="title" className="title"
onClick={this.clickMaxTop} onClick={this.clickMaxTop}
...@@ -136,7 +137,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -136,7 +137,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
> >
<Title1 text="Top minimal trials" icon="min.png" fontColor={titleMinbgcolor} /> <Title1 text="Top minimal trials" icon="min.png" fontColor={titleMinbgcolor} />
</div> </div>
<div style={{position: 'absolute', right: 52, top: 6}}> <div style={{position: 'absolute', right: '2%', top: 8}}>
<Dropdown <Dropdown
selectedKey={bestTrialEntries} selectedKey={bestTrialEntries}
options={entriesOption} options={entriesOption}
......
...@@ -723,6 +723,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -723,6 +723,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
style={{ style={{
width: 0.5 * modalIntermediateWidth, width: 0.5 * modalIntermediateWidth,
height: 0.7 * modalIntermediateHeight, height: 0.7 * modalIntermediateHeight,
maxHeight: 534,
padding: 20 padding: 20
}} }}
theme="my_theme" theme="my_theme"
......
...@@ -131,7 +131,8 @@ const intermediateGraphOption = (intermediateArr: number[], id: string): any => ...@@ -131,7 +131,8 @@ const intermediateGraphOption = (intermediateArr: number[], id: string): any =>
yAxis: { yAxis: {
name: 'Default metric', name: 'Default metric',
type: 'value', type: 'value',
data: intermediateArr data: intermediateArr,
scale: true
}, },
series: [{ series: [{
symbolSize: 6, symbolSize: 6,
......
.compare-modal{ .compare-modal{
/* decide modal size */ /* decide modal size */
.ms-Dialog-main{ .ms-Dialog-main{
max-width: 70%; width: 50%;
overflow: hidden;
} }
/* compare-md: table style */ /* compare-md: table style */
&-table{ &-table{
width: 92%; width: 92%;
table-layout: fixed;
margin: 0 auto; margin: 0 auto;
margin-bottom: 20px;
border: 1px solid transparent;
overflow: auto;
color: #333; color: #333;
tr{ tr{
line-height: 30px; line-height: 30px;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
padding: 15px 20px; padding: 15px 20px;
height: 100%; height: 100%;
min-width: 500px; min-width: 500px;
overflow-y: scroll; overflow-y: auto;
} }
.padItem{ .padItem{
......
#succTable{ #succTable{
height: 404px; height: 404px;
overflow-y: scroll; overflow: auto;
position: relative; position: relative;
.succTable-tooltip{ .succTable-tooltip{
position: absolute; position: absolute;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
height: 324px; height: 324px;
overflow: hidden; overflow: hidden;
#succeTable .commonTableStyle{ #succeTable .commonTableStyle{
overflow-y: scroll; overflow-y: auto;
} }
} }
...@@ -55,5 +55,5 @@ ...@@ -55,5 +55,5 @@
} }
.columns-height{ .columns-height{
max-height: 335px; max-height: 335px;
overflow-y: scroll; overflow-y: auto;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment