diff --git a/src/webui/src/components/Modals/Compare.tsx b/src/webui/src/components/Modals/Compare.tsx index ac73f860bc..44f7afd0fb 100644 --- a/src/webui/src/components/Modals/Compare.tsx +++ b/src/webui/src/components/Modals/Compare.tsx @@ -1,11 +1,17 @@ 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 IntermediateVal from '../public-child/IntermediateVal'; import { TRIALS } from '../../static/datamodel'; +import { TableRecord, Intermedia, TooltipForIntermediate } from '../../static/interface'; import { contentStyles, iconButtonStyles } from '../Buttons/ModalTheme'; 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 interface CompareProps { @@ -79,7 +85,8 @@ class Compare extends React.Component { containLabel: true }, legend: { - data: idsList + // more than 10 trials will hide legend + data: idsList.length > 10 ? null : idsList }, xAxis: { type: 'category', @@ -209,6 +216,8 @@ class Compare extends React.Component { isOpen={true} containerClassName={contentStyles.container} className="compare-modal" + allowTouchBodyScroll={true} + dragOptions={dragOptions} >
diff --git a/src/webui/src/components/Overview.tsx b/src/webui/src/components/Overview.tsx index 54e5f5ba5c..b2e00efae7 100644 --- a/src/webui/src/components/Overview.tsx +++ b/src/webui/src/components/Overview.tsx @@ -12,6 +12,18 @@ import TrialInfo from './overview/TrialProfile'; import '../static/style/overview.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 { experimentUpdateBroadcast: number; trialsUpdateBroadcast: number; @@ -70,17 +82,6 @@ class Overview extends React.Component { const titleMaxbgcolor = (metricGraphMode === 'max' ? '#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 (
{/* status and experiment block */} @@ -123,7 +124,7 @@ class Overview extends React.Component { - +
{ >
-
+
{ style={{ width: 0.5 * modalIntermediateWidth, height: 0.7 * modalIntermediateHeight, + maxHeight: 534, padding: 20 }} theme="my_theme" diff --git a/src/webui/src/static/function.ts b/src/webui/src/static/function.ts index 485585e224..221d4da0e2 100644 --- a/src/webui/src/static/function.ts +++ b/src/webui/src/static/function.ts @@ -131,7 +131,8 @@ const intermediateGraphOption = (intermediateArr: number[], id: string): any => yAxis: { name: 'Default metric', type: 'value', - data: intermediateArr + data: intermediateArr, + scale: true }, series: [{ symbolSize: 6, diff --git a/src/webui/src/static/style/compare.scss b/src/webui/src/static/style/compare.scss index ba45ccac98..37f70a49c4 100644 --- a/src/webui/src/static/style/compare.scss +++ b/src/webui/src/static/style/compare.scss @@ -1,14 +1,17 @@ .compare-modal{ /* decide modal size */ .ms-Dialog-main{ - max-width: 70%; + width: 50%; + overflow: hidden; } /* compare-md: table style */ &-table{ width: 92%; - table-layout: fixed; margin: 0 auto; + margin-bottom: 20px; + border: 1px solid transparent; + overflow: auto; color: #333; tr{ line-height: 30px; diff --git a/src/webui/src/static/style/overview.scss b/src/webui/src/static/style/overview.scss index f636424fdd..162c878e5c 100644 --- a/src/webui/src/static/style/overview.scss +++ b/src/webui/src/static/style/overview.scss @@ -12,7 +12,7 @@ padding: 15px 20px; height: 100%; min-width: 500px; - overflow-y: scroll; + overflow-y: auto; } .padItem{ diff --git a/src/webui/src/static/style/succTable.scss b/src/webui/src/static/style/succTable.scss index 3e2dbdfa86..05b37035bd 100644 --- a/src/webui/src/static/style/succTable.scss +++ b/src/webui/src/static/style/succTable.scss @@ -1,6 +1,6 @@ #succTable{ height: 404px; - overflow-y: scroll; + overflow: auto; position: relative; .succTable-tooltip{ position: absolute; diff --git a/src/webui/src/static/style/table.scss b/src/webui/src/static/style/table.scss index d8f57dd424..25ca54e3e0 100644 --- a/src/webui/src/static/style/table.scss +++ b/src/webui/src/static/style/table.scss @@ -7,7 +7,7 @@ height: 324px; overflow: hidden; #succeTable .commonTableStyle{ - overflow-y: scroll; + overflow-y: auto; } } @@ -55,5 +55,5 @@ } .columns-height{ max-height: 335px; - overflow-y: scroll; + overflow-y: auto; }