Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
f35c02b3
Commit
f35c02b3
authored
Dec 19, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改列表页,显示可连接状态
parent
71750970
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
asset_list.html
apps/assets/templates/assets/asset_list.html
+8
-7
No files found.
apps/assets/templates/assets/asset_list.html
View file @
f35c02b3
...
...
@@ -92,8 +92,7 @@
<th
class=
"text-center"
>
{% trans 'Hostname' %}
</th>
<th
class=
"text-center"
>
{% trans 'IP' %}
</th>
<th
class=
"text-center"
>
{% trans 'Hardware' %}
</th>
<th
class=
"text-center"
>
{% trans 'Active' %}
</th>
{#
<th
class=
"text-center"
>
{% trans 'Reachable' %}
</th>
#}
<th
class=
"text-center"
>
{% trans 'Reachable' %}
</th>
<th
class=
"text-center"
>
{% trans 'Action' %}
</th>
</tr>
</thead>
...
...
@@ -163,10 +162,12 @@ function initTable() {
$
(
td
).
html
(
rowData
.
hardware_info
)
}},
{
targets
:
4
,
createdCell
:
function
(
td
,
cellData
)
{
if
(
!
cellData
)
{
$
(
td
).
html
(
'<i class="fa fa-times text-danger"></i>'
)
if
(
cellData
===
1
){
$
(
td
).
html
(
'<i class="fa fa-circle text-navy"></i>'
)
}
else
if
(
cellData
===
0
)
{
$
(
td
).
html
(
'<i class="fa fa-circle text-danger"></i>'
)
}
else
{
$
(
td
).
html
(
'<i class="fa fa-c
heck text-navy
"></i>'
)
$
(
td
).
html
(
'<i class="fa fa-c
ircle text-warning
"></i>'
)
}
}},
...
...
@@ -179,8 +180,8 @@ function initTable() {
ajax_url
:
'{% url "api-assets:asset-list" %}'
,
columns
:
[
{
data
:
"id"
},
{
data
:
"hostname"
},
{
data
:
"ip"
},
{
data
:
"cpu_cores"
},
{
data
:
"is_active"
,
orderable
:
false
},
{
data
:
"id"
,
orderable
:
false
}
{
data
:
"cpu_cores"
},
{
data
:
"
connectivity"
},
{
data
:
"
id"
,
orderable
:
false
}
],
op_html
:
$
(
'#actions'
).
html
()
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment