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
9de2ff20
Commit
9de2ff20
authored
Mar 26, 2017
by
右书僮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复idc_list删除时重新加载table
parent
e0179ea3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
65 deletions
+30
-65
asset_group_create.html
apps/assets/templates/assets/asset_group_create.html
+2
-2
asset_group_detail.html
apps/assets/templates/assets/asset_group_detail.html
+0
-36
asset_list.html
apps/assets/templates/assets/asset_list.html
+0
-0
idc_list.html
apps/assets/templates/assets/idc_list.html
+28
-27
No files found.
apps/assets/templates/assets/asset_group_create.html
View file @
9de2ff20
...
...
@@ -51,8 +51,8 @@
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<h3
class=
"widget-head-color-box"
>
资产用户
</h3>
{{ form.system_users|bootstrap_horizontal }
}
{#
<h3
class=
"widget-head-color-box"
>
资产用户
</h3>
#}
{# {{ form.system_users|bootstrap_horizontal }}#
}
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-5"
>
<button
class=
"btn btn-white"
type=
"reset"
>
重置
</button>
...
...
apps/assets/templates/assets/asset_group_detail.html
View file @
9de2ff20
...
...
@@ -101,42 +101,6 @@
</div>
</div>
<div
class=
"panel panel-info"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Associate system user' %}
</div>
<div
class=
"panel-body"
>
<table
class=
"table system-user-table"
>
<tbody>
<form>
<tr
class=
"no-borders-tr"
>
<td
colspan=
"2"
>
<select
data-placeholder=
"{% trans 'Select system user' %}"
class=
"select2"
style=
"width: 100%"
multiple=
""
tabindex=
"4"
>
{% for system_user in system_users_remain %}
<option
value=
"{{ system_user.id }}"
id=
"opt_{{ system_user.id }}"
>
{{ system_user.name }}
</option>
{% endfor %}
</select>
</td>
</tr>
<tr
class=
"no-borders-tr"
>
<td
colspan=
"2"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-asset-add-groups-system-users"
>
{% trans 'Associate' %}
</button>
</td>
</tr>
</form>
{% for system_user in system_users %}
<tr>
<td
><b
class=
"bdg_system_user"
data-sid=
{{
system_user
.
id
}}
>
{{ system_user.name }}
</b></td>
<td>
<button
class=
"btn btn-danger btn-xs pull-right btn_leave_asset_group"
type=
"button"
style=
"float: right;"
><i
class=
"fa fa-minus"
></i></button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
...
...
apps/assets/templates/assets/asset_list.html
View file @
9de2ff20
This diff is collapsed.
Click to expand it.
apps/assets/templates/assets/idc_list.html
View file @
9de2ff20
...
...
@@ -27,16 +27,16 @@
</tbody>
</table>
<div
id=
"actions"
class=
"hide"
>
<div
class=
"input-group"
>
<select
class=
"form-control m-b"
style=
"width: auto"
id=
"slct_bulk_update"
>
<option
value=
"delete"
>
{% trans 'Delete selected' %}
</option>
</select>
<div
class=
"input-group-btn pull-left"
style=
"padding-left: 5px;"
>
<button
id=
'btn_bulk_update'
style=
"height: 32px;"
class=
"btn btn-sm btn-primary"
>
{% trans 'Submit' %}
</button>
</div>
</div>
<div
class=
"input-group"
>
<select
class=
"form-control m-b"
style=
"width: auto"
id=
"slct_bulk_update"
>
<option
value=
"delete"
>
{% trans 'Delete selected' %}
</option>
</select>
<div
class=
"input-group-btn pull-left"
style=
"padding-left: 5px;"
>
<button
id=
'btn_bulk_update'
style=
"height: 32px;"
class=
"btn btn-sm btn-primary"
>
{% trans 'Submit' %}
</button>
</div>
</div>
</div>
{% endblock %}
{% block content_bottom_left %}{% endblock %}
...
...
@@ -65,19 +65,20 @@ $(document).ready(function(){
})
.
on
(
'click'
,
'.btn_idc_delete'
,
function
()
{
var
$this
=
$
(
this
);
var
$data_table
=
$
(
'#idc_list_table'
).
DataTable
();
var
name
=
$
(
this
).
closest
(
"tr"
).
find
(
":nth-child(2)"
).
children
(
'a'
).
html
();
var
uid
=
$this
.
data
(
'uid'
);
var
the_url
=
'{% url "api-assets:idc-detail" pk=99991937 %}'
.
replace
(
'99991937'
,
uid
);
objectDelete
(
$this
,
name
,
the_url
);
$data_table
.
ajax
.
reload
();
{
#
TODO
:
reload
the
tale
#
}
var
$this
=
$
(
this
);
var
$data_table
=
$
(
'#idc_list_table'
).
DataTable
();
var
name
=
$
(
this
).
closest
(
"tr"
).
find
(
":nth-child(2)"
).
children
(
'a'
).
html
();
var
uid
=
$this
.
data
(
'uid'
);
var
the_url
=
'{% url "api-assets:idc-detail" pk=99991937 %}'
.
replace
(
'99991937'
,
uid
);
objectDelete
(
$this
,
name
,
the_url
);
setTimeout
(
function
()
{
$data_table
.
ajax
.
reload
();
},
3000
);
})
.
on
(
'click'
,
'#btn_bulk_update'
,
function
()
{
var
action
=
$
(
'#slct_bulk_update'
).
val
();
var
$data_table
=
$
(
'#idc_list_table'
).
DataTable
();
var
action
=
$
(
'#slct_bulk_update'
).
val
();
var
$data_table
=
$
(
'#idc_list_table'
).
DataTable
();
var
id_list
=
[];
var
plain_id_list
=
[];
$data_table
.
rows
({
selected
:
true
}).
every
(
function
(){
...
...
@@ -113,13 +114,13 @@ $(document).ready(function(){
jumpserver
.
checked
=
false
;
});
}
switch
(
action
)
{
case
'delete'
:
doDelete
();
break
;
default
:
break
;
}
switch
(
action
)
{
case
'delete'
:
doDelete
();
break
;
default
:
break
;
}
});
</script>
{% endblock %}
...
...
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