Commit db973f94 authored by Lijiao's avatar Lijiao Committed by chicm-ms
Browse files

[WebUI] Fix bug (#591)

* fix bug

* fix bug of background

* update

* update

* add frameworkcontroller platform
parent e209869c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
font-family: 'Segoe'; font-family: 'Segoe';
color: #212121; color: #212121;
font-size: 14px; font-size: 14px;
background: #f2f2f2;
} }
.header{ .header{
...@@ -19,7 +20,6 @@ ...@@ -19,7 +20,6 @@
} }
.contentBox{ .contentBox{
width: 100%; width: 100%;
background: #f2f2f2;
} }
.content{ .content{
width: 86%; width: 86%;
......
import * as React from 'react'; import * as React from 'react';
import { Row, Button } from 'antd'; import { Row } from 'antd';
import { DOWNLOAD_IP } from '../../static/const'; import { DOWNLOAD_IP } from '../../static/const';
interface PaiTrialChildProps { interface PaiTrialChildProps {
...@@ -17,7 +17,7 @@ class PaiTrialChild extends React.Component<PaiTrialChildProps, {}> { ...@@ -17,7 +17,7 @@ class PaiTrialChild extends React.Component<PaiTrialChildProps, {}> {
} }
render() { render() {
const { logString, id, showLogModal, isdisLogbtn } = this.props; const { logString, id } = this.props;
return ( return (
<div> <div>
{ {
...@@ -35,16 +35,6 @@ class PaiTrialChild extends React.Component<PaiTrialChildProps, {}> { ...@@ -35,16 +35,6 @@ class PaiTrialChild extends React.Component<PaiTrialChildProps, {}> {
trial stdout trial stdout
</a> </a>
</Row> </Row>
<Row>
<Button
disabled={isdisLogbtn}
type="primary"
className="tableButton"
onClick={showLogModal.bind(this, id)}
>
View
</Button>
</Row>
</Row> </Row>
} }
</div> </div>
......
import * as React from 'react'; import * as React from 'react';
import { Row, Button } from 'antd'; import { Row } from 'antd';
import { DOWNLOAD_IP } from '../../static/const'; import { DOWNLOAD_IP } from '../../static/const';
import PaiTrialChild from './PaiTrialChild'; import PaiTrialChild from './PaiTrialChild';
...@@ -44,16 +44,6 @@ class PaitrialLog extends React.Component<PaitrialLogProps, {}> { ...@@ -44,16 +44,6 @@ class PaitrialLog extends React.Component<PaitrialLogProps, {}> {
</a> </a>
<a target="_blank" href={logStr.split(',')[1]}>hdfsLog</a> <a target="_blank" href={logStr.split(',')[1]}>hdfsLog</a>
</Row> </Row>
<Row>
<Button
disabled={isdisLogbutton}
type="primary"
className="tableButton"
onClick={showLogModal.bind(this, id)}
>
View
</Button>
</Row>
</Row> </Row>
: :
<PaiTrialChild <PaiTrialChild
......
...@@ -201,7 +201,8 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState> ...@@ -201,7 +201,8 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
</TabPane> </TabPane>
<TabPane tab="Log" key="2"> <TabPane tab="Log" key="2">
{ {
trainingPlatform === 'pai' || trainingPlatform === 'kubeflow' trainingPlatform === 'frameworkcontroller' || trainingPlatform === 'kubeflow' ||
trainingPlatform === 'pai'
? ?
<PaiTrialLog <PaiTrialLog
logStr={logPathRow} logStr={logPathRow}
......
...@@ -241,10 +241,10 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -241,10 +241,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
const wantResult: Array<string> = []; const wantResult: Array<string> = [];
Object.keys(checkedValues).map(m => { Object.keys(checkedValues).map(m => {
switch (checkedValues[m]) { switch (checkedValues[m]) {
case 'Trial No': case 'Trial No.':
case 'id': case 'Id':
case 'duration': case 'Duration':
case 'status': case 'Status':
case 'Operation': case 'Operation':
case 'Default': case 'Default':
case 'Intermediate Result': case 'Intermediate Result':
...@@ -327,7 +327,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -327,7 +327,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
Object.keys(columnSelected).map(key => { Object.keys(columnSelected).map(key => {
const item = columnSelected[key]; const item = columnSelected[key];
switch (item) { switch (item) {
case 'Trial No': case 'Trial No.':
showColumn.push({ showColumn.push({
title: 'Trial No.', title: 'Trial No.',
dataIndex: 'sequenceId', dataIndex: 'sequenceId',
...@@ -339,7 +339,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -339,7 +339,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
(a.sequenceId as number) - (b.sequenceId as number) (a.sequenceId as number) - (b.sequenceId as number)
}); });
break; break;
case 'id': case 'Id':
showColumn.push({ showColumn.push({
title: 'Id', title: 'Id',
dataIndex: 'id', dataIndex: 'id',
...@@ -355,7 +355,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -355,7 +355,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
} }
}); });
break; break;
case 'duration': case 'Duration':
showColumn.push({ showColumn.push({
title: 'Duration', title: 'Duration',
dataIndex: 'duration', dataIndex: 'duration',
...@@ -376,7 +376,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -376,7 +376,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
}, },
}); });
break; break;
case 'status': case 'Status':
showColumn.push({ showColumn.push({
title: 'Status', title: 'Status',
dataIndex: 'status', dataIndex: 'status',
...@@ -559,7 +559,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -559,7 +559,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
</TabPane> </TabPane>
<TabPane tab="Log" key="2"> <TabPane tab="Log" key="2">
{ {
platform === 'pai' || platform === 'kubeflow' platform === 'pai' || platform === 'kubeflow' || platform === 'frameworkcontroller'
? ?
<PaiTrialLog <PaiTrialLog
logStr={logPathRow} logStr={logPathRow}
......
...@@ -21,19 +21,19 @@ const MONACO = { ...@@ -21,19 +21,19 @@ const MONACO = {
}; };
const COLUMN_INDEX = [ const COLUMN_INDEX = [
{ {
name: 'Trial No', name: 'Trial No.',
index: 1 index: 1
}, },
{ {
name: 'id', name: 'Id',
index: 2 index: 2
}, },
{ {
name: 'duration', name: 'Duration',
index: 3 index: 3
}, },
{ {
name: 'status', name: 'Status',
index: 4 index: 4
}, },
{ {
...@@ -49,7 +49,7 @@ const COLUMN_INDEX = [ ...@@ -49,7 +49,7 @@ const COLUMN_INDEX = [
index: 10001 index: 10001
} }
]; ];
const COLUMN = ['Trial No', 'id', 'duration', 'status', 'Default', 'Operation', 'Intermediate Result']; const COLUMN = ['Trial No.', 'Id', 'Duration', 'Status', 'Default', 'Operation', 'Intermediate Result'];
export { export {
MANAGER_IP, DOWNLOAD_IP, trialJobStatus, MANAGER_IP, DOWNLOAD_IP, trialJobStatus,
CONTROLTYPE, MONACO, COLUMN, COLUMN_INDEX CONTROLTYPE, MONACO, COLUMN, COLUMN_INDEX
......
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