Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
鲁尚清
3 years ago
Commit
95e367aa780470a4a5edfb933e206cb4a83e531a
1 parent
66d474dd
【无】weblogic控制台的详情页面迁移
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
232 additions
and
0 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/commonDetail.js
hg-monitor-web-base/src/main/resources/static/src/controller/middleware_weblogicconsole.js
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/middleware_weblogicconsole.html
hg-monitor-web-base/src/main/resources/static/src/controller/commonDetail.js
View file @
95e367a
...
...
@@ -3351,6 +3351,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
}
else
if
(
res
.
resType
===
'NETSAFE_FIREWALL'
)
{
var
str
=
'NETSAFE_FIREWALL_'
+
res
.
provider
;
url
=
common
.
detailPath
(
str
,
res
.
resId
)
}
else
if
(
res
.
resType
==
"MIDDLEWARE_WEBLOGIC"
&&
!
res
.
parentId
)
{
url
=
common
.
detailPath
(
"MIDDLEWARE_WEBLOGICCONSOLE"
);
}
else
{
url
=
common
.
detailPath
(
res
.
resType
,
res
.
resId
,
protocol
,
res
);
}
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/middleware_weblogicconsole.js
0 → 100644
View file @
95e367a
layui
.
define
([
'tree'
,
'laypage'
,
'laytpl'
,
'commonDetail'
,
'common'
,
'table'
,
'sessions'
,
'commonCols'
],
function
(
exports
)
{
var
commonDetail
=
layui
.
commonDetail
;
var
common
=
layui
.
common
;
var
table
=
layui
.
table
;
var
commonCols
=
layui
.
commonCols
;
//对外暴露的接口
exports
(
'middleware_weblogicconsole'
,
function
(
data
)
{
var
sessions
=
layui
.
sessions
;
var
access_token
=
sessions
.
getToken
().
access_token
;
var
resid
=
''
;
var
showFlag
=
common
.
getUrlParam
(
"show"
);
if
(
showFlag
&&
showFlag
==
'0'
)
{
resid
=
common
.
getUrlParam
(
"resId"
);
}
else
{
resid
=
data
.
resId
;
}
commonDetail
.
bindTips
();
// 控制台基本信息
var
consolejbxxkpiId
=
"KPIE13DD9A3,KPIF74D9D2B"
;
reloadConsoleInfo
();
//渲染控制台页面
function
reloadConsoleInfo
()
{
commonDetail
.
renderResServerState
(
"weblogicconsole_health_state"
,
resid
,
"KPI4DA976AF"
);
//基本信息
commonDetail
.
renderText
(
"weblogicconsole_jbxx"
,
resid
,
consolejbxxkpiId
);
//活动告警
commonDetail
.
renderActiveAlarms
(
"weblogicconsole_alarmTable"
,
resid
);
// 服务列表
var
sortKey
=
''
;
var
cols
=
commonCols
.
resTypeCls
[
'MIDDLEWARE_WEBLOGIC'
];
// logInfo('logInfoViewConsole',5);
//获取配置的列
common
.
getTableCols
({
domId
:
'indexResListTable'
,
moduleId
:
'indexReslist'
,
resType
:
'MIDDLEWARE_WEBLOGIC'
},
function
(
retCols
)
{
if
(
retCols
)
{
cols
=
retCols
;
}
table
.
render
({
elem
:
'#weblogicconsole_childrenTable'
,
url
:
common
.
domainName
+
'/api-web/home/res-list/MIDDLEWARE_WEBLOGIC'
,
where
:
{
access_token
:
access_token
,
parentId
:
resid
}
,
height
:
'auto'
,
cellMinWidth
:
50
,
page
:
{
layout
:
[
'count'
,
'prev'
,
'page'
,
'next'
,
'limit'
,
'skip'
]
,
theme
:
'#1E9FFF'
}
,
autoSort
:
false
,
limit
:
5
,
limits
:
[
5
,
10
,
20
,
30
,
40
,
50
]
,
cols
:
[
cols
]
,
done
:
function
(
res
)
{
commonCols
.
colsClickEvent
();
table
.
on
(
'sort(weblogicconsole_childrenTable)'
,
function
(
obj
)
{
//有些时候,你可能需要根据当前排序的字段,重新向服务端发送请求,从而实现服务端排序,如:
if
(
obj
.
type
!=
null
)
{
sortKey
=
obj
.
field
+
' '
+
obj
.
type
;
}
else
{
sortKey
=
''
;
}
reloadTable
();
});
}
});
function
reloadTable
()
{
table
.
reload
(
'weblogicconsole_childrenTable'
,
{
page
:
{
curr
:
1
}
,
where
:
{
//请求参数(注意:这里面的参数可任意定义,并非下面固定的格式)
access_token
:
access_token
,
sortKey
:
sortKey
,
parentId
:
resid
}
})
}
});
//日志查看,内容取自ES
function
logInfo
(
target
,
size
)
{
table
.
render
({
elem
:
'#'
+
target
,
url
:
common
.
domainName
+
'/api-web/log/getLogInfo'
,
where
:
{
access_token
:
access_token
,
resId
:
resid
,
startTime
:
''
,
endTime
:
''
},
parseData
:
function
(
res
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
length
===
0
)
{
$
(
'#'
+
target
).
parent
().
parent
().
hide
();
}
}
,
height
:
'auto'
,
cellMinWidth
:
50
,
page
:
false
,
autoSort
:
false
,
limit
:
size
,
cols
:
[[
{
field
:
'dbTimeStr'
,
title
:
'时间戳'
,
width
:
200
,
align
:
'center'
},
{
field
:
'severityLabel'
,
title
:
'日志级别'
,
width
:
150
,
align
:
'center'
},
{
field
:
'message'
,
title
:
'日志内容'
,
minWidth
:
350
,
align
:
'left'
},
{
field
:
'timestamp'
,
title
:
'采集时间'
,
width
:
200
,
align
:
'center'
},
]]
});
//更多日志
$
(
"#logInfoViewConsoleMore"
).
unbind
(
"click"
).
on
(
"click"
,
function
()
{
layer
.
open
({
title
:
[
'更多日志'
,
'font-size:18px;'
],
type
:
1
,
area
:
[
'90%'
,
'690px'
],
content
:
$
(
'#logViewPgaeConsoleMore'
).
html
(),
success
:
function
()
{
logInfo
(
'logViewPageConsole'
,
100
);
}
});
});
}
}
//定时任务
var
timer
=
setInterval
(
function
()
{
reloadConsoleInfo
();
},
commonDetail
.
timerTime
);
commonDetail
.
detailTimer
.
push
(
timer
);
});
});
\ No newline at end of file
...
...
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/middleware_weblogicconsole.html
0 → 100644
View file @
95e367a
<!--weblogic中间件详细页面-->
<style>
.detail-chart-left
.chart-left-box
{
border
:
1px
solid
#eaeaea
;
text-align
:
center
;
margin-top
:
15px
;
margin-left
:
19px
;
}
.detail-chart-left
.chart-left-box
:last-child
{
margin-bottom
:
5px
;
}
.detail-chart-left
.chart-left-box
p
:first-child
{
font-size
:
15px
;
font-weight
:
bold
;
line-height
:
31px
;
}
.detail-chart-left
.chart-left-box
p
:last-child
{
line-height
:
18px
;
}
.chart-bottom-infobox
{
text-align
:
center
;
width
:
84%
;
float
:
left
;
/*text-decoration: underline;*/
}
</style>
<article
class=
"page-container template"
>
<div
class=
"page-panel"
>
<div
class=
"main"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
基本信息
<i
data-id=
"weblogicconsole_jbxx"
class=
"iconfont detail_base_info"
>

</i></h5>
<ul
class=
"info-table"
id=
"weblogicconsole_jbxx"
style=
"height: auto"
></ul>
</div>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
服务列表
</h5>
<div
id=
"weblogicconsole_childrenTable"
lay-filter=
"weblogicconsole_childrenTable"
></div>
</div>
</div>
<!--<div class="lay-row logInfo">
<div class="lay-row-item">
<h5 class="lay-row-title">日志信息<span id="logInfoViewConsoleMore" class="layui-table-link">更多</span></h5>
<div id="logInfoViewConsole"></div>
</div>
</div>-->
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
实时告警动态
</h5>
<div
id=
"weblogicconsole_alarmTable"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
</article>
<script
type=
"text/html"
id=
"logViewPgaeConsoleMore"
>
<
article
class
=
"page-container"
>
<
div
class
=
"page-panel"
>
<
div
class
=
"main"
>
<
div
class
=
"layui-card"
>
<
div
class
=
"layui-card-body moreLog"
>
<
table
id
=
"logViewPageConsole"
><
/table
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/article
>
</script>
<textarea
id=
"middleware_weblogicconsole_param_id"
style=
"display: none;"
>
{{d}}
</textarea>
<script>
layui
.
use
(
'middleware_weblogicconsole'
,
function
(
fn
)
{
var
$
=
layui
.
$
;
var
parm
=
$
(
"#middleware_weblogicconsole_param_id"
).
val
();
if
(
parm
.
indexOf
(
'{{d'
)
!=
-
1
){
fn
();
}
else
{
fn
(
JSON
.
parse
(
parm
));
}
});
</script>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment