Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Overview concurrency tooltip (#2333)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lijiaoa authored Apr 20, 2020
1 parent bcb53a7 commit 8c8220e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
14 changes: 10 additions & 4 deletions src/webui/src/components/overview/Progress.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import * as React from 'react';
import { Stack, Callout, Link, IconButton, FontWeights, mergeStyleSets, getId, getTheme, StackItem } from 'office-ui-fabric-react';
import {
Stack, Callout, Link, IconButton, FontWeights, mergeStyleSets,
getId, getTheme, StackItem, TooltipHost
} from 'office-ui-fabric-react';
import axios from 'axios';
import { MANAGER_IP } from '../../static/const';
import { MANAGER_IP, CONCURRENCYTOOLTIP } from '../../static/const';
import { EXPERIMENT, TRIALS } from '../../static/datamodel';
import { convertTime } from '../../static/function';
import ConcurrencyInput from './NumInput';
import ProgressBar from './ProgressItem';
import LogDrawer from '../Modals/LogDrawer';
import MessageInfo from '../Modals/MessageInfo';
import { infoIcon } from "../Buttons/Icon";
import '../../static/style/progress.scss';
import '../../static/style/probar.scss';
interface ProgressProps {
Expand Down Expand Up @@ -97,7 +101,7 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
hideSucceedInfo = (): void => {
this.setState(() => ({ isShowSucceedInfo: false }));
}

/**
* info: message content
* typeInfo: message type: success | error...
Expand Down Expand Up @@ -264,7 +268,9 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
</span>
<span style={itemStyles}>
{/* modify concurrency */}
<p>Concurrency</p>
<TooltipHost content={CONCURRENCYTOOLTIP}>
<p className="cursor">Concurrency<span className="progress-info">{infoIcon}</span></p>
</TooltipHost>
<ConcurrencyInput value={this.props.concurrency} updateValue={this.editTrialConcurrency} />
</span>
<span style={itemStyles} className="basic colorOfbasic"></span>
Expand Down
4 changes: 3 additions & 1 deletion src/webui/src/static/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', OPERATION];
// all choice column !dictory final
const COLUMNPro = ['Trial No.', 'ID', 'Start Time', 'End Time', 'Duration', 'Status',
'Intermediate result', 'Default', OPERATION];
const CONCURRENCYTOOLTIP = 'Trial concurrency is the number of trials running concurrently.';

export {
MANAGER_IP, DOWNLOAD_IP, trialJobStatus, COLUMNPro, WEBUIDOC,
CONTROLTYPE, MONACO, COLUMN, DRAWEROPTION, OPERATION,
METRIC_GROUP_UPDATE_THRESHOLD, METRIC_GROUP_UPDATE_SIZE,
METRIC_GROUP_UPDATE_THRESHOLD, METRIC_GROUP_UPDATE_SIZE, CONCURRENCYTOOLTIP
};
10 changes: 10 additions & 0 deletions src/webui/src/static/style/progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
margin-left: 6px;
}
}

&-info{
margin-left: 4px;
position: relative;
top: 2px;
}
}

/* basic experiment message style */
Expand Down Expand Up @@ -101,3 +107,7 @@
border: 2px solid #e6e6e6;
border-radius: 0 12px 12px 0 !important;
}

.cursor, .cursor:hover{
cursor: pointer;
}
2 changes: 1 addition & 1 deletion src/webui/src/static/style/tableStatus.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
color: #EB0716;
}
.WAITING{
color: #008B8B;
color: #FDC401;
}
.EARLY_STOPPED{
color: #FFA500;
Expand Down

0 comments on commit 8c8220e

Please sign in to comment.