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

Update WebUI #295

Merged
merged 1 commit into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions src/webui/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
const tsImportPluginFactory = require('ts-import-plugin')
const { getLoader } = require("react-app-rewired");

module.exports = function override(config, env) {
const tsLoader = getLoader(
config.module.rules,
rule =>
rule.loader &&
typeof rule.loader === 'string' &&
rule.loader.includes('ts-loader')
);

tsLoader.options = {
getCustomTransformers: () => ({
before: [ tsImportPluginFactory({
libraryName: 'antd',
libraryDirectory: 'es',
style: 'css',
}) ]
})
};

return config;
}
};
3 changes: 3 additions & 0 deletions src/webui/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module '*.svg'
declare module '*.png'
declare module '*.jpg'
193 changes: 0 additions & 193 deletions src/webui/package-lock.json

This file was deleted.

22 changes: 11 additions & 11 deletions src/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
"echarts": "^4.1.0",
"echarts-for-react": "^2.0.14",
"react": "^16.4.2",
"react-app-rewired": "^1.5.2",
"react-dom": "^16.4.2",
"react-json-tree": "^0.11.0",
"react-router": "3.2.1"
"react-router": "3.2.1",
"react-scripts-ts-antd": "2.17.0"
},
"scripts": {
"start": "react-app-rewired start --scripts-version react-scripts-ts",
"build": "react-app-rewired build --scripts-version react-scripts-ts",
"test": "react-app-rewired test --env=jsdom --scripts-version react-scripts-ts",
"eject": "react-scripts-ts eject"
"start": "react-scripts-ts-antd start",
"build": "react-scripts-ts-antd build",
"test": "react-scripts-ts-antd test --env=jsdom",
"eject": "react-scripts-ts-antd eject"
},
"devDependencies": {
"@types/jest": "^23.3.5",
"@types/node": "^10.7.0",
"@types/react-router": "3.0.15",
"@types/react-json-tree": "^0.6.8",
"@types/react": "^16.4.17",
"@types/react-dom": "^16.0.7",
"react-scripts-ts": "^2.17.0",
"ts-import-plugin": "^1.5.4",
"@types/react-json-tree": "^0.6.8",
"@types/react-router": "3.0.15",
"typescript": "^3.0.1"
}
}
}
Binary file added src/webui/public/favicon.ico
Binary file not shown.
Binary file added src/webui/public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/webui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Neural Network Intelligence</title>
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/icon.png">
</head>

<body>
Expand Down
15 changes: 15 additions & 0 deletions src/webui/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
42 changes: 22 additions & 20 deletions src/webui/src/App.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
.header_title{
width: 100%;
height: 60px;
line-height: 60px;
font-size: 24px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: white;
background-color: rgb(60,141,188) ;
user-select: none;
text-align: center;
.nni{
font-family: 'Segoe';
color: #212121;
font-size: 14px;
}

.header{
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 80px;
background: #0071BC;
border-right: 1px solid #ccc;
z-index: 1000;
}
.header_title img{
height: 60px;
.headerCon{
min-width: 600px
}
.right{
position: absolute;
left: 250px;
top: 50px;
width: calc(100% - 250px);
/* padding-left: 20px; */
/* background: rgb(236,240,245); */
.content{
width: 86%;
min-width: 1024px;
margin: 0 auto;
margin-top: 90px;
margin-bottom: 30px;
}


24 changes: 14 additions & 10 deletions src/webui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import * as React from 'react';
import { Row, Col } from 'antd';
import './App.css';
import SlideBar from './components/SlideBar';

class App extends React.Component<{}, {}> {
render () {
class App extends React.Component<{}, {}> {
render() {
return (
<div className="App">
{/* <header className="header_title"><img src={require('./logo.jpg')} alt=""/></header> */}
<header className="header_title">Neural Network Intelligence</header>
<div className="content">
<SlideBar />
<div className="right">{this.props.children}</div>
</div>
</div>
<Row className="nni">
<Row className="header">
<Col span={2} />
<Col className="headerCon" span={22}>
<SlideBar />
</Col>
</Row>
<Row className="content">
{this.props.children}
</Row>
</Row>
);
}
}
Expand Down
Loading