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
abe09e2a
Commit
abe09e2a
authored
8 years ago
by
江世峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asset:update assets_list by tag
parent
29b3ef70
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
150 additions
and
115 deletions
+150
-115
asset_create.html
apps/assets/templates/assets/asset_create.html
+2
-1
asset_group_create.html
apps/assets/templates/assets/asset_group_create.html
+10
-3
asset_list.html
apps/assets/templates/assets/asset_list.html
+90
-101
asset_modal_list.html
apps/assets/templates/assets/asset_modal_list.html
+13
-3
asset_tag_create.html
apps/assets/templates/assets/asset_tag_create.html
+9
-3
views.py
apps/assets/views.py
+6
-3
jumpserver.css
apps/static/css/jumpserver.css
+18
-0
_base_list.html
apps/templates/_base_list.html
+2
-1
No files found.
apps/assets/templates/assets/asset_create.html
View file @
abe09e2a
...
@@ -44,7 +44,8 @@
...
@@ -44,7 +44,8 @@
$
(
'.select2'
).
select2
();
$
(
'.select2'
).
select2
();
$
(
"#tags"
).
select2
({
$
(
"#tags"
).
select2
({
tags
:
true
,
tags
:
true
,
maximumSelectionLength
:
8
//最多能够选择的个数
maximumSelectionLength
:
8
,
//最多能够选择的个数
closeOnSelect
:
false
});
});
})
})
...
...
This diff is collapsed.
Click to expand it.
apps/assets/templates/assets/asset_group_create.html
View file @
abe09e2a
...
@@ -10,6 +10,7 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -10,6 +10,7 @@ div.dataTables_wrapper div.dataTables_filter,
.dataTables_length
{
.dataTables_length
{
float
:
left
;
float
:
left
;
}
}
</style>
</style>
{% endblock %}
{% endblock %}
{% block content %}
{% block content %}
...
@@ -45,10 +46,16 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -45,10 +46,16 @@ div.dataTables_wrapper div.dataTables_filter,
<div
class=
"hr-line-dashed"
></div>
<div
class=
"hr-line-dashed"
></div>
<h3
class=
"widget-head-color-box"
>
用户选择的资产
</h3>
<h3
class=
"widget-head-color-box"
>
用户选择的资产
</h3>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
已选
</label>
<label
class=
"col-sm-2 control-label"
id=
"asset_on_count"
>
已选({{ assets_count }})
</label>
<div
class=
"col-sm-9"
id=
"asset_sed"
>
<div
class=
"col-sm-9"
id=
"asset_sed"
>
<input
type=
"text"
class=
" form-control"
id=
"add_asset"
value=
"{{ assets_count }}"
>
<div
class=
"form-asset-on"
id=
"add_asset"
>
<p
id=
"asset_on_p"
>
{% for asset in assets_on_list %}
<button
name=
'asset_hostname'
title=
'{{ asset.ip }}'
type=
'button'
class=
'btn btn-default btn-xs'
>
{{ asset.hostname }}
</button>
{% endfor %}
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"hr-line-dashed"
></div>
<h3
class=
"widget-head-color-box"
>
资产用户
</h3>
<h3
class=
"widget-head-color-box"
>
资产用户
</h3>
...
...
This diff is collapsed.
Click to expand it.
apps/assets/templates/assets/asset_list.html
View file @
abe09e2a
{% extends 'base.html' %}
{% extends '_base_list.html' %}
{% load static %}
{% load i18n %}
{% load i18n %}
{% load common_tags %}
{% load common_tags %}
{% block custom_head_css_js %}
{% block custom_head_css_js %}
<link
href=
"{% static "
css
/
plugins
/
dataTables
/
dataTables
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<style>
<link
href=
"{% static "
css
/
plugins
/
awesome-bootstrap-checkbox
/
awesome-bootstrap-checkbox
.
css
"
%}"
rel=
"stylesheet"
>
div
.dataTables_wrapper
div
.dataTables_filter
,
<link
href=
"{% static "
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
.dataTables_length
{
<script
src=
"{% static "
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
float
:
right
!important
;
<script
src=
"{% static "
js
/
plugins
/
dataTables
/
dataTables
.
min
.
js
"
%}"
></script>
}
.custom
{
float
:
left
;
margin-right
:
5px
;
}
</style>
{% endblock %}
{% endblock %}
{% block content_left_head %}
{% endblock %}
{% block table_search %}
{% endblock %}
{% block tags_list %}
{% block content %}
<div
class=
"ydxbd"
id=
"ydxbd"
style=
"display: block;"
>
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-tools"
>
<div
style=
"float:left"
>
<a
href=
"{% url 'assets:asset-create' %}"
class=
"btn btn-sm btn-primary "
>
{% trans "Create asset" %}
</a>
</div>
<button
class=
"btn btn-sm btn-primary"
id=
"zksx"
onclick=
"tagShow()"
>
标签
</button>
<a
class=
"collapse-link"
><i
class=
"fa fa-chevron-up"
></i></a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
><i
class=
"fa fa-wrench"
></i></a>
<a
class=
"close-link"
><i
class=
"fa fa-times"
></i></a>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
""
>
<div
class=
"ydxbd"
id=
"ydxbd"
style=
"display: none;"
>
<div>
<div>
<p
id=
"tags_p"
>
<p
id=
"tags_p"
>
{% for tag in tag_list %}
{% for tag in tag_list %}
...
@@ -41,83 +34,73 @@
...
@@ -41,83 +34,73 @@
<span
class=
"mar"
>
<span
class=
"mar"
>
<strong>
{{ tag.1}}
</strong>
({{ tag.2 }})
<strong>
{{ tag.1}}
</strong>
({{ tag.2 }})
</span></a>
</span></a>
{% endfor %}
{% endfor %}
<a
href=
"{% url 'assets:asset-list' %}"
class=
"btn btn-sm btn-outline btn-default "
>
移除选择
</a>
<a
href=
"{% url 'assets:asset-list' %}"
class=
"btn btn-sm btn-outline btn-default "
>
移除选择
</a>
</p>
</p>
</div>
</div>
</div>
</div>
{% block content_left_head %}{% endblock %}
{% block table_search %}{% endblock %}
</div>
{% block table_container %}
<table
aria-describedby=
"editable_info"
role=
"grid"
class=
"table table-striped table-bordered table-hover dataTable"
id=
"editable"
>
<thead>
<tr>
<th
class=
"text-center"
><input
type=
"checkbox"
id=
"check_all"
onclick=
"checkAll()"
></th>
<th
class=
"text-center"
><a
href=
"{% url 'assets:asset-list' %}?sort=hostname"
>
{% trans 'Hostname' %}
</a></th>
<th
class=
"text-center"
><a
href=
"{% url 'assets:asset-list' %}?sort=username"
>
{% trans 'IP' %}
</a></th>
<th
class=
"text-center"
>
{% trans 'Port' %}
</th>
<th
class=
"text-center"
>
{% trans 'Type' %}
</th>
<th
class=
"text-center"
>
{% trans 'Hardware' %}
</th>
<th
class=
"text-center"
>
{% trans 'Valid' %}
</th>
<th
class=
"text-center"
></th>
</tr>
</thead>
<tbody>
{% for asset in asset_list %}
<tr
class=
"gradeX"
name=
"oAssets"
>
<td
class=
"text-center"
><input
type=
"checkbox"
name=
"checked"
value=
"{{ asset.id }}"
></td>
<td
class=
"text-center"
><a
href=
"{% url 'assets:asset-detail' pk=asset.id %}"
>
{{ asset.hostname }}
</a></td>
<td
class=
"text-center"
>
{{ asset.ip }}
</td>
<td
class=
"text-center"
>
{{ asset.port }}
</td>
<td
class=
"text-center"
>
{{ asset.type }}
</td>
<td
class=
"text-center"
>
{{ asset.cpu }} {{ asset.memory }} {{ asset.disk }}
</td>
<td
class=
"text-center"
>
{% if asset.is_valid.0 %}
<i
class=
"fa fa-check text-navy"
></i>
{% else %}
<i
class=
"fa fa-times text-danger"
></i>
{% endif %}
</td>
<td
class=
"text-center"
>
<a
href=
"{% url 'assets:asset-update' pk=asset.id %}"
class=
"btn btn-xs btn-info"
>
{% trans 'Update' %}
</a>
<a
href=
"{% url 'assets:asset-delete' pk=asset.id %}"
class=
"btn btn-xs btn-danger del"
>
{% trans 'Delete' %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% endblock %}
<div
class=
"row"
>
<div
class=
"col-sm-4"
>
{% block table_head %}
{# Update batch #}
<th
class=
"text-center"
><input
type=
"checkbox"
id=
"check_all"
onclick=
"checkAll()"
></th>
{% block content_bottom_left %}
<th
class=
"text-center"
><a
href=
"{% url 'assets:asset-list' %}?sort=hostname"
>
{% trans 'Hostname' %}
</a></th>
<form
id=
""
method=
"get"
action=
""
class=
" mail-search"
>
<th
class=
"text-center"
><a
href=
"{% url 'assets:asset-list' %}?sort=username"
>
{% trans 'IP' %}
</a></th>
<div
class=
"input-group"
>
<th
class=
"text-center"
>
{% trans 'Port' %}
</th>
<select
class=
"form-control m-b"
style=
"width: auto"
>
<th
class=
"text-center"
>
{% trans 'Type' %}
</th>
<option>
{% trans 'Delete selected' %}
</option>
<th
class=
"text-center"
>
{% trans 'Hardware' %}
</th>
<option>
{% trans 'Update selected' %}
</option>
<th
class=
"text-center"
>
{% trans 'Valid' %}
</th>
<option>
{% trans 'Deactive selected' %}
</option>
<th
class=
"text-center"
></th>
<option>
{% trans 'Export selected' %}
</option>
{% endblock %}
</select>
<div
class=
"input-group-btn pull-left"
style=
"padding-left: 5px;"
>
{% block table_body %}
<button
id=
'search_btn'
type=
"submit"
style=
"height: 32px;"
class=
"btn btn-sm btn-primary"
>
{% for asset in asset_list %}
{% trans 'Submit' %}
<tr
class=
"gradeX"
name=
"oAssets"
>
</button>
<td
class=
"text-center"
>
</div>
<input
type=
"checkbox"
name=
"checked"
value=
"{{ asset.id }}"
>
</div>
</td>
</form>
<td
class=
"text-center"
>
{% endblock %}
<a
href=
"{% url 'assets:asset-detail' pk=asset.id %}"
>
</div>
{{ asset.hostname }}
{% block table_pagination %}
</a>
{% include '_pagination.html' %}
</td>
{% endblock %}
<td
class=
"text-center"
>
{{ asset.ip }}
</td>
</div>
<td
class=
"text-center"
>
{{ asset.port }}
</td>
</div>
<td
class=
"text-center"
>
{{ asset.type }}
</td>
<td
class=
"text-center"
>
{{ asset.cpu }} {{ asset.memory }} {{ asset.disk }}
</td>
<td
class=
"text-center"
>
{% if asset.is_valid.0 %}
<i
class=
"fa fa-check text-navy"
></i>
{% else %}
<i
class=
"fa fa-times text-danger"
></i>
{% endif %}
</td>
<td
class=
"text-center"
>
<a
href=
"{% url 'assets:asset-update' pk=asset.id %}"
class=
"btn btn-xs btn-info"
>
{% trans 'Update' %}
</a>
<a
href=
"{% url 'assets:asset-delete' pk=asset.id %}"
class=
"btn btn-xs btn-danger del"
>
{% trans 'Delete' %}
</a>
</td>
</tr>
{% endfor %}
{% endblock %}
{% block content_bottom_left %}
<form
id=
""
method=
"get"
action=
""
class=
" mail-search"
>
<div
class=
"input-group"
>
<select
class=
"form-control m-b"
style=
"width: auto"
>
<option>
{% trans 'Delete selected' %}
</option>
<option>
{% trans 'Update selected' %}
</option>
<option>
{% trans 'Deactive selected' %}
</option>
<option>
{% trans 'Export selected' %}
</option>
</select>
<div
class=
"input-group-btn pull-left"
style=
"padding-left: 5px;"
>
<button
id=
'search_btn'
type=
"submit"
style=
"height: 32px;"
class=
"btn btn-sm btn-primary"
>
{% trans 'Submit' %}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
{% endblock %}
{% endblock %}
{% block custom_foot_js %}
{% block custom_foot_js %}
...
@@ -141,13 +124,18 @@
...
@@ -141,13 +124,18 @@
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
var
table
=
$
(
'#editable'
).
DataTable
({
var
table
=
$
(
'#editable'
).
DataTable
({
aLengthMenu
:
[[
2
,
25
,
50
,
-
1
],
[
"2"
,
"25"
,
"50"
,
"all"
]],
"aLengthMenu"
:
[[
10
,
25
,
50
,
-
1
],
[
"10"
,
"25"
,
"50"
,
"all"
]],
"iDisplayLength"
:
25
,
"aaSorting"
:
[[
7
,
"asc"
]],
"aaSorting"
:
[[
7
,
"asc"
]],
"aoColumnDefs"
:
[
{
"bSortable"
:
false
,
"aTargets"
:
[
0
]
}],
"aoColumnDefs"
:
[
{
"bSortable"
:
false
,
"aTargets"
:
[
0
]
}],
"bAutoWidth"
:
false
,
"bAutoWidth"
:
false
,
"language"
:
{
"language"
:
{
"url"
:
"/static/js/plugins/dataTables/i18n/zh-hans.json"
},
"url"
:
"/static/js/plugins/dataTables/i18n/zh-hans.json"
//"dom": '
<
lf
<
t
>
ip
>
',
},
"dom": '
<
"custom"
>
lftip
',
"initComplete": function() {
//alert( '
DataTables
has
finished
its
initialisation
.
' );
$('
#
editable_length
').before("<a href=
\
"{% url '
assets
:
asset
-
create
' %}
\
" class=
\
"btn btn-sm btn-primary custom
\
"> {% trans '
Create
asset
' %} </a> <button class='
btn
btn
-
sm
btn
-
primary
custom
' id='
zksx
' onclick='
tagShow
()
'>标签</button>");
},
columns: [
columns: [
{data: "checkbox"},
{data: "checkbox"},
{data: "id"},
{data: "id"},
...
@@ -211,4 +199,4 @@
...
@@ -211,4 +199,4 @@
};
};
};
};
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
apps/assets/templates/assets/asset_modal_list.html
View file @
abe09e2a
...
@@ -50,7 +50,8 @@
...
@@ -50,7 +50,8 @@
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
var
table
=
$
(
'#editable'
).
DataTable
({
var
table
=
$
(
'#editable'
).
DataTable
({
aLengthMenu
:
[[
2
,
25
,
50
,
-
1
],
[
"2"
,
"25"
,
"50"
,
"all"
]],
"aLengthMenu"
:
[[
10
,
25
,
50
,
-
1
],
[
"10"
,
"25"
,
"50"
,
"all"
]],
"iDisplayLength"
:
25
,
"aaSorting"
:
[[
2
,
"asc"
]],
"aaSorting"
:
[[
2
,
"asc"
]],
"aoColumnDefs"
:
[
{
"bSortable"
:
false
,
"aTargets"
:
[
0
]
}],
"aoColumnDefs"
:
[
{
"bSortable"
:
false
,
"aTargets"
:
[
0
]
}],
"bAutoWidth"
:
false
,
"bAutoWidth"
:
false
,
...
@@ -60,7 +61,7 @@ $(document).ready(function(){
...
@@ -60,7 +61,7 @@ $(document).ready(function(){
columns
:
[
columns
:
[
{
data
:
"checkbox"
},
{
data
:
"checkbox"
},
{
data
:
"id"
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"
host
name"
},
{
data
:
"ip"
},
{
data
:
"ip"
},
{
data
:
"type"
},
{
data
:
"type"
},
{
data
:
"group"
},
{
data
:
"group"
},
...
@@ -84,17 +85,26 @@ $(document).ready(function(){
...
@@ -84,17 +85,26 @@ $(document).ready(function(){
$
(
'#close-btn'
).
on
(
'click'
,
function
(){
$
(
'#close-btn'
).
on
(
'click'
,
function
(){
$
(
'#modal'
).
modal
(
'hide'
);
$
(
'#modal'
).
modal
(
'hide'
);
});
});
var
size_name
=
document
.
getElementById
(
'asset_on_count'
).
innerText
$
(
'#save-btn'
).
on
(
'click'
,
function
(){
$
(
'#save-btn'
).
on
(
'click'
,
function
(){
//
alert( table.rows('.selected').data().length +' row(s) selected' );
//
alert( table.rows('.selected').data().length +' row(s) selected' );
var
d
=
table
.
rows
(
'.selected'
).
data
();
var
d
=
table
.
rows
(
'.selected'
).
data
();
var
size
=
d
.
length
;
var
size
=
d
.
length
;
var
re
=
/
\d
+/
document
.
getElementById
(
'add_asset'
).
value
=
size
;
document
.
getElementById
(
'add_asset'
).
value
=
size
;
var
str
=
size_name
;
var
re
=
/
\d
+/g
;
document
.
getElementById
(
'asset_on_count'
).
innerText
=
str
.
replace
(
re
,
size
);
var
column2
=
table
.
rows
(
'.selected'
).
data
();
var
column2
=
table
.
rows
(
'.selected'
).
data
();
$
(
"#asset_sed"
).
find
(
"input[name='assets']"
).
remove
();
$
(
"#asset_sed"
).
find
(
"input[name='assets']"
).
remove
();
$
(
"#asset_sed"
).
find
(
"button[name='asset_hostname']"
).
remove
();
for
(
var
i
=
0
;
i
<
column2
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
column2
.
length
;
i
++
){
column2
[
i
].
checkbox
=
'<input name="checked" value="1" checked="" type="checkbox">'
;
column2
[
i
].
checkbox
=
'<input name="checked" value="1" checked="" type="checkbox">'
;
var
value
=
column2
[
i
].
id
;
var
value
=
column2
[
i
].
id
;
var
ip
=
column2
[
i
].
ip
;
var
hostname
=
column2
[
i
].
hostname
;
$
(
"#asset_sed"
).
append
(
"<input type='hidden' name='assets' value='"
+
value
+
"'>"
);
$
(
"#asset_sed"
).
append
(
"<input type='hidden' name='assets' value='"
+
value
+
"'>"
);
$
(
"#asset_on_p"
).
append
(
"<button name='asset_hostname' title='"
+
ip
+
"' type='button' class='btn btn-default btn-xs ss'>"
+
hostname
+
"</button> "
);
}
}
$
(
'#modal'
).
modal
(
'hide'
);
$
(
'#modal'
).
modal
(
'hide'
);
});
});
...
...
This diff is collapsed.
Click to expand it.
apps/assets/templates/assets/asset_tag_create.html
View file @
abe09e2a
...
@@ -42,10 +42,16 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -42,10 +42,16 @@ div.dataTables_wrapper div.dataTables_filter,
<h3
class=
"widget-head-color-box"
>
基本信息
</h3>
<h3
class=
"widget-head-color-box"
>
基本信息
</h3>
{{ form.name|bootstrap_horizontal }}
{{ form.name|bootstrap_horizontal }}
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
关联的资产
</label>
<label
class=
"col-sm-2 control-label"
id=
"asset_on_count"
>
关联的资产({{ assets_count }})
</label>
<div
class=
"col-sm-9"
id=
"asset_sed"
>
<div
class=
"col-sm-9"
id=
"asset_sed"
>
<input
type=
"text"
class=
" form-control"
id=
"add_asset"
value=
"{{ assets_count }}"
>
<div
class=
"form-asset-on"
id=
"add_asset"
>
<p
id=
"asset_on_p"
>
{% for asset in assets_on_list %}
<button
name=
'asset_hostname'
title=
'{{ asset.ip}}'
type=
'button'
class=
'btn btn-default btn-xs'
>
{{ asset.hostname }}
</button>
{% endfor %}
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-5"
>
<div
class=
"col-sm-4 col-sm-offset-5"
>
...
...
This diff is collapsed.
Click to expand it.
apps/assets/views.py
View file @
abe09e2a
...
@@ -229,11 +229,12 @@ class AssetGroupUpdateView(AdminUserRequiredMixin, UpdateView):
...
@@ -229,11 +229,12 @@ class AssetGroupUpdateView(AdminUserRequiredMixin, UpdateView):
return
super
(
AssetGroupUpdateView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
return
super
(
AssetGroupUpdateView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
assets_all
=
self
.
object
.
assets
.
all
()
context
=
{
context
=
{
'app'
:
_
(
'Assets'
),
'app'
:
_
(
'Assets'
),
'action'
:
_
(
'Create asset group'
),
'action'
:
_
(
'Create asset group'
),
# 'assets': Asset.objects.all()
,
'assets_on_list'
:
assets_all
,
'assets_count'
:
self
.
object
.
assets
.
all
()
.
count
(
),
'assets_count'
:
len
(
assets_all
),
'group_id'
:
self
.
object
.
id
,
'group_id'
:
self
.
object
.
id
,
}
}
kwargs
.
update
(
context
)
kwargs
.
update
(
context
)
...
@@ -663,10 +664,12 @@ class AssetTagUpdateView(AdminUserRequiredMixin, UpdateView):
...
@@ -663,10 +664,12 @@ class AssetTagUpdateView(AdminUserRequiredMixin, UpdateView):
return
super
(
AssetTagUpdateView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
return
super
(
AssetTagUpdateView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
assets_all
=
self
.
object
.
asset_set
.
all
()
context
=
{
context
=
{
'app'
:
_
(
'Tag'
),
'app'
:
_
(
'Tag'
),
'action'
:
_
(
'Asset Tags detail'
),
'action'
:
_
(
'Asset Tags detail'
),
'assets_count'
:
self
.
object
.
asset_set
.
all
()
.
count
(),
'assets_count'
:
len
(
assets_all
),
'assets_on_list'
:
assets_all
,
'tag_id'
:
self
.
object
.
id
,
'tag_id'
:
self
.
object
.
id
,
}
}
kwargs
.
update
(
context
)
kwargs
.
update
(
context
)
...
...
This diff is collapsed.
Click to expand it.
apps/static/css/jumpserver.css
View file @
abe09e2a
...
@@ -214,4 +214,21 @@ table.dataTable tbody td.selected td i.text-navy
...
@@ -214,4 +214,21 @@ table.dataTable tbody td.selected td i.text-navy
.mar-j
{
.mar-j
{
margin-left
:
3px
;
margin-left
:
3px
;
margin-right
:
3px
;
margin-right
:
3px
;
}
.form-asset-on
button
{
background
:
#f1f1f1
;
margin-right
:
2px
;
}
.form-asset-on
{
border
:
1px
solid
#e5e6e7
;
padding-top
:
5px
;
padding-bottom
:
0px
;
padding-left
:
5px
;
padding-right
:
5px
;
min-height
:
34px
;
height
:
100%
;
}
.form-asset-on
p
{
margin-bottom
:
0px
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
apps/templates/_base_list.html
View file @
abe09e2a
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</div>
</div>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<div
class=
""
>
<div
class=
""
id=
"content_start"
>
{% block content_left_head %} {% endblock %}
{% block content_left_head %} {% endblock %}
{% block table_search %}
{% block table_search %}
<form
id=
"search_form"
method=
"get"
action=
""
class=
"pull-right mail-search"
>
<form
id=
"search_form"
method=
"get"
action=
""
class=
"pull-right mail-search"
>
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
</div>
</div>
</form>
</form>
{% endblock %}
{% endblock %}
{% block tags_list %}{% endblock %}
</div>
</div>
{% block table_container %}
{% block table_container %}
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
...
...
This diff is collapsed.
Click to expand it.
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