Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
224cfb39
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
224cfb39
编写于
1月 02, 2018
作者:
V
vlin17
提交者:
Jiangtao Hu
1月 02, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dreamview: implemented task panel lock
上级
c5798275
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
78 addition
and
32 deletion
+78
-32
modules/dreamview/frontend/dist/app.bundle.js
modules/dreamview/frontend/dist/app.bundle.js
+1
-1
modules/dreamview/frontend/dist/app.bundle.js.map
modules/dreamview/frontend/dist/app.bundle.js.map
+1
-1
modules/dreamview/frontend/src/components/Tasks/Others.js
modules/dreamview/frontend/src/components/Tasks/Others.js
+12
-4
modules/dreamview/frontend/src/components/Tasks/QuickStart.js
...les/dreamview/frontend/src/components/Tasks/QuickStart.js
+30
-19
modules/dreamview/frontend/src/components/Tasks/index.js
modules/dreamview/frontend/src/components/Tasks/index.js
+19
-3
modules/dreamview/frontend/src/styles/main.scss
modules/dreamview/frontend/src/styles/main.scss
+15
-4
未找到文件。
modules/dreamview/frontend/dist/app.bundle.js
浏览文件 @
224cfb39
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
modules/dreamview/frontend/dist/app.bundle.js.map
浏览文件 @
224cfb39
此差异已折叠。
点击以展开。
modules/dreamview/frontend/src/components/Tasks/Others.js
浏览文件 @
224cfb39
...
...
@@ -8,33 +8,41 @@ import WS from "store/websocket";
export
default
class
Others
extends
React
.
Component
{
render
()
{
const
{
options
,
enableHMIButtonsOnly
}
=
this
.
props
.
store
;
const
{
isPanelLocked
,
toggleLock
}
=
this
.
props
;
const
disablePanel
=
enableHMIButtonsOnly
||
isPanelLocked
;
return
(
<
div
className
=
"
others card
"
>
<
div
className
=
"
card-header
"
><
span
>
Others
<
/span></
div
>
<
div
className
=
"
card-content-column
"
>
<
button
disabled
=
{
enableHMIButtonsOnly
}
<
button
disabled
=
{
disablePanel
}
onClick
=
{()
=>
{
WS
.
resetBackend
();
}}
>
Reset
Backend
Data
<
/button
>
<
button
disabled
=
{
enableHMIButtonsOnly
}
<
button
disabled
=
{
disablePanel
}
onClick
=
{()
=>
{
WS
.
dumpMessages
();
}}
>
Dump
Message
<
/button
>
<
CheckboxItem
id
=
{
"
showVideo
"
}
title
=
{
"
Camera Sensor
"
}
isChecked
=
{
options
.
showVideo
}
disabled
=
{
enableHMIButtonsOnly
}
disabled
=
{
disablePanel
}
onClick
=
{()
=>
{
options
.
toggleSideBar
(
"
showVideo
"
);
}}
/
>
<
CheckboxItem
id
=
{
"
showPNCMonitor
"
}
title
=
{
"
PNC Monitor
"
}
isChecked
=
{
options
.
showPNCMonitor
}
disabled
=
{
enableHMIButtonsOnly
}
disabled
=
{
disablePanel
}
onClick
=
{()
=>
{
this
.
props
.
store
.
handleSideBarClick
(
'
showPNCMonitor
'
);
}}
/
>
<
CheckboxItem
id
=
{
"
panelLock
"
}
title
=
{
"
Lock Task Panel
"
}
isChecked
=
{
isPanelLocked
}
disabled
=
{
false
}
onClick
=
{
toggleLock
}
/
>
<
/div
>
<
/div
>
);
...
...
modules/dreamview/frontend/src/components/Tasks/QuickStart.js
浏览文件 @
224cfb39
import
React
from
"
react
"
;
import
{
inject
,
observer
}
from
"
mobx-react
"
;
import
classNames
from
"
classnames
"
;
import
WS
from
"
store/websocket
"
;
class
CommandGroup
extends
React
.
Component
{
render
()
{
const
{
name
,
commands
}
=
this
.
props
;
const
{
name
,
commands
,
disabled
,
extraCommandClass
,
extraButtonClass
}
=
this
.
props
;
const
entries
=
Object
.
keys
(
commands
).
map
((
key
)
=>
{
return
<
button
key
=
{
key
}
onClick
=
{
commands
[
key
]}
>
{
key
}
<
/button>
;
return
<
button
className
=
{
extraButtonClass
}
disabled
=
{
disabled
}
key
=
{
key
}
onClick
=
{
commands
[
key
]}
>
{
key
}
<
/button>
;
});
const
text
=
name
?
`
${
name
}
:`
:
''
;
const
text
=
name
?
<
span
className
=
"
name
"
>
{
`
${
name
}
:`
}
<
/span> : null
;
return
(
<
div
className
=
"
command-group
"
>
<
span
className
=
"
name
"
>
{
text
}
<
/span
>
<
div
className
=
{
classNames
(
"
command-group
"
,
extraCommandClass
)}
>
{
text
}
{
entries
}
<
/div
>
);
...
...
@@ -27,9 +33,6 @@ export default class QuickStarter extends React.Component {
super
(
props
);
this
.
rtKRecord
=
{
"
Setup
"
:
()
=>
{
WS
.
executeToolCommand
(
"
rtk_record_replay
"
,
"
setup
"
);
},
"
Start
"
:
()
=>
{
WS
.
executeToolCommand
(
"
rtk_record_replay
"
,
"
start_recorder
"
);
},
...
...
@@ -39,9 +42,6 @@ export default class QuickStarter extends React.Component {
};
this
.
rtkReplay
=
{
"
Setup
"
:
()
=>
{
WS
.
executeToolCommand
(
"
rtk_record_replay
"
,
"
setup
"
);
},
"
Start
"
:
()
=>
{
WS
.
executeToolCommand
(
"
rtk_record_replay
"
,
"
start_player
"
);
},
...
...
@@ -50,13 +50,10 @@ export default class QuickStarter extends React.Component {
},
};
this
.
auto
=
{
this
.
setup
=
{
"
Setup
"
:
()
=>
{
WS
.
executeModeCommand
(
"
start
"
);
},
"
Start Auto
"
:
()
=>
{
WS
.
changeDrivingMode
(
"
COMPLETE_AUTO_DRIVE
"
);
},
};
this
.
reset
=
{
...
...
@@ -64,21 +61,35 @@ export default class QuickStarter extends React.Component {
WS
.
executeModeCommand
(
"
stop
"
);
},
};
this
.
auto
=
{
"
Start Auto
"
:
()
=>
{
WS
.
changeDrivingMode
(
"
COMPLETE_AUTO_DRIVE
"
);
},
};
}
render
()
{
const
{
hmi
}
=
this
.
props
.
store
;
const
{
isPanelLocked
}
=
this
.
props
;
return
(
<
div
className
=
"
card
"
>
<
div
className
=
"
card-header
"
><
span
>
Quick
Start
<
/span></
div
>
<
div
className
=
"
card-content-column
"
>
<
CommandGroup
name
=
"
Auto
"
commands
=
{
this
.
auto
}
/
>
<
CommandGroup
name
=
"
Reset
"
commands
=
{
this
.
reset
}
/
>
<
CommandGroup
disabled
=
{
isPanelLocked
}
commands
=
{
this
.
setup
}
/
>
<
CommandGroup
disabled
=
{
isPanelLocked
}
commands
=
{
this
.
reset
}
/
>
<
CommandGroup
disabled
=
{
false
}
commands
=
{
this
.
auto
}
extraButtonClass
=
"
start-auto-button
"
extraCommandClass
=
"
start-auto-command
"
/>
{
hmi
.
showRTKCommands
&&
<
CommandGroup
name
=
"
Record
"
commands
=
{
this
.
rtKRecord
}
/>
}
<
CommandGroup
name
=
"
Record
"
disabled
=
{
isPanelLocked
}
commands
=
{
this
.
rtKRecord
}
/>
}
{
hmi
.
showRTKCommands
&&
<
CommandGroup
name
=
"
Replay
"
commands
=
{
this
.
rtkReplay
}
/>
}
<
CommandGroup
name
=
"
Replay
"
disabled
=
{
isPanelLocked
}
commands
=
{
this
.
rtkReplay
}
/>
}
<
/div
>
<
/div
>
);
...
...
modules/dreamview/frontend/src/components/Tasks/index.js
浏览文件 @
224cfb39
...
...
@@ -6,12 +6,28 @@ import Delay from "components/Tasks/Delay";
import
Console
from
"
components/Tasks/Console
"
;
export
default
class
Tasks
extends
React
.
Component
{
render
()
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
isPanelLocked
:
false
,
};
this
.
toggleLock
=
this
.
toggleLock
.
bind
(
this
);
}
toggleLock
()
{
this
.
setState
({
isPanelLocked
:
!
this
.
state
.
isPanelLocked
,
});
}
render
()
{
return
(
<
div
className
=
"
tasks
"
>
<
QuickStart
/>
<
Others
/>
<
QuickStart
isPanelLocked
=
{
this
.
state
.
isPanelLocked
}
/
>
<
Others
toggleLock
=
{
this
.
toggleLock
}
isPanelLocked
=
{
this
.
state
.
isPanelLocked
}
/
>
<
Delay
/>
<
Console
/>
<
/div
>
...
...
modules/dreamview/frontend/src/styles/main.scss
浏览文件 @
224cfb39
...
...
@@ -869,9 +869,10 @@ body {
flex-flow
:
row
nowrap
;
justify-content
:
flex-start
;
flex
:
1
1
auto
;
flex
:
1
1
0
;
min-height
:
45px
;
m
ax-height
:
85
px
;
m
in-width
:
130
px
;
.name
{
width
:
40px
;
...
...
@@ -879,8 +880,17 @@ body {
}
}
.start-auto-command
{
flex
:
2
2
0
;
.start-auto-button
{
max-height
:
unset
;
}
}
.others
{
min-width
:
165px
;
max-width
:
260px
;
}
.delay
{
...
...
@@ -912,10 +922,11 @@ body {
}
button
{
flex
:
1
1
auto
;
flex
:
1
1
0
;
margin
:
5px
;
border
:
0px
;
min-width
:
75px
;
min-height
:
40px
;
max-height
:
60px
;
...
...
@@ -935,7 +946,7 @@ body {
}
button
:active
{
background
:
rgba
(
21
,
30
,
27
,
0
.6
);
background
:
rgba
(
35
,
51
,
45
,
0
.6
);
}
button
:disabled
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录