未验证 提交 34345f26 编写于 作者: P Peter Pan 提交者: GitHub

2.0.0-beta.35 (#621)

* fix: minor bug fix

* fix: navbar index url

* v2.0.0-beta.34

* fix: samples page walltime mistake

* v2.0.0-beta.35
上级 917c7204
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"packages": [ "packages": [
"packages/*" "packages/*"
], ],
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"command": { "command": {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
"visualdl", "visualdl",
......
{ {
"name": "@visualdl/app", "name": "@visualdl/app",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"private": true, "private": true,
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/app" "directory": "frontend/packages/app"
}, },
"scripts": { "scripts": {
"dev": "electron index.js", "dev": "electron index.js",
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"test": "echo \"Error: no test specified\" && exit 0" "test": "echo \"Error: no test specified\" && exit 0"
}, },
"dependencies": { "dependencies": {
"@visualdl/server": "2.0.0-beta.33", "@visualdl/server": "2.0.0-beta.35",
"pm2": "4.4.0" "pm2": "4.4.0"
}, },
"devDependencies": { "devDependencies": {
......
{ {
"name": "@visualdl/cli", "name": "@visualdl/cli",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
"visualdl", "visualdl",
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/cli" "directory": "frontend/packages/cli"
}, },
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development ts-node index.ts", "dev": "cross-env NODE_ENV=development ts-node index.ts",
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"dist" "dist"
], ],
"dependencies": { "dependencies": {
"@visualdl/server": "2.0.0-beta.33", "@visualdl/server": "2.0.0-beta.35",
"open": "7.0.3", "open": "7.0.3",
"ora": "4.0.4", "ora": "4.0.4",
"pm2": "4.4.0", "pm2": "4.4.0",
......
...@@ -39,14 +39,13 @@ const colors = { ...@@ -39,14 +39,13 @@ const colors = {
}; };
const Wrapper = styled.a<{type?: keyof typeof colors; rounded?: boolean; disabled?: boolean}>` const Wrapper = styled.a<{type?: keyof typeof colors; rounded?: boolean; disabled?: boolean}>`
cursor: pointer;
height: ${height}; height: ${height};
line-height: ${height}; line-height: ${height};
border-radius: ${props => (props.rounded ? half(height) : borderRadius)}; border-radius: ${props => (props.rounded ? half(height) : borderRadius)};
${props => (props.type ? '' : sameBorder({color: borderColor}))} ${props => (props.type ? '' : sameBorder({color: borderColor}))}
background-color: ${props => (props.type ? colors[props.type].default : 'transparent')}; background-color: ${props => (props.type ? colors[props.type].default : 'transparent')};
color: ${props => (props.disabled ? textLighterColor : props.type ? textInvertColor : textColor)}; color: ${props => (props.disabled ? textLighterColor : props.type ? textInvertColor : textColor)};
cursor: ${props => (props.disabled ? 'not-allowed' : 'cursor')}; cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
text-align: center; text-align: center;
......
...@@ -7,7 +7,7 @@ type IconProps = { ...@@ -7,7 +7,7 @@ type IconProps = {
}; };
const Icon: FunctionComponent<IconProps & WithStyled> = ({type, className}) => { const Icon: FunctionComponent<IconProps & WithStyled> = ({type, className}) => {
return <i className={`vdl-icon icon-${type} ${className}`} />; return <i className={`vdl-icon icon-${type} ${className ?? ''}`} />;
}; };
export default Icon; export default Icon;
import {Link, config, i18n, useTranslation} from '~/utils/i18n'; import {Link, config, i18n, useTranslation} from '~/utils/i18n';
import React, {FunctionComponent} from 'react'; import React, {FunctionComponent, useMemo} from 'react';
import { import {
border, border,
navbarBackgroundColor, navbarBackgroundColor,
...@@ -12,6 +12,7 @@ import { ...@@ -12,6 +12,7 @@ import {
} from '~/utils/style'; } from '~/utils/style';
import Icon from '~/components/Icon'; import Icon from '~/components/Icon';
import {InitConfig} from '@visualdl/i18n';
import Language from '~/components/Language'; import Language from '~/components/Language';
import ee from '~/utils/event'; import ee from '~/utils/event';
import intersection from 'lodash/intersection'; import intersection from 'lodash/intersection';
...@@ -99,13 +100,23 @@ const changeLanguage = () => { ...@@ -99,13 +100,23 @@ const changeLanguage = () => {
}; };
const Navbar: FunctionComponent = () => { const Navbar: FunctionComponent = () => {
const {t} = useTranslation('common'); const {t, i18n} = useTranslation('common');
const {pathname} = useRouter(); const {pathname} = useRouter();
const indexUrl = useMemo(() => {
// TODO: fix type
const subpath = (i18n.options as InitConfig).localeSubpaths?.[i18n.language];
let path = process.env.PUBLIC_PATH ?? '';
if (subpath) {
path += `/${subpath}`;
}
return `${path}/index`;
}, [i18n.options, i18n.language]);
return ( return (
<Nav> <Nav>
<div className="left"> <div className="left">
<Logo href={process.env.PUBLIC_PATH || '/'}> <Logo href={indexUrl}>
<img alt="PaddlePaddle" src={`${process.env.PUBLIC_PATH}/images/logo.svg`} /> <img alt="PaddlePaddle" src={`${process.env.PUBLIC_PATH}/images/logo.svg`} />
<span>VisualDL</span> <span>VisualDL</span>
</Logo> </Logo>
......
...@@ -168,7 +168,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({run, tag, brightness, ...@@ -168,7 +168,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({run, tag, brightness,
<span>{run}</span> <span>{run}</span>
</Title> </Title>
<StepSlider value={step} steps={steps} onChange={setStep} onChangeComplete={cacheImageSrc}> <StepSlider value={step} steps={steps} onChange={setStep} onChangeComplete={cacheImageSrc}>
{formatTime(wallTime, i18n.language)} {formatTime(wallTime * 1000, i18n.language)}
</StepSlider> </StepSlider>
<Container brightness={brightness} contrast={contrast} fit={fit}> <Container brightness={brightness} contrast={contrast} fit={fit}>
{Content} {Content}
......
{ {
"name": "@visualdl/core", "name": "@visualdl/core",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"title": "VisualDL", "title": "VisualDL",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/core" "directory": "frontend/packages/core"
}, },
"scripts": { "scripts": {
"dev": "next", "dev": "next",
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
"test": "echo \"Error: no test specified\" && exit 0" "test": "echo \"Error: no test specified\" && exit 0"
}, },
"dependencies": { "dependencies": {
"@visualdl/i18n": "2.0.0-beta.33", "@visualdl/i18n": "2.0.0-beta.35",
"@visualdl/wasm": "2.0.0-beta.33", "@visualdl/wasm": "2.0.0-beta.35",
"bignumber.js": "9.0.0", "bignumber.js": "9.0.0",
"dagre-d3": "0.6.4", "dagre-d3": "0.6.4",
"echarts": "4.7.0", "echarts": "4.7.0",
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
"@types/react": "16.9.34", "@types/react": "16.9.34",
"@types/react-dom": "16.9.7", "@types/react-dom": "16.9.7",
"@types/styled-components": "5.1.0", "@types/styled-components": "5.1.0",
"@visualdl/mock": "2.0.0-beta.33", "@visualdl/mock": "2.0.0-beta.35",
"babel-plugin-emotion": "10.0.33", "babel-plugin-emotion": "10.0.33",
"babel-plugin-styled-components": "1.10.7", "babel-plugin-styled-components": "1.10.7",
"babel-plugin-typescript-to-proptypes": "1.3.2", "babel-plugin-typescript-to-proptypes": "1.3.2",
......
{ {
"name": "@visualdl/i18n", "name": "@visualdl/i18n",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
"visualdl", "visualdl",
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/i18n" "directory": "frontend/packages/i18n"
}, },
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
......
{ {
"name": "@visualdl/mock", "name": "@visualdl/mock",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
"visualdl", "visualdl",
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/mock" "directory": "frontend/packages/mock"
}, },
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
......
{ {
"name": "@visualdl/server", "name": "@visualdl/server",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
"visualdl", "visualdl",
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/server" "directory": "frontend/packages/server"
}, },
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development nodemon --watch index.ts --watch webpack.config.js --exec \"ts-node index.ts\"", "dev": "cross-env NODE_ENV=development nodemon --watch index.ts --watch webpack.config.js --exec \"ts-node index.ts\"",
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
"ecosystem.config.d.ts" "ecosystem.config.d.ts"
], ],
"dependencies": { "dependencies": {
"@visualdl/core": "2.0.0-beta.33", "@visualdl/core": "2.0.0-beta.35",
"@visualdl/i18n": "2.0.0-beta.33", "@visualdl/i18n": "2.0.0-beta.35",
"express": "4.17.1", "express": "4.17.1",
"http-proxy-middleware": "1.0.3", "http-proxy-middleware": "1.0.3",
"next": "9.3.6", "next": "9.3.6",
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"@types/shelljs": "0.8.7", "@types/shelljs": "0.8.7",
"@types/webpack": "4.41.12", "@types/webpack": "4.41.12",
"@types/webpack-dev-middleware": "3.7.0", "@types/webpack-dev-middleware": "3.7.0",
"@visualdl/mock": "2.0.0-beta.33", "@visualdl/mock": "2.0.0-beta.35",
"cross-env": "7.0.2", "cross-env": "7.0.2",
"nodemon": "2.0.3", "nodemon": "2.0.3",
"shelljs": "0.8.4", "shelljs": "0.8.4",
......
{ {
"name": "@visualdl/serverless", "name": "@visualdl/serverless",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
"visualdl", "visualdl",
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/serverless" "directory": "frontend/packages/serverless"
}, },
"main": "dist/index.html", "main": "dist/index.html",
"files": [ "files": [
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"devDependencies": { "devDependencies": {
"@types/node": "13.13.5", "@types/node": "13.13.5",
"@types/rimraf": "3.0.0", "@types/rimraf": "3.0.0",
"@visualdl/core": "2.0.0-beta.33", "@visualdl/core": "2.0.0-beta.35",
"cross-env": "7.0.2", "cross-env": "7.0.2",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"ts-node": "8.10.1", "ts-node": "8.10.1",
......
{ {
"name": "@visualdl/wasm", "name": "@visualdl/wasm",
"version": "2.0.0-beta.33", "version": "2.0.0-beta.35",
"title": "VisualDL", "title": "VisualDL",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git", "url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/wasm" "directory": "frontend/packages/wasm"
}, },
"files": [ "files": [
"dist/index_bg.wasm", "dist/index_bg.wasm",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册