diff --git a/src/webui/src/components/Modal/ExperimentDrawer.tsx b/src/webui/src/components/Modal/ExperimentDrawer.tsx index f5fa789889..2fbc4e7f31 100644 --- a/src/webui/src/components/Modal/ExperimentDrawer.tsx +++ b/src/webui/src/components/Modal/ExperimentDrawer.tsx @@ -103,7 +103,7 @@ class ExperimentDrawer extends React.Component { height={heights} >
- +
{ />
- + -
); } @@ -184,6 +212,112 @@ class SlideBar extends React.Component { } } + desktopHTML = () => { + const { version, menuVisible } = this.state; + const feed = `https://github.com/Microsoft/nni/issues/new?labels=${version}`; + return ( + + + {NNILOGO} + {OVERVIEWTABS} + {DETAILTABS} + + + {this.select()} + + + + + Download + { + menuVisible + ? + + : + + } + + + + + + NNI github issue + Feedback + + + Version: {version} + + + ); + } + + tabeltHTML = () => { + return ( + + + + + + + + {NNILOGO} + {OVERVIEWTABS} + {DETAILTABS} + + + {this.select()} + + + ); + } + + mobileHTML = () => { + const { isdisabledFresh } = this.state; + return ( + + + + + + + + + + + NNI + + + + + + NNI logo + + {/* the class interval have other style ! */} + + + + + ); + } // close log drawer (nnimanager.dispatcher) closeLogDrawer = () => { if (this._isMounted === true) { @@ -208,81 +342,15 @@ class SlideBar extends React.Component { } render() { - const { version, menuVisible, isvisibleLogDrawer, activeKey, isvisibleExperimentDrawer } = this.state; - const feed = `https://github.com/Microsoft/nni/issues/new?labels=${version}`; + const mobile = ({this.mobileHTML()}); + const tablet = ({this.tabeltHTML()}); + const desktop = ({this.desktopHTML()}); + const { isvisibleLogDrawer, activeKey, isvisibleExperimentDrawer } = this.state; return ( - - - - - - - - - - - - - - - - - - - - NNI logo - - - - - - {this.select()} - +
+ {mobile} + {tablet} + {desktop} {/* the drawer for dispatcher & nnimanager log message */} { isVisble={isvisibleExperimentDrawer} closeExpDrawer={this.closeExpDrawer} /> - +
); } } -export default SlideBar; \ No newline at end of file +export default Form.create()(SlideBar); \ No newline at end of file diff --git a/src/webui/src/components/overview/Progress.tsx b/src/webui/src/components/overview/Progress.tsx index e3676ff498..fe764e1a03 100644 --- a/src/webui/src/components/overview/Progress.tsx +++ b/src/webui/src/components/overview/Progress.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -import { - Row, Col, Popover, Button, message -} from 'antd'; +import { Row, Col, Popover, Button, message } from 'antd'; import axios from 'axios'; import { MANAGER_IP, CONTROLTYPE } from '../../static/const'; import { Experiment, TrialNumber } from '../../static/interface'; @@ -303,7 +301,7 @@ class Progressed extends React.Component {
); diff --git a/src/webui/src/components/stateless-component/NNItabs.tsx b/src/webui/src/components/stateless-component/NNItabs.tsx new file mode 100644 index 0000000000..6f75213cf4 --- /dev/null +++ b/src/webui/src/components/stateless-component/NNItabs.tsx @@ -0,0 +1,26 @@ +import * as React from 'react'; +import { Link } from 'react-router'; + +const OVERVIEWTABS = ( + + Overview + +); + +const DETAILTABS = ( + + Trials detail + +); + +const NNILOGO = ( + + NNI logo + +); + +export { OVERVIEWTABS, DETAILTABS, NNILOGO }; \ No newline at end of file diff --git a/src/webui/src/index.css b/src/webui/src/index.css index fd089f2bc6..373637d4d4 100644 --- a/src/webui/src/index.css +++ b/src/webui/src/index.css @@ -48,5 +48,4 @@ q:before, q:after { table { border-collapse: collapse; border-spacing: 0; -} - +} \ No newline at end of file diff --git a/src/webui/src/static/style/logDrawer.scss b/src/webui/src/static/style/logDrawer.scss index e50fa352ea..5694ea2cf4 100644 --- a/src/webui/src/static/style/logDrawer.scss +++ b/src/webui/src/static/style/logDrawer.scss @@ -26,7 +26,7 @@ } .buttons{ - margin-top: 15px; + margin-top: 11px; .close{ text-align: right; } diff --git a/src/webui/src/static/style/slideBar.scss b/src/webui/src/static/style/slideBar.scss index c4e00fc2c5..b5a3ab0d8f 100644 --- a/src/webui/src/static/style/slideBar.scss +++ b/src/webui/src/static/style/slideBar.scss @@ -3,54 +3,6 @@ $barHeight: 56px; $drowBgColor: #f2f2f2; /* drowdown and select hover bgcolor */ $drowHoverBgColor: #e2e2e2; -.nav{ - list-style: none; - width: 95%; - height: $barHeight; - margin: 0 auto; - position: relative; - .tab{ - line-height: $barHeight; - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - a{ - font-size: 18px; - color: #b8c7ce; - text-decoration: none; - } - } - .firstTab{ - margin: 0 20px; - } - .logo{ - margin-top: 2px; - max-width: 128px; - } -} - -.tab a:hover, .tab a.high{ - color: white; - border-bottom: 1px solid #fff; -} - -.feedback{ - position: fixed; - right: 26%; - line-height: $barHeight; - font-size: 16px; - color: #fff; - a{ - color: #fff; - text-decoration: none; - margin-left: 10px; - } - img{ - width: 20px; - margin-right: 8px; - } - .version{ - margin-left: 16px; - } -} /* refresh button */ .fresh{ @@ -63,20 +15,25 @@ $drowHoverBgColor: #e2e2e2; color: #fff; } -.link li{ - float: left; -} .dropdown{ - margin-right: 10px; /* make dropdown content box position in blue bar bottom */ padding-bottom: 14px; + .down-icon{ + font-size: 20px !important; + padding-right: 2px; + } } + .interval{ - position: fixed; - right: 6%; - top: 12px; + display: inline-block; font-size: 16px; color: #fff; + .ant-form{ + display: inline-block; + } + form .ant-select{ + width: 166px; + } .ant-select-selection{ background-color: transparent; border: none; @@ -87,10 +44,19 @@ $drowHoverBgColor: #e2e2e2; .ant-select-arrow{ color: #fff; } + + .fresh{ + margin-right: 10px; + } + .ant-btn-ghost{ + padding: 0 10px; + + } .ant-btn-ghost[disabled]{ - background-color: transparent; + background-color: #005b98; color: #fff; } + } /* set select bgcolor */ .ant-select-dropdown-menu{ @@ -126,26 +92,141 @@ $drowHoverBgColor: #e2e2e2; } } +.menu-list{ + position: relative; + top: 13px; +} + -/* nav style*/ -.little{ - width: 90%; - .menu{ - margin-left: 33px; - .more{ +.ant-dropdown{ + .menuModal{ + position: relative; + top: 12px; + } +} +.ant-select-selection-selected-value{ + font-size: 16px; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} +.ant-dropdown-menu-submenu-title{ + font-size: 16px; +} +.ant-dropdown-menu-item:hover, .ant-dropdown-menu-submenu-title:hover{ + background-color: transparent; +} +.nav{ + width: 95%; + height: $barHeight; + margin: 0 auto; + line-height: $barHeight; + + /* mobile start*/ + .left{ + text-align: left; + /* more menu */ + font-size: 18px; + color: #fff; + a, a:visited{ color: #fff; - font-size: 24px; - margin-top: 16px; + text-decoration: none; + } + .more-mobile{ + margin-right: 10%; + font-size: 22px; + position: relative; + top: 1px; } - .more:hover{ + .more-mobile:hover{ cursor: pointer; } } - .logo{ + .center{ + text-align: center; + img{ + height: 38px; + } + } + .right{ text-align: right; + button{ + margin-top: 12px; + } + } + /* mobile end */ + + /* tabelt mode */ + .tabelt-left{ + height: $barHeight; + .tabelt-img img{ + position: relative; + top: -5px; + } + } + .tabelt-right{ + text-align: right; + } + + /* desktop mode */ + .desktop-logo{ + position: relative; + top: -3px; + } + .desktop-right{ + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + text-align: right; + line-height: $barHeight; + font-size: 16px; + color: #fff; + a{ + color: #fff; + text-decoration: none; + } + img{ + width: 20px; + margin-right: 8px; + } + .feedback{ + font-size: 16px; + margin: 0 20px; + } + .version{ + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + font-size: 16px; + } + .margin-icon{ + margin-left: 8px; + } } } -.menuModal{ - width: 198px; +/* public style in nav in threee mode*/ +.more{ + color: #fff; + font-size: 24px; +} +.more:hover{ + cursor: pointer; +} + +/* overview and detail tabs common style */ +a.common-tabs{ + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + font-size: 16px; + color: #b8c7ce; + text-decoration: none; +} +.common-tabs:visited, .high-light:hover{ + color: #fff; + text-decoration: none; +} +.common-tabs:hover, .high-light{ + color: #fff; + border-bottom: 1px solid #fff; +} +.left-right-margin{ + margin-left: 20px; + margin-right: 20px; } +.left-margin{ + margin-left: 20px; +} \ No newline at end of file