Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
51776d26
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
大约 1 年 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
51776d26
编写于
11月 26, 2020
作者:
P
Peter Pan
提交者:
GitHub
11月 26, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix typo (#856)
上级
1050e287
变更
76
隐藏空白更改
内联
并排
Showing
76 changed file
with
921 addition
and
40 deletion
+921
-40
frontend/packages/cli/index.ts
frontend/packages/cli/index.ts
+16
-0
frontend/packages/core/babel.config.js
frontend/packages/core/babel.config.js
+2
-0
frontend/packages/core/src/App.tsx
frontend/packages/core/src/App.tsx
+2
-0
frontend/packages/core/src/components/Chart.tsx
frontend/packages/core/src/components/Chart.tsx
+4
-4
frontend/packages/core/src/components/ChartToolbox.tsx
frontend/packages/core/src/components/ChartToolbox.tsx
+3
-3
frontend/packages/core/src/components/GraphPage/Argument.tsx
frontend/packages/core/src/components/GraphPage/Argument.tsx
+3
-3
frontend/packages/core/src/components/GraphPage/NodeDocumentationSidebar.tsx
...ore/src/components/GraphPage/NodeDocumentationSidebar.tsx
+2
-0
frontend/packages/core/src/components/GraphPage/NodePropertiesSidebar.tsx
...s/core/src/components/GraphPage/NodePropertiesSidebar.tsx
+3
-3
frontend/packages/core/src/components/GraphPage/Properties.tsx
...end/packages/core/src/components/GraphPage/Properties.tsx
+4
-4
frontend/packages/core/src/components/GraphPage/Property.tsx
frontend/packages/core/src/components/GraphPage/Property.tsx
+3
-3
frontend/packages/core/src/components/GraphPage/Uploader.tsx
frontend/packages/core/src/components/GraphPage/Uploader.tsx
+8
-8
frontend/packages/core/src/components/HistogramPage/HistogramChart.tsx
...ages/core/src/components/HistogramPage/HistogramChart.tsx
+2
-0
frontend/packages/core/src/components/Input.tsx
frontend/packages/core/src/components/Input.tsx
+3
-3
frontend/packages/core/src/components/SamplePage/ImagePreviewer.tsx
...ackages/core/src/components/SamplePage/ImagePreviewer.tsx
+1
-1
frontend/packages/core/src/components/SamplePage/SampleChart.tsx
...d/packages/core/src/components/SamplePage/SampleChart.tsx
+1
-1
frontend/packages/core/src/components/SamplePage/StepSlider.tsx
...nd/packages/core/src/components/SamplePage/StepSlider.tsx
+4
-3
frontend/packages/core/src/components/StackChart.tsx
frontend/packages/core/src/components/StackChart.tsx
+2
-0
frontend/packages/core/src/hooks/useECharts.ts
frontend/packages/core/src/hooks/useECharts.ts
+2
-0
frontend/packages/core/src/pages/graph.tsx
frontend/packages/core/src/pages/graph.tsx
+2
-2
frontend/packages/core/src/resource/graph/types.ts
frontend/packages/core/src/resource/graph/types.ts
+2
-0
frontend/packages/core/src/routes/index.ts
frontend/packages/core/src/routes/index.ts
+16
-0
frontend/packages/core/src/store/graph/actions.ts
frontend/packages/core/src/store/graph/actions.ts
+16
-0
frontend/packages/core/src/store/graph/reducers.ts
frontend/packages/core/src/store/graph/reducers.ts
+16
-0
frontend/packages/core/src/store/graph/selectors.ts
frontend/packages/core/src/store/graph/selectors.ts
+16
-0
frontend/packages/core/src/store/graph/types.ts
frontend/packages/core/src/store/graph/types.ts
+16
-0
frontend/packages/core/src/store/index.ts
frontend/packages/core/src/store/index.ts
+16
-0
frontend/packages/core/src/store/runs/actions.ts
frontend/packages/core/src/store/runs/actions.ts
+16
-0
frontend/packages/core/src/store/runs/reducers.ts
frontend/packages/core/src/store/runs/reducers.ts
+16
-0
frontend/packages/core/src/store/runs/selectors.ts
frontend/packages/core/src/store/runs/selectors.ts
+16
-0
frontend/packages/core/src/store/runs/types.ts
frontend/packages/core/src/store/runs/types.ts
+16
-0
frontend/packages/core/src/store/theme/actions.ts
frontend/packages/core/src/store/theme/actions.ts
+16
-0
frontend/packages/core/src/store/theme/reducers.ts
frontend/packages/core/src/store/theme/reducers.ts
+16
-0
frontend/packages/core/src/store/theme/selectors.ts
frontend/packages/core/src/store/theme/selectors.ts
+16
-0
frontend/packages/core/src/store/theme/types.ts
frontend/packages/core/src/store/theme/types.ts
+16
-0
frontend/packages/core/src/utils/audio.ts
frontend/packages/core/src/utils/audio.ts
+2
-0
frontend/packages/core/types/ResizeObserver.d.ts
frontend/packages/core/types/ResizeObserver.d.ts
+18
-0
frontend/packages/core/types/echarts.d.ts
frontend/packages/core/types/echarts.d.ts
+16
-0
frontend/packages/core/types/global.d.ts
frontend/packages/core/types/global.d.ts
+16
-0
frontend/packages/core/types/static.d.ts
frontend/packages/core/types/static.d.ts
+16
-0
frontend/packages/demo/builder/audio.ts
frontend/packages/demo/builder/audio.ts
+16
-0
frontend/packages/demo/builder/common.ts
frontend/packages/demo/builder/common.ts
+16
-0
frontend/packages/demo/builder/graph.ts
frontend/packages/demo/builder/graph.ts
+16
-0
frontend/packages/demo/builder/high-dimensional.ts
frontend/packages/demo/builder/high-dimensional.ts
+16
-0
frontend/packages/demo/builder/histogram.ts
frontend/packages/demo/builder/histogram.ts
+16
-0
frontend/packages/demo/builder/image.ts
frontend/packages/demo/builder/image.ts
+16
-0
frontend/packages/demo/builder/index.ts
frontend/packages/demo/builder/index.ts
+16
-0
frontend/packages/demo/builder/io.ts
frontend/packages/demo/builder/io.ts
+16
-0
frontend/packages/demo/builder/pr-curve.ts
frontend/packages/demo/builder/pr-curve.ts
+16
-0
frontend/packages/demo/builder/scalar.ts
frontend/packages/demo/builder/scalar.ts
+16
-0
frontend/packages/demo/builder/types.ts
frontend/packages/demo/builder/types.ts
+16
-0
frontend/packages/demo/index.ts
frontend/packages/demo/index.ts
+16
-0
frontend/packages/mock/assets/image/8.jpeg
frontend/packages/mock/assets/image/8.jpeg
+0
-0
frontend/packages/mock/data/audio/audio.ts
frontend/packages/mock/data/audio/audio.ts
+16
-0
frontend/packages/mock/data/audio/list.ts
frontend/packages/mock/data/audio/list.ts
+16
-0
frontend/packages/mock/data/audio/tags.ts
frontend/packages/mock/data/audio/tags.ts
+18
-0
frontend/packages/mock/data/components.ts
frontend/packages/mock/data/components.ts
+16
-0
frontend/packages/mock/data/embedding/embedding.ts
frontend/packages/mock/data/embedding/embedding.ts
+16
-0
frontend/packages/mock/data/embedding/tags.ts
frontend/packages/mock/data/embedding/tags.ts
+16
-0
frontend/packages/mock/data/graph/graph.ts
frontend/packages/mock/data/graph/graph.ts
+18
-0
frontend/packages/mock/data/histogram/list.ts
frontend/packages/mock/data/histogram/list.ts
+16
-0
frontend/packages/mock/data/histogram/tags.ts
frontend/packages/mock/data/histogram/tags.ts
+16
-0
frontend/packages/mock/data/image/image.ts
frontend/packages/mock/data/image/image.ts
+17
-1
frontend/packages/mock/data/image/list.ts
frontend/packages/mock/data/image/list.ts
+16
-0
frontend/packages/mock/data/image/tags.ts
frontend/packages/mock/data/image/tags.ts
+18
-0
frontend/packages/mock/data/pr-curve/list.ts
frontend/packages/mock/data/pr-curve/list.ts
+16
-0
frontend/packages/mock/data/pr-curve/steps.ts
frontend/packages/mock/data/pr-curve/steps.ts
+16
-0
frontend/packages/mock/data/pr-curve/tags.ts
frontend/packages/mock/data/pr-curve/tags.ts
+16
-0
frontend/packages/mock/data/scalar/list.ts
frontend/packages/mock/data/scalar/list.ts
+16
-0
frontend/packages/mock/data/scalar/tags.ts
frontend/packages/mock/data/scalar/tags.ts
+16
-0
frontend/packages/mock/index.ts
frontend/packages/mock/index.ts
+16
-0
frontend/packages/mock/middleware.ts
frontend/packages/mock/middleware.ts
+16
-0
frontend/packages/netron/src/index.js
frontend/packages/netron/src/index.js
+2
-0
frontend/packages/netron/src/view.js
frontend/packages/netron/src/view.js
+5
-1
frontend/packages/server/ecosystem.config.d.ts
frontend/packages/server/ecosystem.config.d.ts
+18
-0
frontend/packages/server/global.d.ts
frontend/packages/server/global.d.ts
+16
-0
frontend/packages/server/index.ts
frontend/packages/server/index.ts
+16
-0
未找到文件。
frontend/packages/cli/index.ts
浏览文件 @
51776d26
#!/usr/bin/env node
#!/usr/bin/env node
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-console */
/* eslint-disable no-console */
...
...
frontend/packages/core/babel.config.js
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words esmodules
module
.
exports
=
{
module
.
exports
=
{
extends
:
'
@snowpack/app-scripts-react/babel.config.json
'
,
extends
:
'
@snowpack/app-scripts-react/babel.config.json
'
,
presets
:
[
presets
:
[
...
...
frontend/packages/core/src/App.tsx
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words pageview inited
import
React
,
{
FunctionComponent
,
Suspense
,
useCallback
,
useEffect
,
useMemo
,
useState
}
from
'
react
'
;
import
React
,
{
FunctionComponent
,
Suspense
,
useCallback
,
useEffect
,
useMemo
,
useState
}
from
'
react
'
;
import
{
Redirect
,
Route
,
BrowserRouter
as
Router
,
Switch
,
useLocation
}
from
'
react-router-dom
'
;
import
{
Redirect
,
Route
,
BrowserRouter
as
Router
,
Switch
,
useLocation
}
from
'
react-router-dom
'
;
import
{
THEME
,
matchMedia
}
from
'
~/utils/theme
'
;
import
{
THEME
,
matchMedia
}
from
'
~/utils/theme
'
;
...
...
frontend/packages/core/src/components/Chart.tsx
浏览文件 @
51776d26
...
@@ -45,7 +45,7 @@ type ChartProps = {
...
@@ -45,7 +45,7 @@ type ChartProps = {
const
Chart
:
FunctionComponent
<
ChartProps
&
WithStyled
>
=
({
cid
,
width
,
height
,
className
,
children
})
=>
{
const
Chart
:
FunctionComponent
<
ChartProps
&
WithStyled
>
=
({
cid
,
width
,
height
,
className
,
children
})
=>
{
const
[
maximized
,
setMaximized
]
=
useState
(
false
);
const
[
maximized
,
setMaximized
]
=
useState
(
false
);
const
toggleMaximze
=
useCallback
(
const
toggleMaxim
i
ze
=
useCallback
(
(
id
:
symbol
,
value
:
boolean
)
=>
{
(
id
:
symbol
,
value
:
boolean
)
=>
{
if
(
id
===
cid
)
{
if
(
id
===
cid
)
{
setMaximized
(
value
);
setMaximized
(
value
);
...
@@ -54,11 +54,11 @@ const Chart: FunctionComponent<ChartProps & WithStyled> = ({cid, width, height,
...
@@ -54,11 +54,11 @@ const Chart: FunctionComponent<ChartProps & WithStyled> = ({cid, width, height,
[
cid
]
[
cid
]
);
);
useEffect
(()
=>
{
useEffect
(()
=>
{
ee
.
on
(
'
toggle-chart-size
'
,
toggleMaximze
);
ee
.
on
(
'
toggle-chart-size
'
,
toggleMaxim
i
ze
);
return
()
=>
{
return
()
=>
{
ee
.
off
(
'
toggle-chart-size
'
,
toggleMaximze
);
ee
.
off
(
'
toggle-chart-size
'
,
toggleMaxim
i
ze
);
};
};
},
[
toggleMaximze
]);
},
[
toggleMaxim
i
ze
]);
return
(
return
(
<
Div
<
Div
...
...
frontend/packages/core/src/components/ChartToolbox.tsx
浏览文件 @
51776d26
...
@@ -65,10 +65,10 @@ type ToggleChartToolboxItem = {
...
@@ -65,10 +65,10 @@ type ToggleChartToolboxItem = {
onClick
?:
(
value
:
boolean
)
=>
unknown
;
onClick
?:
(
value
:
boolean
)
=>
unknown
;
}
&
BaseChartToolboxItem
;
}
&
BaseChartToolboxItem
;
export
type
ChartTooboxItem
=
NormalChartToolboxItem
|
ToggleChartToolboxItem
;
export
type
ChartToo
l
boxItem
=
NormalChartToolboxItem
|
ToggleChartToolboxItem
;
type
ChartToolboxProps
=
{
type
ChartToolboxProps
=
{
items
:
ChartTooboxItem
[];
items
:
ChartToo
l
boxItem
[];
reversed
?:
boolean
;
reversed
?:
boolean
;
tooltipPlacement
?:
'
top
'
|
'
bottom
'
|
'
left
'
|
'
right
'
;
tooltipPlacement
?:
'
top
'
|
'
bottom
'
|
'
left
'
|
'
right
'
;
};
};
...
@@ -98,7 +98,7 @@ const ChartToolbox: FunctionComponent<ChartToolboxProps & WithStyled> = ({
...
@@ -98,7 +98,7 @@ const ChartToolbox: FunctionComponent<ChartToolboxProps & WithStyled> = ({
);
);
const
getToolboxItem
=
useCallback
(
const
getToolboxItem
=
useCallback
(
(
item
:
ChartTooboxItem
,
index
:
number
)
=>
(
(
item
:
ChartToo
l
boxItem
,
index
:
number
)
=>
(
<
ToolboxItem
<
ToolboxItem
key
=
{
index
}
key
=
{
index
}
active
=
{
item
.
toggle
&&
!
item
.
activeIcon
&&
activeStatus
[
index
]
}
active
=
{
item
.
toggle
&&
!
item
.
activeIcon
&&
activeStatus
[
index
]
}
...
...
frontend/packages/core/src/components/GraphPage/Argument.tsx
浏览文件 @
51776d26
...
@@ -76,10 +76,10 @@ const Wrapper = styled.div`
...
@@ -76,10 +76,10 @@ const Wrapper = styled.div`
type
ArgumentProps
=
{
type
ArgumentProps
=
{
value
:
ArgumentType
|
PropertyType
;
value
:
ArgumentType
|
PropertyType
;
expand
?:
boolean
;
expand
?:
boolean
;
showNodeDo
d
umentation
?:
()
=>
unknown
;
showNodeDo
c
umentation
?:
()
=>
unknown
;
};
};
const
Argument
:
FunctionComponent
<
ArgumentProps
>
=
({
value
,
expand
,
showNodeDo
d
umentation
})
=>
{
const
Argument
:
FunctionComponent
<
ArgumentProps
>
=
({
value
,
expand
,
showNodeDo
c
umentation
})
=>
{
const
[
expanded
,
setExpanded
]
=
useState
(
expand
??
false
);
const
[
expanded
,
setExpanded
]
=
useState
(
expand
??
false
);
const
expandable
=
useMemo
(()
=>
{
const
expandable
=
useMemo
(()
=>
{
...
@@ -105,7 +105,7 @@ const Argument: FunctionComponent<ArgumentProps> = ({value, expand, showNodeDodu
...
@@ -105,7 +105,7 @@ const Argument: FunctionComponent<ArgumentProps> = ({value, expand, showNodeDodu
)
}
)
}
</
span
>
</
span
>
{
(
value
as
PropertyType
).
documentation
&&
(
{
(
value
as
PropertyType
).
documentation
&&
(
<
a
className
=
"argument-operation"
onClick
=
{
()
=>
showNodeDo
d
umentation
?.()
}
>
<
a
className
=
"argument-operation"
onClick
=
{
()
=>
showNodeDo
c
umentation
?.()
}
>
<
Icon
type
=
"question-circle"
/>
<
Icon
type
=
"question-circle"
/>
</
a
>
</
a
>
)
}
)
}
...
...
frontend/packages/core/src/components/GraphPage/NodeDocumentationSidebar.tsx
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words strs
import
React
,
{
FunctionComponent
,
useCallback
}
from
'
react
'
;
import
React
,
{
FunctionComponent
,
useCallback
}
from
'
react
'
;
import
{
Trans
,
useTranslation
}
from
'
react-i18next
'
;
import
{
Trans
,
useTranslation
}
from
'
react-i18next
'
;
import
{
borderRadius
,
em
,
transitionProps
}
from
'
~/utils/style
'
;
import
{
borderRadius
,
em
,
transitionProps
}
from
'
~/utils/style
'
;
...
...
frontend/packages/core/src/components/GraphPage/NodePropertiesSidebar.tsx
浏览文件 @
51776d26
...
@@ -24,19 +24,19 @@ import {useTranslation} from 'react-i18next';
...
@@ -24,19 +24,19 @@ import {useTranslation} from 'react-i18next';
type
NodePropertiesSidebarProps
=
{
type
NodePropertiesSidebarProps
=
{
data
?:
PropertiesType
|
null
;
data
?:
PropertiesType
|
null
;
onClose
?:
()
=>
unknown
;
onClose
?:
()
=>
unknown
;
showNodeDo
d
umentation
?:
()
=>
unknown
;
showNodeDo
c
umentation
?:
()
=>
unknown
;
};
};
const
NodePropertiesSidebar
:
FunctionComponent
<
NodePropertiesSidebarProps
>
=
({
const
NodePropertiesSidebar
:
FunctionComponent
<
NodePropertiesSidebarProps
>
=
({
data
,
data
,
onClose
,
onClose
,
showNodeDo
d
umentation
showNodeDo
c
umentation
})
=>
{
})
=>
{
const
{
t
}
=
useTranslation
(
'
graph
'
);
const
{
t
}
=
useTranslation
(
'
graph
'
);
return
(
return
(
<
GraphSidebar
title
=
{
t
(
'
graph:node-properties
'
)
}
onClose
=
{
onClose
}
>
<
GraphSidebar
title
=
{
t
(
'
graph:node-properties
'
)
}
onClose
=
{
onClose
}
>
<
Properties
{
...
data
}
showNodeDo
dumentation
=
{
showNodeDod
umentation
}
/>
<
Properties
{
...
data
}
showNodeDo
cumentation
=
{
showNodeDoc
umentation
}
/>
</
GraphSidebar
>
</
GraphSidebar
>
);
);
};
};
...
...
frontend/packages/core/src/components/GraphPage/Properties.tsx
浏览文件 @
51776d26
...
@@ -30,10 +30,10 @@ const Header = styled.div`
...
@@ -30,10 +30,10 @@ const Header = styled.div`
type
PropertiesProps
=
PropertiesType
&
{
type
PropertiesProps
=
PropertiesType
&
{
expand
?:
boolean
;
expand
?:
boolean
;
showNodeDo
d
umentation
?:
()
=>
unknown
;
showNodeDo
c
umentation
?:
()
=>
unknown
;
};
};
const
Properties
:
FunctionComponent
<
PropertiesProps
>
=
({
properties
,
groups
,
expand
,
showNodeDo
d
umentation
})
=>
{
const
Properties
:
FunctionComponent
<
PropertiesProps
>
=
({
properties
,
groups
,
expand
,
showNodeDo
c
umentation
})
=>
{
const
{
t
}
=
useTranslation
(
'
graph
'
);
const
{
t
}
=
useTranslation
(
'
graph
'
);
return
(
return
(
...
@@ -43,7 +43,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp
...
@@ -43,7 +43,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp
name
=
{
t
(
`graph:properties.
${
property
.
name
}
`
)
}
name
=
{
t
(
`graph:properties.
${
property
.
name
}
`
)
}
values
=
{
property
.
values
}
values
=
{
property
.
values
}
key
=
{
index
}
key
=
{
index
}
showNodeDo
dumentation
=
{
showNodeDod
umentation
}
showNodeDo
cumentation
=
{
showNodeDoc
umentation
}
/>
/>
))
}
))
}
{
groups
?.
map
((
group
,
index
)
=>
(
{
groups
?.
map
((
group
,
index
)
=>
(
...
@@ -54,7 +54,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp
...
@@ -54,7 +54,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp
{
...
property
}
{
...
property
}
key
=
{
anotherIndex
}
key
=
{
anotherIndex
}
expand
=
{
expand
}
expand
=
{
expand
}
showNodeDo
dumentation
=
{
showNodeDod
umentation
}
showNodeDo
cumentation
=
{
showNodeDoc
umentation
}
/>
/>
))
}
))
}
</
React
.
Fragment
>
</
React
.
Fragment
>
...
...
frontend/packages/core/src/components/GraphPage/Property.tsx
浏览文件 @
51776d26
...
@@ -49,10 +49,10 @@ const Wrapper = styled.div`
...
@@ -49,10 +49,10 @@ const Wrapper = styled.div`
type
PropertyProps
=
NameValues
<
ArgumentType
|
PropertyType
>
&
{
type
PropertyProps
=
NameValues
<
ArgumentType
|
PropertyType
>
&
{
expand
?:
boolean
;
expand
?:
boolean
;
showNodeDo
d
umentation
?:
()
=>
unknown
;
showNodeDo
c
umentation
?:
()
=>
unknown
;
};
};
const
Property
:
FunctionComponent
<
PropertyProps
>
=
({
name
,
values
,
expand
,
showNodeDo
d
umentation
})
=>
{
const
Property
:
FunctionComponent
<
PropertyProps
>
=
({
name
,
values
,
expand
,
showNodeDo
c
umentation
})
=>
{
return
(
return
(
<
Wrapper
>
<
Wrapper
>
<
label
className
=
"property-name"
title
=
{
name
}
>
<
label
className
=
"property-name"
title
=
{
name
}
>
...
@@ -60,7 +60,7 @@ const Property: FunctionComponent<PropertyProps> = ({name, values, expand, showN
...
@@ -60,7 +60,7 @@ const Property: FunctionComponent<PropertyProps> = ({name, values, expand, showN
</
label
>
</
label
>
<
div
className
=
"property-values"
>
<
div
className
=
"property-values"
>
{
values
.
map
((
value
,
index
)
=>
(
{
values
.
map
((
value
,
index
)
=>
(
<
Argument
key
=
{
index
}
value
=
{
value
}
expand
=
{
expand
}
showNodeDo
dumentation
=
{
showNodeDod
umentation
}
/>
<
Argument
key
=
{
index
}
value
=
{
value
}
expand
=
{
expand
}
showNodeDo
cumentation
=
{
showNodeDoc
umentation
}
/>
))
}
))
}
</
div
>
</
div
>
</
Wrapper
>
</
Wrapper
>
...
...
frontend/packages/core/src/components/GraphPage/Uploader.tsx
浏览文件 @
51776d26
...
@@ -22,16 +22,16 @@ import Icon from '~/components/Icon';
...
@@ -22,16 +22,16 @@ import Icon from '~/components/Icon';
import
styled
from
'
styled-components
'
;
import
styled
from
'
styled-components
'
;
import
{
useTranslation
}
from
'
react-i18next
'
;
import
{
useTranslation
}
from
'
react-i18next
'
;
const
DropZone
=
styled
.
div
<
{
active
d
:
boolean
}
>
`
const
DropZone
=
styled
.
div
<
{
active
:
boolean
}
>
`
${
props
=>
${
props
=>
sameBorder
({
sameBorder
({
width
:
'
1px
'
,
width
:
'
1px
'
,
type
:
'
dashed
'
,
type
:
'
dashed
'
,
radius
:
em
(
16
),
radius
:
em
(
16
),
color
:
props
.
active
d
?
'
var(--primary-color)
'
:
undefined
color
:
props
.
active
?
'
var(--primary-color)
'
:
undefined
})}
})}
background-color:
${
props
=>
background-color:
${
props
=>
props
.
active
d
?
'
var(--graph-uploader-active-background-color)
'
:
'
var(--graph-uploader-background-color)
'
}
;
props
.
active
?
'
var(--graph-uploader-active-background-color)
'
:
'
var(--graph-uploader-background-color)
'
}
;
${
size
(
'
43.2%
'
,
'
68%
'
)}
${
size
(
'
43.2%
'
,
'
68%
'
)}
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
...
@@ -82,12 +82,12 @@ type UploaderProps = {
...
@@ -82,12 +82,12 @@ type UploaderProps = {
const
Uploader
:
FunctionComponent
<
UploaderProps
>
=
({
onClickUpload
,
onDropFiles
})
=>
{
const
Uploader
:
FunctionComponent
<
UploaderProps
>
=
({
onClickUpload
,
onDropFiles
})
=>
{
const
{
t
}
=
useTranslation
(
'
graph
'
);
const
{
t
}
=
useTranslation
(
'
graph
'
);
const
[
active
d
,
setActived
]
=
useState
(
false
);
const
[
active
,
setActive
]
=
useState
(
false
);
const
onClick
=
useCallback
(()
=>
onClickUpload
?.(),
[
onClickUpload
]);
const
onClick
=
useCallback
(()
=>
onClickUpload
?.(),
[
onClickUpload
]);
const
onDrop
=
useCallback
(
const
onDrop
=
useCallback
(
(
e
:
React
.
DragEvent
<
HTMLDivElement
>
)
=>
{
(
e
:
React
.
DragEvent
<
HTMLDivElement
>
)
=>
{
e
.
preventDefault
();
e
.
preventDefault
();
setActive
d
(
false
);
setActive
(
false
);
if
(
e
.
dataTransfer
&&
e
.
dataTransfer
.
files
&&
e
.
dataTransfer
.
files
.
length
)
{
if
(
e
.
dataTransfer
&&
e
.
dataTransfer
.
files
&&
e
.
dataTransfer
.
files
.
length
)
{
onDropFiles
?.(
e
.
dataTransfer
.
files
);
onDropFiles
?.(
e
.
dataTransfer
.
files
);
}
}
...
@@ -99,16 +99,16 @@ const Uploader: FunctionComponent<UploaderProps> = ({onClickUpload, onDropFiles}
...
@@ -99,16 +99,16 @@ const Uploader: FunctionComponent<UploaderProps> = ({onClickUpload, onDropFiles}
if
(
e
.
currentTarget
.
contains
(
e
.
relatedTarget
as
Node
|
null
))
{
if
(
e
.
currentTarget
.
contains
(
e
.
relatedTarget
as
Node
|
null
))
{
return
;
return
;
}
}
setActive
d
(
false
);
setActive
(
false
);
},
[]);
},
[]);
return
(
return
(
<>
<>
<
DropZone
<
DropZone
active
d
=
{
actived
}
active
=
{
active
}
onDrop
=
{
onDrop
}
onDrop
=
{
onDrop
}
onDragOver
=
{
e
=>
e
.
preventDefault
()
}
onDragOver
=
{
e
=>
e
.
preventDefault
()
}
onDragEnter
=
{
()
=>
setActive
d
(
true
)
}
onDragEnter
=
{
()
=>
setActive
(
true
)
}
onDragLeave
=
{
onDragLeave
}
onDragLeave
=
{
onDragLeave
}
>
>
<
Icon
type
=
"upload"
className
=
"upload-icon"
/>
<
Icon
type
=
"upload"
className
=
"upload-icon"
/>
...
...
frontend/packages/core/src/components/HistogramPage/HistogramChart.tsx
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words npts
import
type
{
EChartOption
,
ECharts
,
EChartsConvertFinder
}
from
'
echarts
'
;
import
type
{
EChartOption
,
ECharts
,
EChartsConvertFinder
}
from
'
echarts
'
;
import
type
{
HistogramData
,
OffsetData
,
OverlayData
,
OverlayDataItem
}
from
'
~/resource/histogram
'
;
import
type
{
HistogramData
,
OffsetData
,
OverlayData
,
OverlayDataItem
}
from
'
~/resource/histogram
'
;
import
LineChart
,
{
LineChartRef
}
from
'
~/components/LineChart
'
;
import
LineChart
,
{
LineChartRef
}
from
'
~/components/LineChart
'
;
...
...
frontend/packages/core/src/components/Input.tsx
浏览文件 @
51776d26
...
@@ -45,14 +45,14 @@ const StyledInput = styled.input<{rounded?: boolean}>`
...
@@ -45,14 +45,14 @@ const StyledInput = styled.input<{rounded?: boolean}>`
}
}
`
;
`
;
type
Custom
e
InputProps
=
{
type
CustomInputProps
=
{
rounded
?:
boolean
;
rounded
?:
boolean
;
value
?:
string
;
value
?:
string
;
onChange
?:
(
value
:
string
)
=>
unknown
;
onChange
?:
(
value
:
string
)
=>
unknown
;
};
};
export
type
InputProps
=
Omit
<
React
.
ComponentPropsWithoutRef
<
'
input
'
>
,
keyof
Custom
e
InputProps
|
'
type
'
|
'
className
'
>
&
export
type
InputProps
=
Omit
<
React
.
ComponentPropsWithoutRef
<
'
input
'
>
,
keyof
CustomInputProps
|
'
type
'
|
'
className
'
>
&
Custom
e
InputProps
;
CustomInputProps
;
const
Input
=
React
.
forwardRef
<
HTMLInputElement
,
InputProps
&
WithStyled
>
(
const
Input
=
React
.
forwardRef
<
HTMLInputElement
,
InputProps
&
WithStyled
>
(
({
rounded
,
value
,
onChange
,
className
,
...
props
},
ref
)
=>
(
({
rounded
,
value
,
onChange
,
className
,
...
props
},
ref
)
=>
(
...
...
frontend/packages/core/src/components/SamplePage/ImagePreviewer.tsx
浏览文件 @
51776d26
...
@@ -61,7 +61,7 @@ const Header = styled.div`
...
@@ -61,7 +61,7 @@ const Header = styled.div`
font-size:
${
em
(
10
)}
;
font-size:
${
em
(
10
)}
;
> a {
> a {
display: inline-bl
co
k;
display: inline-bl
oc
k;
line-height: 1;
line-height: 1;
height:
${
em
(
14
)}
;
height:
${
em
(
14
)}
;
...
...
frontend/packages/core/src/components/SamplePage/SampleChart.tsx
浏览文件 @
51776d26
...
@@ -301,7 +301,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({
...
@@ -301,7 +301,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({
return
null
;
return
null
;
},
[
viewed
,
loading
,
error
,
data
,
step
,
entityProps
,
t
,
content
]);
},
[
viewed
,
loading
,
error
,
data
,
step
,
entityProps
,
t
,
content
]);
const
Previewer
=
useMemo
(()
=>
{
const
Previewer
=
useMemo
<
React
.
ReactNode
>
(()
=>
{
if
(
!
previewer
)
{
if
(
!
previewer
)
{
return
null
;
return
null
;
}
}
...
...
frontend/packages/core/src/components/SamplePage/StepSlider.tsx
浏览文件 @
51776d26
...
@@ -47,7 +47,8 @@ const Label = styled.div`
...
@@ -47,7 +47,8 @@ const Label = styled.div`
font-size:
${
em
(
10
)}
;
font-size:
${
em
(
10
)}
;
> a {
> a {
display: inline-blcok;
display: inline-block;
cursor: pointer;
line-height: 1;
line-height: 1;
height:
${
em
(
14
)}
;
height:
${
em
(
14
)}
;
...
@@ -112,10 +113,10 @@ const StepSlider: FunctionComponent<StepSliderProps> = ({onChange, onChangeCompl
...
@@ -112,10 +113,10 @@ const StepSlider: FunctionComponent<StepSliderProps> = ({onChange, onChangeCompl
<
div
>
{
`
${
t
(
'
sample:step
'
)}
:
${
steps
[
step
]
??
'
...
'
}
`
}
</
div
>
<
div
>
{
`
${
t
(
'
sample:step
'
)}
:
${
steps
[
step
]
??
'
...
'
}
`
}
</
div
>
<
Tippy
placement
=
"right"
theme
=
"tooltip"
content
=
{
t
(
'
sample:step-tip
'
)
}
>
<
Tippy
placement
=
"right"
theme
=
"tooltip"
content
=
{
t
(
'
sample:step-tip
'
)
}
>
<
div
className
=
"step-buttons"
>
<
div
className
=
"step-buttons"
>
<
a
href
=
"javascript:void(0)"
onClick
=
{
prevStep
}
>
<
a
onClick
=
{
prevStep
}
>
<
Icon
type
=
"chevron-up"
/>
<
Icon
type
=
"chevron-up"
/>
</
a
>
</
a
>
<
a
href
=
"javascript:void(0)"
onClick
=
{
nextStep
}
>
<
a
onClick
=
{
nextStep
}
>
<
Icon
type
=
"chevron-down"
/>
<
Icon
type
=
"chevron-down"
/>
</
a
>
</
a
>
</
div
>
</
div
>
...
...
frontend/packages/core/src/components/StackChart.tsx
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words coord zlevel
import
*
as
chart
from
'
~/utils/chart
'
;
import
*
as
chart
from
'
~/utils/chart
'
;
import
type
{
EChartOption
,
ECharts
,
EChartsConvertFinder
}
from
'
echarts
'
;
import
type
{
EChartOption
,
ECharts
,
EChartsConvertFinder
}
from
'
echarts
'
;
...
...
frontend/packages/core/src/hooks/useECharts.ts
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words zlevel
import
{
MutableRefObject
,
useCallback
,
useEffect
,
useLayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
;
import
{
MutableRefObject
,
useCallback
,
useEffect
,
useLayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
;
import
{
position
,
primaryColor
,
size
}
from
'
~/utils/style
'
;
import
{
position
,
primaryColor
,
size
}
from
'
~/utils/style
'
;
...
...
frontend/packages/core/src/pages/graph.tsx
浏览文件 @
51776d26
...
@@ -115,7 +115,7 @@ const Graph: FunctionComponent = () => {
...
@@ -115,7 +115,7 @@ const Graph: FunctionComponent = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
data
?.
data
.
size
)
{
if
(
data
?.
data
.
size
)
{
setFiles
([
new
File
([
data
.
data
],
data
.
filename
||
'
unkn
wo
n_model
'
)]);
setFiles
([
new
File
([
data
.
data
],
data
.
filename
||
'
unkn
ow
n_model
'
)]);
}
}
},
[
data
]);
},
[
data
]);
...
@@ -185,7 +185,7 @@ const Graph: FunctionComponent = () => {
...
@@ -185,7 +185,7 @@ const Graph: FunctionComponent = () => {
<
NodePropertiesSidebar
<
NodePropertiesSidebar
data
=
{
nodeData
}
data
=
{
nodeData
}
onClose
=
{
()
=>
setNodeData
(
null
)
}
onClose
=
{
()
=>
setNodeData
(
null
)
}
showNodeDo
d
umentation
=
{
()
=>
graph
.
current
?.
showNodeDocumentation
(
nodeData
)
}
showNodeDo
c
umentation
=
{
()
=>
graph
.
current
?.
showNodeDocumentation
(
nodeData
)
}
/>
/>
</
Aside
>
</
Aside
>
);
);
...
...
frontend/packages/core/src/resource/graph/types.ts
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words strs
export
type
Property
=
{
export
type
Property
=
{
name
?:
string
;
name
?:
string
;
value
:
string
;
value
:
string
;
...
...
frontend/packages/core/src/routes/index.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
React
,
{
FunctionComponent
,
LazyExoticComponent
}
from
'
react
'
;
import
React
,
{
FunctionComponent
,
LazyExoticComponent
}
from
'
react
'
;
export
enum
Pages
{
export
enum
Pages
{
...
...
frontend/packages/core/src/store/graph/actions.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
ActionTypes
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
import
type
{
Model
}
from
'
./types
'
;
import
type
{
Model
}
from
'
./types
'
;
...
...
frontend/packages/core/src/store/graph/reducers.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
GraphActionTypes
,
GraphState
}
from
'
./types
'
;
import
type
{
GraphActionTypes
,
GraphState
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
...
...
frontend/packages/core/src/store/graph/selectors.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
RootState
}
from
'
../index
'
;
import
type
{
RootState
}
from
'
../index
'
;
export
const
model
=
(
state
:
RootState
)
=>
state
.
graph
.
model
;
export
const
model
=
(
state
:
RootState
)
=>
state
.
graph
.
model
;
frontend/packages/core/src/store/graph/types.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
type
Model
=
FileList
|
File
[]
|
null
;
export
type
Model
=
FileList
|
File
[]
|
null
;
export
enum
ActionTypes
{
export
enum
ActionTypes
{
...
...
frontend/packages/core/src/store/index.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
*
as
graphActions
from
'
./graph/actions
'
;
import
*
as
graphActions
from
'
./graph/actions
'
;
import
*
as
graphSelectors
from
'
./graph/selectors
'
;
import
*
as
graphSelectors
from
'
./graph/selectors
'
;
import
*
as
runsActions
from
'
./runs/actions
'
;
import
*
as
runsActions
from
'
./runs/actions
'
;
...
...
frontend/packages/core/src/store/runs/actions.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Page
,
Runs
}
from
'
./types
'
;
import
type
{
Page
,
Runs
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
...
...
frontend/packages/core/src/store/runs/reducers.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
RunsActionTypes
,
RunsState
}
from
'
./types
'
;
import
type
{
RunsActionTypes
,
RunsState
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
...
...
frontend/packages/core/src/store/runs/selectors.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Page
}
from
'
./types
'
;
import
type
{
Page
}
from
'
./types
'
;
import
type
{
RootState
}
from
'
../index
'
;
import
type
{
RootState
}
from
'
../index
'
;
...
...
frontend/packages/core/src/store/runs/types.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
type
Runs
=
string
[];
export
type
Runs
=
string
[];
export
enum
ActionTypes
{
export
enum
ActionTypes
{
...
...
frontend/packages/core/src/store/theme/actions.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
ActionTypes
}
from
'
./types
'
;
import
{
ActionTypes
}
from
'
./types
'
;
import
type
{
Theme
}
from
'
./types
'
;
import
type
{
Theme
}
from
'
./types
'
;
...
...
frontend/packages/core/src/store/theme/reducers.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
THEME
,
autoTheme
}
from
'
~/utils/theme
'
;
import
{
THEME
,
autoTheme
}
from
'
~/utils/theme
'
;
import
type
{
ThemeActionTypes
,
ThemeState
}
from
'
./types
'
;
import
type
{
ThemeActionTypes
,
ThemeState
}
from
'
./types
'
;
...
...
frontend/packages/core/src/store/theme/selectors.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
RootState
}
from
'
../index
'
;
import
type
{
RootState
}
from
'
../index
'
;
export
const
theme
=
(
state
:
RootState
)
=>
state
.
theme
.
theme
;
export
const
theme
=
(
state
:
RootState
)
=>
state
.
theme
.
theme
;
...
...
frontend/packages/core/src/store/theme/types.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Theme
}
from
'
~/utils/theme
'
;
import
type
{
Theme
}
from
'
~/utils/theme
'
;
export
type
{
Theme
}
from
'
~/utils/theme
'
;
export
type
{
Theme
}
from
'
~/utils/theme
'
;
...
...
frontend/packages/core/src/utils/audio.ts
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words mpga
interface
AudioPlayerOptions
{
interface
AudioPlayerOptions
{
context
?:
AudioContext
;
context
?:
AudioContext
;
volume
?:
number
;
volume
?:
number
;
...
...
frontend/packages/core/types/ResizeObserver.d.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:words unobserves
/**
/**
* The **ResizeObserver** interface reports changes to the dimensions of an
* The **ResizeObserver** interface reports changes to the dimensions of an
* [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)'s content
* [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)'s content
...
...
frontend/packages/core/types/echarts.d.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare
module
'
echarts-gl
'
;
declare
module
'
echarts-gl
'
;
frontend/packages/core/types/global.d.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare
global
{
declare
global
{
interface
Window
{
interface
Window
{
webkitAudioContext
:
AudioContext
;
webkitAudioContext
:
AudioContext
;
...
...
frontend/packages/core/types/static.d.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Use this file to declare any custom file extensions for importing */
/* Use this file to declare any custom file extensions for importing */
/* Use this folder to also add/extend a package d.ts file, if needed. */
/* Use this folder to also add/extend a package d.ts file, if needed. */
...
...
frontend/packages/demo/builder/audio.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Data
,
Worker
}
from
'
./types
'
;
import
type
{
Data
,
Worker
}
from
'
./types
'
;
interface
Audio
{
interface
Audio
{
...
...
frontend/packages/demo/builder/common.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Worker
}
from
'
./types
'
;
import
type
{
Worker
}
from
'
./types
'
;
const
worker
:
Worker
=
async
io
=>
{
const
worker
:
Worker
=
async
io
=>
{
...
...
frontend/packages/demo/builder/graph.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Worker
}
from
'
./types
'
;
import
type
{
Worker
}
from
'
./types
'
;
const
worker
:
Worker
=
async
io
=>
{
const
worker
:
Worker
=
async
io
=>
{
...
...
frontend/packages/demo/builder/high-dimensional.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Worker
}
from
'
./types
'
;
import
type
{
Worker
}
from
'
./types
'
;
const
worker
:
Worker
=
async
io
=>
{
const
worker
:
Worker
=
async
io
=>
{
...
...
frontend/packages/demo/builder/histogram.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Data
,
Worker
}
from
'
./types
'
;
import
type
{
Data
,
Worker
}
from
'
./types
'
;
const
worker
:
Worker
=
async
io
=>
{
const
worker
:
Worker
=
async
io
=>
{
...
...
frontend/packages/demo/builder/image.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Data
,
Worker
}
from
'
./types
'
;
import
type
{
Data
,
Worker
}
from
'
./types
'
;
interface
Image
{
interface
Image
{
...
...
frontend/packages/demo/builder/index.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */
/* eslint-disable no-console */
import
IO
from
'
./io
'
;
import
IO
from
'
./io
'
;
...
...
frontend/packages/demo/builder/io.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */
/* eslint-disable no-console */
import
crypto
,
{
BinaryLike
}
from
'
crypto
'
;
import
crypto
,
{
BinaryLike
}
from
'
crypto
'
;
...
...
frontend/packages/demo/builder/pr-curve.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Data
,
Worker
}
from
'
./types
'
;
import
type
{
Data
,
Worker
}
from
'
./types
'
;
const
worker
:
Worker
=
async
io
=>
{
const
worker
:
Worker
=
async
io
=>
{
...
...
frontend/packages/demo/builder/scalar.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
{
Data
,
Worker
}
from
'
./types
'
;
import
type
{
Data
,
Worker
}
from
'
./types
'
;
const
worker
:
Worker
=
async
io
=>
{
const
worker
:
Worker
=
async
io
=>
{
...
...
frontend/packages/demo/builder/types.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
type
IO
from
'
./io
'
;
import
type
IO
from
'
./io
'
;
export
type
Worker
=
(
io
:
IO
)
=>
Promise
<
void
>
;
export
type
Worker
=
(
io
:
IO
)
=>
Promise
<
void
>
;
...
...
frontend/packages/demo/index.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
,
Response
}
from
'
express
'
;
import
{
Request
,
Response
}
from
'
express
'
;
import
IO
from
'
./builder/io
'
;
import
IO
from
'
./builder/io
'
;
...
...
frontend/packages/mock/assets/image/8.jpeg
0 → 100644
浏览文件 @
51776d26
1.5 KB
frontend/packages/mock/data/audio/audio.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
,
Response
}
from
'
express
'
;
import
{
Request
,
Response
}
from
'
express
'
;
import
fs
from
'
fs/promises
'
;
import
fs
from
'
fs/promises
'
;
...
...
frontend/packages/mock/data/audio/list.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
[
export
default
[
{
{
wallTime
:
1512549785061.623
,
wallTime
:
1512549785061.623
,
...
...
frontend/packages/mock/data/audio/tags.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:disable
export
default
{
export
default
{
runs
:
[
'
train
'
,
'
test
'
],
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
tags
:
[
...
...
frontend/packages/mock/data/components.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
[
'
embeddings
'
,
'
scalar
'
,
'
image
'
,
'
audio
'
,
'
graph
'
,
'
histogram
'
,
'
pr_curve
'
];
export
default
[
'
embeddings
'
,
'
scalar
'
,
'
image
'
,
'
audio
'
,
'
graph
'
,
'
histogram
'
,
'
pr_curve
'
];
frontend/packages/mock/data/embedding/embedding.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
}
from
'
express
'
;
import
{
Request
}
from
'
express
'
;
export
default
(
req
:
Request
)
=>
{
export
default
(
req
:
Request
)
=>
{
...
...
frontend/packages/mock/data/embedding/tags.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
export
default
{
runs
:
[
'
train
'
,
'
test
'
],
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
tags
:
[
...
...
frontend/packages/mock/data/graph/graph.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:disable
import
{
Request
,
Response
}
from
'
express
'
;
import
{
Request
,
Response
}
from
'
express
'
;
import
fetch
from
'
isomorphic-unfetch
'
;
import
fetch
from
'
isomorphic-unfetch
'
;
...
...
frontend/packages/mock/data/histogram/list.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
[
export
default
[
[
[
1515224840945.252
,
1515224840945.252
,
...
...
frontend/packages/mock/data/histogram/tags.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
export
default
{
runs
:
[
'
train
'
,
'
test
'
],
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
tags
:
[
...
...
frontend/packages/mock/data/image/image.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
,
Response
}
from
'
express
'
;
import
{
Request
,
Response
}
from
'
express
'
;
import
fs
from
'
fs/promises
'
;
import
fs
from
'
fs/promises
'
;
import
mime
from
'
mime-types
'
;
import
mime
from
'
mime-types
'
;
import
path
from
'
path
'
;
import
path
from
'
path
'
;
const
images
=
[
'
1.jpeg
'
,
'
2.jpeg
'
,
'
3.jpeg
'
,
'
4.jpeg
'
,
'
5.gif
'
,
'
6.gif
'
,
'
7.gif
'
];
const
images
=
[
'
1.jpeg
'
,
'
2.jpeg
'
,
'
3.jpeg
'
,
'
4.jpeg
'
,
'
5.gif
'
,
'
6.gif
'
,
'
7.gif
'
,
'
8.jpeg
'
];
export
default
async
(
req
:
Request
,
res
:
Response
)
=>
{
export
default
async
(
req
:
Request
,
res
:
Response
)
=>
{
const
index
=
(
+
req
.
query
.
index
??
0
)
%
images
.
length
;
const
index
=
(
+
req
.
query
.
index
??
0
)
%
images
.
length
;
...
...
frontend/packages/mock/data/image/list.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
[
export
default
[
{
{
wallTime
:
1512549785061.623
,
wallTime
:
1512549785061.623
,
...
...
frontend/packages/mock/data/image/tags.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:disable
export
default
{
export
default
{
runs
:
[
'
train
'
,
'
test
'
],
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
tags
:
[
...
...
frontend/packages/mock/data/pr-curve/list.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
}
from
'
express
'
;
import
{
Request
}
from
'
express
'
;
export
default
(
request
:
Request
)
=>
{
export
default
(
request
:
Request
)
=>
{
...
...
frontend/packages/mock/data/pr-curve/steps.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
}
from
'
express
'
;
import
{
Request
}
from
'
express
'
;
export
default
(
request
:
Request
)
=>
{
export
default
(
request
:
Request
)
=>
{
...
...
frontend/packages/mock/data/pr-curve/tags.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
export
default
{
runs
:
[
'
train
'
,
'
test
'
],
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
tags
:
[
...
...
frontend/packages/mock/data/scalar/list.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
}
from
'
express
'
;
import
{
Request
}
from
'
express
'
;
export
default
(
request
:
Request
)
=>
{
export
default
(
request
:
Request
)
=>
{
...
...
frontend/packages/mock/data/scalar/tags.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
export
default
{
runs
:
[
'
train
'
,
'
test
'
],
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
tags
:
[
...
...
frontend/packages/mock/index.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */
/* eslint-disable no-console */
import
express
from
'
express
'
;
import
express
from
'
express
'
;
...
...
frontend/packages/mock/middleware.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
Request
,
Response
}
from
'
express
'
;
import
{
Request
,
Response
}
from
'
express
'
;
import
faker
from
'
faker
'
;
import
faker
from
'
faker
'
;
...
...
frontend/packages/netron/src/index.js
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words actived nextcode
const
view
=
require
(
'
./view
'
);
const
view
=
require
(
'
./view
'
);
const
host
=
{};
const
host
=
{};
...
...
frontend/packages/netron/src/view.js
浏览文件 @
51776d26
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
// cSpell:words grapher selectall nodesep ranksep rankdir pbtxt
const
zip
=
require
(
'
netron/src/zip
'
);
const
zip
=
require
(
'
netron/src/zip
'
);
const
gzip
=
require
(
'
netron/src/gzip
'
);
const
gzip
=
require
(
'
netron/src/gzip
'
);
const
tar
=
require
(
'
netron/src/tar
'
);
const
tar
=
require
(
'
netron/src/tar
'
);
...
@@ -1337,7 +1339,7 @@ view.ModelFactoryService = class {
...
@@ -1337,7 +1339,7 @@ view.ModelFactoryService = class {
_filter
(
context
)
{
_filter
(
context
)
{
const
identifier
=
context
.
identifier
.
toLowerCase
();
const
identifier
=
context
.
identifier
.
toLowerCase
();
const
list
=
this
.
_extensions
.
filter
(
entry
=>
identifier
.
endsWith
(
entry
.
extension
)).
map
(
e
xtry
=>
ex
try
.
id
);
const
list
=
this
.
_extensions
.
filter
(
entry
=>
identifier
.
endsWith
(
entry
.
extension
)).
map
(
e
ntry
=>
en
try
.
id
);
return
Array
.
from
(
new
Set
(
list
));
return
Array
.
from
(
new
Set
(
list
));
}
}
...
@@ -1347,6 +1349,7 @@ view.ModelFactoryService = class {
...
@@ -1347,6 +1349,7 @@ view.ModelFactoryService = class {
return
Promise
.
reject
(
new
ModelError
(
'
File has no content.
'
,
true
));
return
Promise
.
reject
(
new
ModelError
(
'
File has no content.
'
,
true
));
}
}
const
list
=
[
const
list
=
[
// cSpell:disable
{
name
:
'
ELF executable
'
,
value
:
/^
\x
7FELF/
},
{
name
:
'
ELF executable
'
,
value
:
/^
\x
7FELF/
},
{
name
:
'
Git LFS header
'
,
value
:
/^version https:
\/\/
git-lfs.github.com
\/
spec
\/
v1
\n
/
},
{
name
:
'
Git LFS header
'
,
value
:
/^version https:
\/\/
git-lfs.github.com
\/
spec
\/
v1
\n
/
},
{
name
:
'
Git LFS header
'
,
value
:
/^oid sha256:/
},
{
name
:
'
Git LFS header
'
,
value
:
/^oid sha256:/
},
...
@@ -1358,6 +1361,7 @@ view.ModelFactoryService = class {
...
@@ -1358,6 +1361,7 @@ view.ModelFactoryService = class {
{
name
:
'
StringIntLabelMapProto data
'
,
value
:
/^item
\s
*{
\r?\n\s
*id:/
},
{
name
:
'
StringIntLabelMapProto data
'
,
value
:
/^item
\s
*{
\r?\n\s
*id:/
},
{
name
:
'
StringIntLabelMapProto data
'
,
value
:
/^item
\s
*{
\r?\n\s
*name:/
},
{
name
:
'
StringIntLabelMapProto data
'
,
value
:
/^item
\s
*{
\r?\n\s
*name:/
},
{
name
:
'
Python source code
'
,
value
:
/^
\s
*import sys, types, os;/
}
{
name
:
'
Python source code
'
,
value
:
/^
\s
*import sys, types, os;/
}
// cSpell:enable
];
];
const
text
=
new
TextDecoder
().
decode
(
buffer
.
subarray
(
0
,
Math
.
min
(
1024
,
buffer
.
length
)));
const
text
=
new
TextDecoder
().
decode
(
buffer
.
subarray
(
0
,
Math
.
min
(
1024
,
buffer
.
length
)));
for
(
const
item
of
list
)
{
for
(
const
item
of
list
)
{
...
...
frontend/packages/server/ecosystem.config.d.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:words autorestart
declare
type
App
=
{
declare
type
App
=
{
name
:
string
;
name
:
string
;
script
:
string
;
script
:
string
;
...
...
frontend/packages/server/global.d.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare
module
'
@visualdl/core/builder/environment
'
;
declare
module
'
@visualdl/core/builder/environment
'
;
frontend/packages/server/index.ts
浏览文件 @
51776d26
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */
/* eslint-disable no-console */
import
{
config
}
from
'
dotenv
'
;
import
{
config
}
from
'
dotenv
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录