Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
ef15fc81
Unverified
Commit
ef15fc81
authored
Jun 21, 2021
by
liuzhe-lz
Committed by
GitHub
Jun 21, 2021
Browse files
Bump node.js version to v16 (#3828)
parent
b2225436
Changes
45
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
3251 additions
and
2807 deletions
+3251
-2807
ts/nni_manager/yarn.lock
ts/nni_manager/yarn.lock
+2939
-2604
ts/webui/.eslintrc
ts/webui/.eslintrc
+12
-2
ts/webui/config/webpack.config.js
ts/webui/config/webpack.config.js
+47
-54
ts/webui/package.json
ts/webui/package.json
+67
-70
ts/webui/prettier.config.js
ts/webui/prettier.config.js
+1
-1
ts/webui/public/loading.gif
ts/webui/public/loading.gif
+0
-0
ts/webui/public/logo.png
ts/webui/public/logo.png
+0
-0
ts/webui/public/logo.svg
ts/webui/public/logo.svg
+0
-0
ts/webui/scripts/build.js
ts/webui/scripts/build.js
+1
-1
ts/webui/scripts/formatWebpackMessages.js
ts/webui/scripts/formatWebpackMessages.js
+130
-0
ts/webui/src/components/managementExp/ExperimentManager.tsx
ts/webui/src/components/managementExp/ExperimentManager.tsx
+2
-8
ts/webui/src/components/managementExp/expFunction.ts
ts/webui/src/components/managementExp/expFunction.ts
+1
-7
ts/webui/src/components/modals/ChangeColumnComponent.tsx
ts/webui/src/components/modals/ChangeColumnComponent.tsx
+5
-5
ts/webui/src/components/modals/CustomizedTrial.tsx
ts/webui/src/components/modals/CustomizedTrial.tsx
+1
-1
ts/webui/src/components/overview/count/EditExperimentParam.tsx
...bui/src/components/overview/count/EditExperimentParam.tsx
+2
-4
ts/webui/src/components/overview/table/SuccessTable.tsx
ts/webui/src/components/overview/table/SuccessTable.tsx
+6
-4
ts/webui/src/components/public-child/OpenRow.tsx
ts/webui/src/components/public-child/OpenRow.tsx
+31
-29
ts/webui/src/components/stateless-component/NNItabs.tsx
ts/webui/src/components/stateless-component/NNItabs.tsx
+1
-1
ts/webui/src/components/trial-detail/Intermediate.tsx
ts/webui/src/components/trial-detail/Intermediate.tsx
+1
-1
ts/webui/src/components/trial-detail/Para.tsx
ts/webui/src/components/trial-detail/Para.tsx
+4
-15
No files found.
ts/nni_manager/yarn.lock
View file @
ef15fc81
This diff is collapsed.
Click to expand it.
ts/webui/.eslintrc
View file @
ef15fc81
...
...
@@ -17,7 +17,6 @@
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier/react",
"prettier"
],
"rules": {
...
...
@@ -29,6 +28,17 @@
"@typescript-eslint/no-use-before-define": [2, "nofunc"],
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-unused-vars": [2, { "argsIgnorePattern": "^_" }],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false,
"object": false,
"Function": false
}
}
],
"arrow-parens": [2, "as-needed"],
"no-inner-declarations": 0,
"no-empty": 2,
...
...
ts/webui/config/webpack.config.js
View file @
ef15fc81
'
use strict
'
;
const
fs
=
require
(
'
fs
'
);
const
isWsl
=
require
(
'
is-wsl
'
);
const
path
=
require
(
'
path
'
);
const
webpack
=
require
(
'
webpack
'
);
const
resolve
=
require
(
'
resolve
'
);
...
...
@@ -11,9 +10,9 @@ const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const
InlineChunkHtmlPlugin
=
require
(
'
react-dev-utils/InlineChunkHtmlPlugin
'
);
const
TerserPlugin
=
require
(
'
terser-webpack-plugin
'
);
const
MiniCssExtractPlugin
=
require
(
'
mini-css-extract-plugin
'
);
const
OptimizeCSSAssets
Plugin
=
require
(
'
optimize-css-assets
-webpack-plugin
'
);
const
safePostCssParser
=
require
(
'
postcss-safe-parser
'
);
const
ManifestPlugin
=
require
(
'
webpack-manifest-plugin
'
);
const
CssMinimizer
Plugin
=
require
(
'
css-minimizer
-webpack-plugin
'
);
//
const safePostCssParser = require('postcss-safe-parser');
const
{
Webpack
ManifestPlugin
}
=
require
(
'
webpack-manifest-plugin
'
);
const
InterpolateHtmlPlugin
=
require
(
'
react-dev-utils/InterpolateHtmlPlugin
'
);
const
WorkboxWebpackPlugin
=
require
(
'
workbox-webpack-plugin
'
);
const
WatchMissingNodeModulesPlugin
=
require
(
'
react-dev-utils/WatchMissingNodeModulesPlugin
'
);
...
...
@@ -94,7 +93,8 @@ module.exports = function(webpackEnv) {
options
:
{
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident
:
'
postcss
'
,
//ident: 'postcss',
postcssOptions
:
{
plugins
:
()
=>
[
require
(
'
postcss-flexbugs-fixes
'
),
require
(
'
postcss-preset-env
'
)({
...
...
@@ -108,6 +108,7 @@ module.exports = function(webpackEnv) {
// which in turn let's users customize the target behavior as per their needs.
postcssNormalize
(),
],
},
sourceMap
:
isEnvProduction
&&
shouldUseSourceMap
,
},
},
...
...
@@ -163,8 +164,6 @@ module.exports = function(webpackEnv) {
filename
:
isEnvProduction
?
'
static/js/[name].[contenthash:8].js
'
:
isEnvDevelopment
&&
'
static/js/bundle.js
'
,
// TODO: remove this when upgrading to webpack 5
futureEmitAssets
:
true
,
// There are also additional JS chunk files if you use code splitting.
chunkFilename
:
isEnvProduction
?
'
static/js/[name].[contenthash:8].chunk.js
'
...
...
@@ -220,19 +219,12 @@ module.exports = function(webpackEnv) {
ascii_only
:
true
,
},
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
// Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser
// https://github.com/webpack-contrib/terser-webpack-plugin/issues/21
parallel
:
!
isWsl
,
// Enable file caching
cache
:
true
,
sourceMap
:
shouldUseSourceMap
,
}),
// This is only used in production mode
new
OptimizeCSSAssetsPlugin
({
cssProcessorOptions
:
{
parser
:
safePostCssParser
,
new
CssMinimizerPlugin
({
minimizerOptions
:
{
processorOptions
:
{
//parser: safePostCssParser,
map
:
shouldUseSourceMap
?
{
// `inline: false` forces the sourcemap to be output into a
...
...
@@ -244,6 +236,7 @@ module.exports = function(webpackEnv) {
}
:
false
,
},
},
}),
],
// Automatically split vendor and commons
...
...
@@ -552,7 +545,7 @@ module.exports = function(webpackEnv) {
// Generate a manifest file which contains a mapping of all asset filenames
// to their corresponding output file so that tools can pick it up without
// having to parse `index.html`.
new
ManifestPlugin
({
new
Webpack
ManifestPlugin
({
fileName
:
'
asset-manifest.json
'
,
publicPath
:
publicPath
,
generate
:
(
seed
,
files
)
=>
{
...
...
@@ -578,9 +571,9 @@ module.exports = function(webpackEnv) {
new
WorkboxWebpackPlugin
.
GenerateSW
({
clientsClaim
:
true
,
exclude
:
[
/
\.
map$/
,
/asset-manifest
\.
json$/
],
importWorkboxFrom
:
'
cdn
'
,
//
importWorkboxFrom: 'cdn',
navigateFallback
:
publicUrl
+
'
/index.html
'
,
navigateFallback
Black
list
:
[
navigateFallback
Deny
list
:
[
// Exclude URLs starting with /_, as they're likely an API call
new
RegExp
(
'
^/_
'
),
// Exclude URLs containing a dot, as they're likely a resource in
...
...
@@ -614,16 +607,16 @@ module.exports = function(webpackEnv) {
].
filter
(
Boolean
),
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node
:
{
module
:
'
empty
'
,
dgram
:
'
empty
'
,
dns
:
'
mock
'
,
fs
:
'
empty
'
,
http2
:
'
empty
'
,
net
:
'
empty
'
,
tls
:
'
empty
'
,
child_process
:
'
empty
'
,
},
//
node: {
//
module: 'empty',
//
dgram: 'empty',
//
dns: 'mock',
//
fs: 'empty',
//
http2: 'empty',
//
net: 'empty',
//
tls: 'empty',
//
child_process: 'empty',
//
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance
:
false
,
...
...
ts/webui/package.json
View file @
ef15fc81
...
...
@@ -4,44 +4,40 @@
"license"
:
"MIT"
,
"dependencies"
:
{
"axios"
:
"^0.21.1"
,
"babel-eslint"
:
"10.0.1"
,
"babel-jest"
:
"24.7.1"
,
"babel-loader"
:
"8.0.5"
,
"babel-jest"
:
"^27.0.2"
,
"babel-loader"
:
"^8.2.2"
,
"babel-plugin-named-asset-import"
:
"^0.3.2"
,
"babel-preset-react-app"
:
"^
8
.0.0"
,
"case-sensitive-paths-webpack-plugin"
:
"2.
2
.0"
,
"babel-preset-react-app"
:
"^
10
.0.0"
,
"case-sensitive-paths-webpack-plugin"
:
"
^
2.
4
.0"
,
"copy-to-clipboard"
:
"^3.0.8"
,
"css-loader"
:
"2.1.1"
,
"d3"
:
"^5.16.0"
,
"dotenv"
:
"6.2.0"
,
"dotenv-expand"
:
"4.2.0"
,
"css-loader"
:
"^5.2.6"
,
"css-minimizer-webpack-plugin"
:
"^3.0.1"
,
"d3"
:
"^6.7.0"
,
"dotenv"
:
"^10.0.0"
,
"dotenv-expand"
:
"^5.1.0"
,
"echarts"
:
"^5.0"
,
"echarts-for-react"
:
"3.0.0"
,
"file-loader"
:
"3.0.1"
,
"fs-extra"
:
"7.0.1"
,
"html-webpack-plugin"
:
"4.0.0-beta.5"
,
"identity-obj-proxy"
:
"3.0.0"
,
"is-wsl"
:
"^1.1.0"
,
"jest"
:
"24.7.1"
,
"jest-environment-jsdom-fourteen"
:
"0.1.0"
,
"jest-resolve"
:
"24.7.1"
,
"jest-watch-typeahead"
:
"0.3.0"
,
"echarts-for-react"
:
"^3.0.0"
,
"file-loader"
:
"^6.2.0"
,
"fs-extra"
:
"^10.0.0"
,
"html-webpack-plugin"
:
"^5.3.1"
,
"jest"
:
"^27.0.4"
,
"jest-environment-jsdom-fourteen"
:
"^1.0.1"
,
"jest-resolve"
:
"^27.0.4"
,
"jest-watch-typeahead"
:
"^0.6.4"
,
"json5"
:
"^2.1.1"
,
"mini-css-extract-plugin"
:
"0.5.0"
,
"monaco-editor"
:
"^0.19.0"
,
"monaco-editor-webpack-plugin"
:
"^1.8.1"
,
"node-sass"
:
"^4.13.0"
,
"optimize-css-assets-webpack-plugin"
:
"5.0.1"
,
"mini-css-extract-plugin"
:
"^1.6.0"
,
"monaco-editor"
:
"^0.25.0"
,
"monaco-editor-webpack-plugin"
:
"^4.0.0"
,
"node-sass"
:
"^6.0.0"
,
"parcoord-es"
:
"^2.2.10"
,
"pnp-webpack-plugin"
:
"1.2.1"
,
"postcss-flexbugs-fixes"
:
"4.1.0"
,
"postcss-loader"
:
"3.0.0"
,
"postcss-normalize"
:
"7.0.1"
,
"postcss-preset-env"
:
"6.6.0"
,
"postcss-safe-parser"
:
"4.0.1"
,
"pnp-webpack-plugin"
:
"^1.6.4"
,
"postcss-flexbugs-fixes"
:
"^5.0.2"
,
"postcss-loader"
:
"^6.1.0"
,
"postcss-normalize"
:
"^10.0.0"
,
"postcss-preset-env"
:
"^6.6.0"
,
"react"
:
"^16.8.6"
,
"react-app-polyfill"
:
"^1.0.0"
,
"react-dev-utils"
:
"^
9
.0.
0
"
,
"react-dev-utils"
:
"^
11
.0.
4
"
,
"react-dom"
:
"^16.8.6"
,
"react-json-tree"
:
"^0.11.2"
,
"react-monaco-editor"
:
"^0.32.1"
,
...
...
@@ -50,46 +46,47 @@
"react-router"
:
"^5.2.0"
,
"react-router-dom"
:
"^5.2.0"
,
"react-table"
:
"^7.0.0-rc.15"
,
"resolve"
:
"1.10.0"
,
"sass-loader"
:
"7.1.0"
,
"semver"
:
"6.0.0"
,
"style-loader"
:
"0.23.1"
,
"terser-webpack-plugin"
:
"1.2.3"
,
"url-loader"
:
"1.1.2"
,
"webpack"
:
"4.29.6"
,
"webpack-dev-server"
:
"3.2.1"
,
"webpack-manifest-plugin"
:
"2.0.4"
,
"workbox-webpack-plugin"
:
"4.2.0"
"resolve"
:
"^1.10.0"
,
"sass-loader"
:
"^12.1.0"
,
"semver"
:
"^7.3.5"
,
"style-loader"
:
"^2.0.0"
,
"url-loader"
:
"^4.1.1"
,
"webpack"
:
"^5.39.0"
,
"webpack-dev-server"
:
"^3.11.2"
,
"webpack-manifest-plugin"
:
"^3.1.1"
,
"workbox-webpack-plugin"
:
"^6.1.5"
},
"devDependencies"
:
{
"@babel/core"
:
"7.4.3"
,
"@babel/core"
:
"^7.14.6"
,
"@babel/eslint-parser"
:
"^7.14.5"
,
"@babel/preset-react"
:
"^7.14.5"
,
"@babel/preset-typescript"
:
"^7.14.5"
,
"@babel/runtime"
:
"^7.14.6"
,
"@fluentui/react"
:
"^7.135.0"
,
"@svgr/webpack"
:
"4.1.0"
,
"@types/d3"
:
"^5.7.2"
,
"@types/jest"
:
"24.0.12"
,
"@types/json5"
:
"^0.0.30"
,
"@types/node"
:
"^10.14.2"
,
"@types/react"
:
"16.8.15"
,
"@types/react-dom"
:
"16.8.4"
,
"@typescript-eslint/eslint-plugin"
:
"^2.11.0"
,
"@typescript-eslint/parser"
:
"^2.11.0"
,
"concurrently"
:
"^5.2.0"
,
"eslint"
:
"^5.16.0"
,
"eslint-config-prettier"
:
"^6.1.0"
,
"eslint-config-react-app"
:
"^4.0.0"
,
"eslint-loader"
:
"2.1.2"
,
"eslint-plugin-flowtype"
:
"2.50.1"
,
"eslint-plugin-import"
:
"2.16.0"
,
"eslint-plugin-jsx-a11y"
:
"6.2.1"
,
"@svgr/webpack"
:
"^5.5.0"
,
"@types/d3"
:
"^6.7.0"
,
"@types/node"
:
"^15.12.2"
,
"@types/react"
:
"^16.8.15"
,
"@types/react-dom"
:
"^16.8.4"
,
"@typescript-eslint/eslint-plugin"
:
"^4.27.0"
,
"@typescript-eslint/parser"
:
"^4.27.0"
,
"concurrently"
:
"^6.2.0"
,
"eslint"
:
"^7.28.0"
,
"eslint-config-prettier"
:
"^8.3.0"
,
"eslint-config-react-app"
:
"^6.0.0"
,
"eslint-loader"
:
"^4.0.2"
,
"eslint-plugin-flowtype"
:
"^5.7.2"
,
"eslint-plugin-import"
:
"^2.23.4"
,
"eslint-plugin-jsx-a11y"
:
"^6.4.1"
,
"eslint-plugin-prettier"
:
"^3.1.0"
,
"eslint-plugin-react"
:
"7.
12.4
"
,
"eslint-plugin-react-hooks"
:
"^
1.5
.0"
,
"eslint-plugin-react"
:
"
^
7.
24.0
"
,
"eslint-plugin-react-hooks"
:
"^
4.2
.0"
,
"express"
:
"^4.17.1"
,
"npx"
:
"^10.2.0"
,
"prettier"
:
"^
1.18.2
"
,
"prettier"
:
"^
2.3.1
"
,
"stylelint"
:
"^13.7.0"
,
"stylelint-config-standard"
:
"^2
0
.0.0"
,
"typescript"
:
"^
3.8.0
"
"stylelint-config-standard"
:
"^2
2
.0.0"
,
"typescript"
:
"^
4.3.2
"
},
"proxy"
:
"http://localhost:12138"
,
"scripts"
:
{
...
...
@@ -109,15 +106,15 @@
],
"babel"
:
{
"presets"
:
[
"react-app"
"@babel/preset-react"
,
"@babel/preset-typescript"
]
},
"resolutions"
:
{
"npm"
:
">=6.14.4"
,
"yargs"
:
"~16.0.3"
,
"acorn"
:
">=8.0.4"
,
"node-forge"
:
">=0.10.0"
,
"y18n"
:
">=5.0.5"
,
"npm"
:
">=7.17.0"
,
"yargs"
:
">=17.0.1"
,
"acorn"
:
">=8.4.0"
,
"y18n"
:
">=5.0.8"
,
"serialize-javascript"
:
">=5.0.1"
},
"jest"
:
{
...
...
ts/webui/prettier.config.js
View file @
ef15fc81
...
...
@@ -8,5 +8,5 @@ module.exports = {
singleQuote
:
true
,
eslintIntegration
:
true
,
jsxSingleQuote
:
true
,
endOf
l
ine
:
'
lf
'
endOf
L
ine
:
process
.
platform
===
'
win32
'
?
'
auto
'
:
'
lf
'
};
ts/webui/
src/static/img
/loading.gif
→
ts/webui/
public
/loading.gif
View file @
ef15fc81
File moved
ts/webui/
src/static/img
/logo.png
→
ts/webui/
public
/logo.png
View file @
ef15fc81
File moved
ts/webui/
sr
c/logo.svg
→
ts/webui/
publi
c/logo.svg
View file @
ef15fc81
File moved
ts/webui/scripts/build.js
View file @
ef15fc81
...
...
@@ -22,7 +22,7 @@ const webpack = require('webpack');
const
configFactory
=
require
(
'
../config/webpack.config
'
);
const
paths
=
require
(
'
../config/paths
'
);
const
checkRequiredFiles
=
require
(
'
react-dev-utils/checkRequiredFiles
'
);
const
formatWebpackMessages
=
require
(
'
react-dev-utils
/formatWebpackMessages
'
);
const
formatWebpackMessages
=
require
(
'
.
/formatWebpackMessages
'
);
const
printHostingInstructions
=
require
(
'
react-dev-utils/printHostingInstructions
'
);
const
FileSizeReporter
=
require
(
'
react-dev-utils/FileSizeReporter
'
);
const
printBuildError
=
require
(
'
react-dev-utils/printBuildError
'
);
...
...
ts/webui/scripts/formatWebpackMessages.js
0 → 100644
View file @
ef15fc81
// FIXME: This file is copied from react-dev-utils master branch. Waiting for its next release.
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'
use strict
'
;
const
friendlySyntaxErrorLabel
=
'
Syntax error:
'
;
function
isLikelyASyntaxError
(
message
)
{
return
message
.
indexOf
(
friendlySyntaxErrorLabel
)
!==
-
1
;
}
// Cleans up webpack error messages.
function
formatMessage
(
message
)
{
let
lines
=
[];
if
(
typeof
message
===
'
string
'
)
{
lines
=
message
.
split
(
'
\n
'
);
}
else
if
(
'
message
'
in
message
)
{
lines
=
message
[
'
message
'
].
split
(
'
\n
'
);
}
else
if
(
Array
.
isArray
(
message
))
{
message
.
forEach
(
message
=>
{
if
(
'
message
'
in
message
)
{
lines
=
message
[
'
message
'
].
split
(
'
\n
'
);
}
});
}
// Strip webpack-added headers off errors/warnings
// https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
lines
=
lines
.
filter
(
line
=>
!
/Module
[
A-z
]
+
\(
from/
.
test
(
line
));
// Transform parsing error into syntax error
// TODO: move this to our ESLint formatter?
lines
=
lines
.
map
(
line
=>
{
const
parsingError
=
/Line
(\d
+
)
:
(?:(\d
+
)
:
)?\s
*Parsing error:
(
.+
)
$/
.
exec
(
line
);
if
(
!
parsingError
)
{
return
line
;
}
const
[,
errorLine
,
errorColumn
,
errorMessage
]
=
parsingError
;
return
`
${
friendlySyntaxErrorLabel
}
${
errorMessage
}
(
${
errorLine
}
:
${
errorColumn
}
)`
;
});
message
=
lines
.
join
(
'
\n
'
);
// Smoosh syntax errors (commonly found in CSS)
message
=
message
.
replace
(
/SyntaxError
\s
+
\((\d
+
)
:
(\d
+
)\)\s
*
(
.+
?)\n
/g
,
`
${
friendlySyntaxErrorLabel
}
$3 ($1:$2)\n`
);
// Clean up export errors
message
=
message
.
replace
(
/^.*export '
(
.+
?)
' was not found in '
(
.+
?)
'.*$/gm
,
`Attempted import error: '$1' is not exported from '$2'.`
);
message
=
message
.
replace
(
/^.*export 'default'
\(
imported as '
(
.+
?)
'
\)
was not found in '
(
.+
?)
'.*$/gm
,
`Attempted import error: '$2' does not contain a default export (imported as '$1').`
);
message
=
message
.
replace
(
/^.*export '
(
.+
?)
'
\(
imported as '
(
.+
?)
'
\)
was not found in '
(
.+
?)
'.*$/gm
,
`Attempted import error: '$1' is not exported from '$3' (imported as '$2').`
);
lines
=
message
.
split
(
'
\n
'
);
// Remove leading newline
if
(
lines
.
length
>
2
&&
lines
[
1
].
trim
()
===
''
)
{
lines
.
splice
(
1
,
1
);
}
// Clean up file name
lines
[
0
]
=
lines
[
0
].
replace
(
/^
(
.*
)
\d
+:
\d
+-
\d
+$/
,
'
$1
'
);
// Cleans up verbose "module not found" messages for files and packages.
if
(
lines
[
1
]
&&
lines
[
1
].
indexOf
(
'
Module not found:
'
)
===
0
)
{
lines
=
[
lines
[
0
],
lines
[
1
]
.
replace
(
'
Error:
'
,
''
)
.
replace
(
'
Module not found: Cannot find file:
'
,
'
Cannot find file:
'
),
];
}
// Add helpful message for users trying to use Sass for the first time
if
(
lines
[
1
]
&&
lines
[
1
].
match
(
/Cannot find module.+sass/
))
{
lines
[
1
]
=
'
To import Sass files, you first need to install sass.
\n
'
;
lines
[
1
]
+=
'
Run `npm install sass` or `yarn add sass` inside your workspace.
'
;
}
message
=
lines
.
join
(
'
\n
'
);
// Internal stacks are generally useless so we strip them... with the
// exception of stacks containing `webpack:` because they're normally
// from user code generated by webpack. For more information see
// https://github.com/facebook/create-react-app/pull/1050
message
=
message
.
replace
(
/^
\s
*at
\s((?!
webpack:
)
.
)
*:
\d
+:
\d
+
[\s
)
]
*
(\n
|$
)
/gm
,
''
);
// at ... ...:x:y
message
=
message
.
replace
(
/^
\s
*at
\s
<anonymous>
(\n
|$
)
/gm
,
''
);
// at <anonymous>
lines
=
message
.
split
(
'
\n
'
);
// Remove duplicated newlines
lines
=
lines
.
filter
(
(
line
,
index
,
arr
)
=>
index
===
0
||
line
.
trim
()
!==
''
||
line
.
trim
()
!==
arr
[
index
-
1
].
trim
()
);
// Reassemble the message
message
=
lines
.
join
(
'
\n
'
);
return
message
.
trim
();
}
function
formatWebpackMessages
(
json
)
{
const
formattedErrors
=
json
.
errors
.
map
(
formatMessage
);
const
formattedWarnings
=
json
.
warnings
.
map
(
formatMessage
);
const
result
=
{
errors
:
formattedErrors
,
warnings
:
formattedWarnings
};
if
(
result
.
errors
.
some
(
isLikelyASyntaxError
))
{
// If there are any syntax errors, show just them.
result
.
errors
=
result
.
errors
.
filter
(
isLikelyASyntaxError
);
}
return
result
;
}
module
.
exports
=
formatWebpackMessages
;
ts/webui/src/components/managementExp/ExperimentManager.tsx
View file @
ef15fc81
...
...
@@ -362,14 +362,8 @@ class Experiment extends React.Component<{}, ExpListState> {
private
getSelectedData
(
type
:
string
,
date
:
Date
|
null
|
undefined
):
void
{
if
(
date
!==
null
&&
date
!==
undefined
)
{
const
{
selectedStatus
,
selectedPlatform
,
selectedStartDate
,
selectedEndDate
,
searchSource
,
sortInfo
}
=
this
.
state
;
const
{
selectedStatus
,
selectedPlatform
,
selectedStartDate
,
selectedEndDate
,
searchSource
,
sortInfo
}
=
this
.
state
;
const
hasPlatform
=
selectedPlatform
===
''
?
false
:
true
;
// filter status, platform
...
...
ts/webui/src/components/managementExp/expFunction.ts
View file @
ef15fc81
...
...
@@ -32,13 +32,7 @@ const filterByStatusOrPlatform = (
};
function
fillOptions
(
arr
:
string
[]):
any
{
const
list
:
Array
<
object
>
=
[];
arr
.
map
(
item
=>
{
list
.
push
({
key
:
item
,
text
:
item
});
});
return
list
;
return
arr
.
map
(
item
=>
({
key
:
item
,
text
:
item
}));
}
function
getSortedSource
(
source
:
AllExperimentList
[],
sortInfo
:
SortInfo
):
AllExperimentList
[]
{
...
...
ts/webui/src/components/modals/ChangeColumnComponent.tsx
View file @
ef15fc81
...
...
@@ -20,11 +20,11 @@ interface SimpleColumn {
name
:
string
;
// name to display
}
interface
CheckBoxItems
{
label
:
string
;
checked
:
boolean
;
onChange
:
()
=>
void
;
}
//
interface CheckBoxItems {
//
label: string;
//
checked: boolean;
//
onChange: () => void;
//
}
class
ChangeColumnComponent
extends
React
.
Component
<
ChangeColumnProps
,
ChangeColumnState
>
{
constructor
(
props
:
ChangeColumnProps
)
{
...
...
ts/webui/src/components/modals/CustomizedTrial.tsx
View file @
ef15fc81
...
...
@@ -51,7 +51,7 @@ class Customize extends React.Component<CustomizeProps, CustomizeState> {
// get user edited hyperParameter, ps: will change data type if you modify the input val
const
customized
=
JSON
.
parse
(
JSON
.
stringify
(
copyTrialParameter
));
// changeMap: user changed keys: values
changeMap
.
forEach
(
function
(
value
,
key
)
{
changeMap
.
forEach
(
function
(
value
,
key
)
{
customized
[
key
]
=
value
;
});
...
...
ts/webui/src/components/overview/count/EditExperimentParam.tsx
View file @
ef15fc81
...
...
@@ -27,9 +27,8 @@ export const EditExperimentParam = (): any => {
const
hideSucceedInfo
=
useCallback
(()
=>
{
setShowSucceedInfo
(
false
);
},
[]);
const
{
title
,
field
,
editType
,
maxExecDuration
,
maxTrialNum
,
trialConcurrency
,
updateOverviewPage
}
=
useContext
(
EditExpeParamContext
);
const
{
title
,
field
,
editType
,
maxExecDuration
,
maxTrialNum
,
trialConcurrency
,
updateOverviewPage
}
=
useContext
(
EditExpeParamContext
);
const
originMaxDurationStr
=
EXPERIMENT
.
profile
.
params
.
maxExperimentDuration
;
const
{
maxDurationUnit
,
changeMaxDurationUnit
}
=
useContext
(
AppContext
);
const
[
unit
,
setUnit
]
=
useState
(
maxDurationUnit
);
...
...
@@ -109,7 +108,6 @@ export const EditExperimentParam = (): any => {
// rest api, modify trial concurrency value
try
{
const
res
=
await
axios
.
put
(
`
${
MANAGER_IP
}
/experiment`
,
newProfile
,
{
// eslint-disable-next-line @typescript-eslint/camelcase
params
:
{
update_type
:
editType
}
});
if
(
res
.
status
===
200
)
{
...
...
ts/webui/src/components/overview/table/SuccessTable.tsx
View file @
ef15fc81
...
...
@@ -204,10 +204,12 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
}
return
(
<
Sticky
stickyPosition
=
{
StickyPositionType
.
Header
}
isScrollSynced
>
{
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
{
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
defaultRender
!
({
...
props
})
}
})
}
</
Sticky
>
);
};
...
...
ts/webui/src/components/public-child/OpenRow.tsx
View file @
ef15fc81
...
...
@@ -98,7 +98,8 @@ class OpenRow extends React.Component<OpenRowProps, OpenRowState> {
)
}
</
PivotItem
>
<
PivotItem
headerText
=
'Log'
key
=
'2'
itemIcon
=
'M365InvoicingLogo'
>
{
// FIXME: this should not be handled in web UI side
{
// FIXME: this should not be handled in web UI side
EXPERIMENT
.
trainingServicePlatform
!==
'
local
'
?
(
<
PaiTrialLog
logStr
=
{
logPathRow
}
...
...
@@ -128,7 +129,8 @@ class OpenRow extends React.Component<OpenRowProps, OpenRowState> {
</
div
>
</
div
>
</
div
>
)
}
)
}
</
PivotItem
>
</
Pivot
>
</
Stack
>
...
...
ts/webui/src/components/stateless-component/NNItabs.tsx
View file @
ef15fc81
...
...
@@ -15,7 +15,7 @@ const DETAILTABS = (
const
NNILOGO
=
(
<
NavLink
to
=
'/oview'
>
<
img
src
=
{
require
(
'
../../static/img
/logo.png
'
)
}
alt
=
'NNI logo'
style
=
{
{
height
:
40
}
}
/>
<
img
src
=
'
/logo.png'
alt
=
'NNI logo'
style
=
{
{
height
:
40
}
}
/>
</
NavLink
>
);
...
...
ts/webui/src/components/trial-detail/Intermediate.tsx
View file @
ef15fc81
...
...
@@ -86,7 +86,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
trigger
:
'
item
'
,
enterable
:
true
,
confine
:
true
,
formatter
:
function
(
data
:
TooltipForIntermediate
):
React
.
ReactNode
{
formatter
:
function
(
data
:
TooltipForIntermediate
):
React
.
ReactNode
{
const
trialId
=
data
.
seriesName
;
let
parameters
=
{};
let
trialNum
=
0
;
...
...
ts/webui/src/components/trial-detail/Para.tsx
View file @
ef15fc81
...
...
@@ -89,13 +89,8 @@ class Para extends React.Component<ParaProps, ParaState> {
}
render
():
React
.
ReactNode
{
const
{
selectedPercent
,
noChart
,
customizeColumnsDialogVisible
,
availableDimensions
,
chosenDimensions
}
=
this
.
state
;
const
{
selectedPercent
,
noChart
,
customizeColumnsDialogVisible
,
availableDimensions
,
chosenDimensions
}
=
this
.
state
;
return
(
<
div
className
=
'parameter'
>
...
...
@@ -314,15 +309,9 @@ class Para extends React.Component<ParaProps, ParaState> {
if
(
axis
.
scale
===
'
ordinal
'
)
{
if
(
axis
.
nested
)
{
// TODO: handle nested entries
scaleInst
=
d3
.
scalePoint
()
.
domain
(
Array
.
from
(
axis
.
domain
.
keys
()))
.
padding
(
0.2
);
scaleInst
=
d3
.
scalePoint
().
domain
(
Array
.
from
(
axis
.
domain
.
keys
())).
padding
(
0.2
);
}
else
{
scaleInst
=
d3
.
scalePoint
()
.
domain
(
axis
.
domain
)
.
padding
(
0.2
);
scaleInst
=
d3
.
scalePoint
().
domain
(
axis
.
domain
).
padding
(
0.2
);
}
}
else
if
(
axis
.
scale
===
'
log
'
)
{
scaleInst
=
d3
.
scaleLog
().
domain
(
padLog
(
axis
.
domain
));
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment