Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
skywalking-rocketbot-ui
提交
163059e8
S
skywalking-rocketbot-ui
项目概览
apache
/
skywalking-rocketbot-ui
通知
17
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skywalking-rocketbot-ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
163059e8
编写于
5月 29, 2020
作者:
Q
Qiuxia Fan
提交者:
GitHub
5月 29, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bugfix: dashboard common selectors (#301)
* fix: dashboard common selectors * fix: typo * fix: name
上级
6295bab0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
15 deletion
+10
-15
src/store/modules/dashboard/dashboard-option.ts
src/store/modules/dashboard/dashboard-option.ts
+8
-4
src/views/components/dashboard/dashboard-item.vue
src/views/components/dashboard/dashboard-item.vue
+2
-11
未找到文件。
src/store/modules/dashboard/dashboard-option.ts
浏览文件 @
163059e8
...
...
@@ -30,6 +30,7 @@ export interface State {
instances
:
any
[];
currentInstance
:
any
;
keywordService
:
string
;
updateDashboard
:
string
;
}
const
initState
:
State
=
{
...
...
@@ -42,6 +43,7 @@ const initState: State = {
databases
:
[],
currentDatabase
:
{},
keywordService
:
localStorage
.
getItem
(
'
keywordServiceName
'
)
||
''
,
updateDashboard
:
''
,
};
// getters
...
...
@@ -60,6 +62,7 @@ const mutations: MutationTree<State> = {
},
[
types
.
SET_CURRENT_SERVICE
](
state
:
State
,
service
:
any
)
{
state
.
currentService
=
service
;
state
.
updateDashboard
=
service
;
},
[
types
.
SET_ENDPOINTS
](
state
:
State
,
data
:
any
)
{
state
.
endpoints
=
data
;
...
...
@@ -73,6 +76,7 @@ const mutations: MutationTree<State> = {
},
[
types
.
SET_CURRENT_ENDPOINT
](
state
:
State
,
endpoint
:
any
)
{
state
.
currentEndpoint
=
endpoint
;
state
.
updateDashboard
=
endpoint
;
},
[
types
.
SET_INSTANCES
](
state
:
State
,
data
:
any
)
{
state
.
instances
=
data
;
...
...
@@ -80,12 +84,13 @@ const mutations: MutationTree<State> = {
state
.
currentInstance
=
{};
return
;
}
if
(
!
state
.
currentInstance
.
key
&&
data
.
length
)
{
if
(
(
!
state
.
currentInstance
.
key
&&
data
.
length
)
||
!
state
.
instances
.
includes
(
state
.
currentInstance
)
)
{
state
.
currentInstance
=
data
[
0
];
}
},
[
types
.
SET_CURRENT_INSTANCE
](
state
:
State
,
instance
:
any
)
{
state
.
currentInstance
=
instance
;
state
.
updateDashboard
=
instance
;
},
[
types
.
SET_DATABASES
](
state
:
State
,
data
:
any
)
{
state
.
databases
=
data
;
...
...
@@ -172,9 +177,8 @@ const actions: ActionTree<State, any> = {
return
;
}
context
.
commit
(
'
SET_CURRENT_SERVICE
'
,
params
.
service
);
context
.
dispatch
(
'
MIXHANDLE_GET_OPTION
'
,
{
...
params
,
compType
:
'
service
'
}).
then
(()
=>
{
context
.
dispatch
(
'
RUN_EVENTS
'
,
{},
{
root
:
true
});
});
context
.
dispatch
(
'
GET_SERVICE_ENDPOINTS
'
,
{});
context
.
dispatch
(
'
GET_SERVICE_INSTANCES
'
,
{
duration
:
params
.
duration
});
},
SELECT_ENDPOINT
(
context
:
{
commit
:
Commit
;
dispatch
:
Dispatch
;
state
:
any
;
rootState
:
any
},
params
:
any
)
{
context
.
commit
(
'
SET_CURRENT_ENDPOINT
'
,
params
.
endpoint
);
...
...
src/views/components/dashboard/dashboard-item.vue
浏览文件 @
163059e8
...
...
@@ -41,7 +41,6 @@ limitations under the License. -->
</div>
</div>
<rk-sidebox
class=
"instance-dependency"
width=
"70%"
:fixed=
"true"
:title=
"$t('editConfig')"
...
...
@@ -237,16 +236,8 @@ limitations under the License. -->
}
}
@
Watch
(
'
rocketOption.currentInstance
'
)
private
watchCurrentInstance
()
{
this
.
chartRender
();
}
@
Watch
(
'
rocketOption.currentEndpoint
'
)
private
watchCurrentEndpoint
()
{
this
.
chartRender
();
}
@
Watch
(
'
rocketOption.currentDatabase
'
)
private
watchCurrentDatabase
()
{
@
Watch
(
'
rocketOption.updateDashboard
'
)
private
watchCurrentSelectors
()
{
this
.
chartRender
();
}
@
Watch
(
'
durationTime
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录