From 33feb6e95d91dfcf996b3070f540b0d6b07db4fb Mon Sep 17 00:00:00 2001 From: Lijiao <35484733+lvybriage@users.noreply.github.com> Date: Tue, 20 Aug 2019 12:10:11 +0800 Subject: [PATCH] fix bug of detail page broken when succeeded trial without final result (#1472) * Update filter description and fix typo * fix comments * change node to result * Add SupportTrainingService.md (#1401) * fix nnictl schema * Eject from react-scripts-ts-antd and bump webui dependencies version (#1412) * Eject from react-scripts-ts-antd * test whether it can pass CI without ugilfy * temporarily disable uglify * Try to fix security alert (#1429) * fix bug of detail page broken when trial is succeed but not report final result --- src/webui/src/components/trial-detail/DefaultMetricPoint.tsx | 4 +++- src/webui/src/static/style/table.scss | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/webui/src/components/trial-detail/DefaultMetricPoint.tsx b/src/webui/src/components/trial-detail/DefaultMetricPoint.tsx index 24131da030..966df304ef 100644 --- a/src/webui/src/components/trial-detail/DefaultMetricPoint.tsx +++ b/src/webui/src/components/trial-detail/DefaultMetricPoint.tsx @@ -85,7 +85,9 @@ class DefaultPoint extends React.Component }); // deal with best metric line const bestCurve: Array[] = []; // best curve data source - bestCurve.push([lineListDefault[0][0], lineListDefault[0][1], accSource[0].searchSpace]); + if (lineListDefault[0] !== undefined) { + bestCurve.push([lineListDefault[0][0], lineListDefault[0][1], accSource[0].searchSpace]); + } if (optimize === 'maximize') { for (let i = 1; i < lineListDefault.length; i++) { const val = lineListDefault[i][1]; diff --git a/src/webui/src/static/style/table.scss b/src/webui/src/static/style/table.scss index 6185ed4859..d16bb2a8be 100644 --- a/src/webui/src/static/style/table.scss +++ b/src/webui/src/static/style/table.scss @@ -115,6 +115,7 @@ } #detail-button{ + margin: 2px 0; .common-style, .common-style:visited, .common-style:focus{ height: 26px; border: none; @@ -131,7 +132,7 @@ .common-style:disabled{ background-color: #f4f4f4; } - .special, .special:visited, .special:focus{ + .special, .special:visited, .special:focus, .special button{ height: 26px; border: none; border-radius: 0; @@ -146,7 +147,7 @@ background-color: #c8c8c8; outline: 0; } - .special:disabled{ + .special:disabled, .special button:disabled{ background-color: #f4f4f4; color: #d9d9d9; }