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
张凯
2 years ago
Commit
7d72204594eb7fbf89946b37f103b809b6d95ac1
1 parent
8dca09f7
chore:收藏夹功能迁移
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
28 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/favorites.js
hg-monitor-web-base/src/main/resources/static/src/views/favorites/index.html
hg-monitor-web-base/src/main/resources/static/src/controller/favorites.js
View file @
7d72204
...
...
@@ -267,7 +267,7 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
var
domId
=
$
(
this
).
attr
(
"id"
);
ids
.
push
(
domId
);
});
return
!
common
.
hasPermission
(
id
,
ids
);
return
$
.
inArray
(
id
,
ids
);
}
//绑定下拉搜索事件
...
...
@@ -414,10 +414,10 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
elem
:
'#favoriteListTable'
,
id
:
'favoriteListTable'
,
toolbar
:
'<div class="warn-btns"><button id="favorites_cols_save" class="layui-btn layui-btn-normal layui-btn-sm hide" style="float: right;">保存列顺序</button></div>'
//开启头部工具栏,并为其绑定左侧模板
,
defaultToolbar
:
[
'filter'
]
,
// toolbar: '<div class="warn-btns"><button id="favorites_cols_save" class="layui-btn layui-btn-normal layui-btn-sm hide" style="float: right;">保存列顺序</button></div>' //开启头部工具栏,并为其绑定左侧模板
// ,
// defaultToolbar: ['filter']
// ,
url
:
common
.
domainName
+
'/api-web/favorites/res/noList'
,
where
:
{
...
...
@@ -452,13 +452,14 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
var
resType
=
$
(
this
).
data
(
"restype"
);
var
resTypeName
=
$
(
this
).
data
(
"restypename"
);
var
ip
=
$
(
this
).
data
(
"ip"
)
?
$
(
this
).
data
(
"ip"
)
:
""
;
var
resName
=
$
(
this
).
data
(
"name"
)
?
$
(
this
).
data
(
"name"
)
+
" | "
:
""
;
var
pingEnable
=
$
(
this
).
data
(
"pingenable"
);
if
(
pingEnable
==
'2'
)
{
commonDetail
.
openNewWin
(
'template/detail/pingIndex'
,
resName
+
resTypeName
+
' | '
+
ip
,
{
'resId'
:
resId
},
false
);
}
else
{
commonDetail
.
openDetail
(
resId
,
resType
,
resName
+
ip
);
}
var
resName
=
$
(
this
).
data
(
"name"
)
?
$
(
this
).
data
(
"name"
)
:
""
;
// var pingEnable = $(this).data("pingenable");
// if (pingEnable == '2') {
// commonDetail.openNewWin('template/detail/pingIndex', resName + resTypeName + ' | ' + ip, {'resId': resId}, false);
// } else {
// commonDetail.openDetail(resId, resType, resName + ip);
// }
showResDetail
(
resId
,
resType
,
resName
);
});
//触发拖动列事件,参数为保存按钮的id
...
...
@@ -479,6 +480,13 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
});
});
}
//查看详情页
function
showResDetail
(
resId
,
resType
,
resName
){
window
.
parent
.
postMessage
({
type
:
'resDetail'
,
message
:
{
'params'
:{
'resId'
:
resId
,
'resType'
:
resType
},
'title'
:
resName
}
},
'*'
)
}
//刷新表格
function
reloadFariteResList
(
favId
)
{
...
...
hg-monitor-web-base/src/main/resources/static/src/views/favorites/index.html
View file @
7d72204
...
...
@@ -20,14 +20,6 @@
placeholder=
"关键字,回车搜索"
type=
"text"
>
</div>
</div>
<div
class=
"layui-inline favorite-cards"
>
<div
class=
"layui-input-inline layui-input-inline--long"
>
<button
type=
"button"
id=
"fav_keyword"
class=
"layui-btn layui-btn-normal layui-btn-normal"
>
搜索
</button>
</div>
</div>
<div
class=
"layui-inline favorite-reslist"
>
<div
class=
"layui-input-inline layui-input-inline--long"
>
<input
autocomplete=
"off"
class=
"layui-input"
id=
"keyword_id"
name=
"keyword_id"
...
...
@@ -62,14 +54,6 @@
</select>
</div>
</div>
<div
class=
"layui-inline favorite-reslist"
>
<div
class=
"layui-input-inline layui-input-inline--long"
style=
"margin-top: -4px;"
>
<button
type=
"button"
id=
"keyword"
class=
"layui-btn layui-btn-normal layui-btn-normal"
>
搜索
</button>
</div>
</div>
</div>
</form>
<div
class=
"favorites-header-btngroup"
>
...
...
Please
register
or
login
to post a comment