"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "83e6a4b935208d764df2ff4abd9e1344a870d46d"
Unverified Commit cfda8c36 authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

[webui] word format (such as Experiment summary, Log files) (#2737)


Co-authored-by: default avatarLijiao <15910218274@163.com>
parent d6186284
...@@ -106,7 +106,7 @@ class ExperimentDrawer extends React.Component<ExpDrawerProps, ExpDrawerState> { ...@@ -106,7 +106,7 @@ class ExperimentDrawer extends React.Component<ExpDrawerProps, ExpDrawerState> {
styles={{ root: { height: expDrawerHeight, paddingTop: 15 } }} styles={{ root: { height: expDrawerHeight, paddingTop: 15 } }}
> >
<Pivot style={{ minHeight: 190 }} className="log-tab-body"> <Pivot style={{ minHeight: 190 }} className="log-tab-body">
<PivotItem headerText="Experiment Parameters"> <PivotItem headerText="Experiment parameters">
<div className="just-for-log"> <div className="just-for-log">
<MonacoEditor <MonacoEditor
width="100%" width="100%"
......
...@@ -51,7 +51,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> { ...@@ -51,7 +51,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
dispatcherHTML = (): React.ReactNode => { dispatcherHTML = (): React.ReactNode => {
return ( return (
<div> <div>
<span>Dispatcher Log</span> <span>Dispatcher log</span>
<span className="refresh" onClick={this.manualRefresh}> <span className="refresh" onClick={this.manualRefresh}>
{infoIcon} {infoIcon}
</span> </span>
...@@ -62,7 +62,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> { ...@@ -62,7 +62,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
nnimanagerHTML = (): React.ReactNode => { nnimanagerHTML = (): React.ReactNode => {
return ( return (
<div> <div>
<span>NNImanager Log</span> <span>NNImanager log</span>
<span className="refresh" onClick={this.manualRefresh}>{infoIcon}</span> <span className="refresh" onClick={this.manualRefresh}>{infoIcon}</span>
</div> </div>
); );
...@@ -99,7 +99,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> { ...@@ -99,7 +99,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
style={{ minHeight: 190, paddingTop: '16px' }} style={{ minHeight: 190, paddingTop: '16px' }}
> >
{/* <PivotItem headerText={this.dispatcherHTML()} key="dispatcher" onLinkClick> */} {/* <PivotItem headerText={this.dispatcherHTML()} key="dispatcher" onLinkClick> */}
<PivotItem headerText="Dispatcher Log" key="dispatcher"> <PivotItem headerText="Dispatcher log" key="dispatcher">
<MonacoHTML <MonacoHTML
content={dispatcherLogStr || 'Loading...'} content={dispatcherLogStr || 'Loading...'}
loading={isLoading} loading={isLoading}
...@@ -115,7 +115,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> { ...@@ -115,7 +115,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
</StackItem> </StackItem>
</Stack> </Stack>
</PivotItem> </PivotItem>
<PivotItem headerText="NNIManager Log" key="nnimanager"> <PivotItem headerText="NNIManager log" key="nnimanager">
{/* <TabPane tab="NNImanager Log" key="nnimanager"> */} {/* <TabPane tab="NNImanager Log" key="nnimanager"> */}
<MonacoHTML <MonacoHTML
content={nniManagerLogStr || 'Loading...'} content={nniManagerLogStr || 'Loading...'}
......
...@@ -189,13 +189,13 @@ class NavCon extends React.Component<NavProps, NavState> { ...@@ -189,13 +189,13 @@ class NavCon extends React.Component<NavProps, NavState> {
items: [ items: [
{ {
key: 'experiment', key: 'experiment',
text: 'Experiment Summary', text: 'Experiment summary',
iconProps: { iconName: 'ShowResults' }, iconProps: { iconName: 'ShowResults' },
onClick: this.showExpcontent onClick: this.showExpcontent
}, },
{ {
key: 'logfiles', key: 'logfiles',
text: 'Logfiles', text: 'Log files',
iconProps: { iconName: 'FilePDB' }, iconProps: { iconName: 'FilePDB' },
onClick: this.showDispatcherLog onClick: this.showDispatcherLog
} }
......
...@@ -128,13 +128,13 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -128,13 +128,13 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
className="title" className="title"
onClick={this.clickMaxTop} onClick={this.clickMaxTop}
> >
<Title1 text="Top Maximal trials" icon="max.png" fontColor={titleMaxbgcolor} /> <Title1 text="Top maximal trials" icon="max.png" fontColor={titleMaxbgcolor} />
</div> </div>
<div <div
className="title minTitle" className="title minTitle"
onClick={this.clickMinTop} onClick={this.clickMinTop}
> >
<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: 52, top: 6}}>
<Dropdown <Dropdown
......
...@@ -40,7 +40,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -40,7 +40,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
this.state = { this.state = {
tablePageSize: 20, tablePageSize: 20,
whichChart: 'Default metric', whichChart: 'Default metric',
searchType: 'Id', searchType: 'id',
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-function-return-type // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-function-return-type
searchFilter: trial => true searchFilter: trial => true
}; };
...@@ -56,16 +56,16 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -56,16 +56,16 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
return; return;
} }
switch (this.state.searchType) { switch (this.state.searchType) {
case 'Id': case 'id':
filter = (trial): boolean => trial.info.id.toUpperCase().includes(targetValue.toUpperCase()); filter = (trial): boolean => trial.info.id.toUpperCase().includes(targetValue.toUpperCase());
break; break;
case 'Trial No.': case 'Trial No.':
filter = (trial): boolean => trial.info.sequenceId.toString() === targetValue; filter = (trial): boolean => trial.info.sequenceId.toString() === targetValue;
break; break;
case 'Status': case 'status':
filter = (trial): boolean => trial.info.status.toUpperCase().includes(targetValue.toUpperCase()); filter = (trial): boolean => trial.info.status.toUpperCase().includes(targetValue.toUpperCase());
break; break;
case 'Parameters': case 'parameters':
// TODO: support filters like `x: 2` (instead of `"x": 2`) // TODO: support filters like `x: 2` (instead of `"x": 2`)
filter = (trial): boolean => JSON.stringify(trial.info.hyperParameters, null, 4).includes(targetValue); filter = (trial): boolean => JSON.stringify(trial.info.hyperParameters, null, 4).includes(targetValue);
break; break;
...@@ -91,7 +91,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -91,7 +91,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
if (this.searchInput !== null) { if (this.searchInput !== null) {
this.searchInput.value = ''; this.searchInput.value = '';
} }
this.setState(() => ({ searchType: item.text })); this.setState(() => ({ searchType: item.key.toString() }));
} }
} }
...@@ -101,10 +101,10 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -101,10 +101,10 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
const source = TRIALS.filter(this.state.searchFilter); const source = TRIALS.filter(this.state.searchFilter);
const trialIds = TRIALS.filter(this.state.searchFilter).map(trial => trial.id); const trialIds = TRIALS.filter(this.state.searchFilter).map(trial => trial.id);
const searchOptions = [ const searchOptions = [
{ key: 'Id', text: 'Id' }, { key: 'id', text: 'Id' },
{ key: 'Trial No.', text: 'Trial No.' }, { key: 'Trial No.', text: 'Trial No.' },
{ key: 'Status', text: 'Status' }, { key: 'status', text: 'Status' },
{ key: 'Parameters', text: 'Parameters' }, { key: 'parameters', text: 'Parameters' },
]; ];
return ( return (
<div> <div>
......
...@@ -196,7 +196,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -196,7 +196,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
StartTimeColumnConfig: any = { StartTimeColumnConfig: any = {
name: 'Start Time', name: 'Start time',
key: 'startTime', key: 'startTime',
fieldName: 'startTime', fieldName: 'startTime',
minWidth: 150, minWidth: 150,
...@@ -210,7 +210,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -210,7 +210,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
}; };
EndTimeColumnConfig: any = { EndTimeColumnConfig: any = {
name: 'End Time', name: 'End time',
key: 'endTime', key: 'endTime',
fieldName: 'endTime', fieldName: 'endTime',
minWidth: 200, minWidth: 200,
...@@ -465,10 +465,10 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -465,10 +465,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
case 'ID': case 'ID':
showColumn.push(this.IdColumnConfig); showColumn.push(this.IdColumnConfig);
break; break;
case 'Start Time': case 'Start time':
showColumn.push(this.StartTimeColumnConfig); showColumn.push(this.StartTimeColumnConfig);
break; break;
case 'End Time': case 'End time':
showColumn.push(this.EndTimeColumnConfig); showColumn.push(this.EndTimeColumnConfig);
break; break;
case 'Duration': case 'Duration':
......
...@@ -34,7 +34,7 @@ const OPERATION = 'Operation'; ...@@ -34,7 +34,7 @@ const OPERATION = 'Operation';
// defatult selected column // defatult selected column
const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', OPERATION]; const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', OPERATION];
// all choice column !dictory final // all choice column !dictory final
const COLUMNPro = ['Trial No.', 'ID', 'Start Time', 'End Time', 'Duration', 'Status', const COLUMNPro = ['Trial No.', 'ID', 'Start time', 'End time', 'Duration', 'Status',
'Intermediate result', 'Default', OPERATION]; 'Intermediate result', 'Default', OPERATION];
const CONCURRENCYTOOLTIP = 'Trial concurrency is the number of trials running concurrently.'; const CONCURRENCYTOOLTIP = 'Trial concurrency is the number of trials running concurrently.';
const SUPPORTED_SEARCH_SPACE_TYPE = [ const SUPPORTED_SEARCH_SPACE_TYPE = [
......
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