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
df9ef230
Commit
df9ef230
authored
Sep 12, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 去掉asset permission中不用的代码
parent
ec0bdcce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
44 deletions
+0
-44
settings.py
apps/jumpserver/settings.py
+0
-1
asset_permission_create_update.html
...perms/templates/perms/asset_permission_create_update.html
+0
-43
No files found.
apps/jumpserver/settings.py
View file @
df9ef230
...
@@ -607,7 +607,6 @@ SWAGGER_SETTINGS = {
...
@@ -607,7 +607,6 @@ SWAGGER_SETTINGS = {
'in'
:
'header'
'in'
:
'header'
}
}
},
},
'DEFAULT_API_URL'
:
'http://www.fit2cloud.com'
}
}
...
...
apps/perms/templates/perms/asset_permission_create_update.html
View file @
df9ef230
...
@@ -112,23 +112,6 @@ var dateOptions = {
...
@@ -112,23 +112,6 @@ var dateOptions = {
};
};
var
api_action
=
"{{ api_action }}"
;
var
api_action
=
"{{ api_action }}"
;
function
onAssetModalConfirm
(
table
)
{
var
assets
=
assetModalTable
.
selected
;
var
options
=
[];
$
(
'#id_assets option'
).
each
(
function
(
i
,
v
)
{
options
.
push
(
v
.
value
)
});
assetModalTable
.
selected_rows
.
forEach
(
function
(
i
)
{
var
name
=
i
.
hostname
+
'('
+
i
.
ip
+
')'
;
var
option
=
new
Option
(
name
,
i
.
id
,
false
,
true
);
if
(
options
.
indexOf
(
i
.
id
)
===
-
1
)
{
$
(
'#id_assets'
).
append
(
option
).
trigger
(
'change'
);
}
});
$
(
'#id_assets'
).
val
(
assets
).
trigger
(
'change'
);
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'.select2'
).
select2
({
$
(
'.select2'
).
select2
({
closeOnSelect
:
false
closeOnSelect
:
false
...
@@ -139,13 +122,6 @@ $(document).ready(function () {
...
@@ -139,13 +122,6 @@ $(document).ready(function () {
$
(
'#date_start'
).
daterangepicker
(
dateOptions
);
$
(
'#date_start'
).
daterangepicker
(
dateOptions
);
$
(
'#date_expired'
).
daterangepicker
(
dateOptions
);
$
(
'#date_expired'
).
daterangepicker
(
dateOptions
);
var
modalOption
=
{
onModalConfirm
:
onAssetModalConfirm
,
onAssetTableDone
:
function
(
modalTable
)
{
syncSelectedAssetsToModalTable
(
modalTable
)
},
};
setAssetModalOptions
(
modalOption
);
$
(
"#id_assets"
).
parent
().
find
(
".select2-selection"
).
on
(
'click'
,
function
(
e
)
{
$
(
"#id_assets"
).
parent
().
find
(
".select2-selection"
).
on
(
'click'
,
function
(
e
)
{
if
(
$
(
e
.
target
).
attr
(
'class'
)
!==
'select2-selection__choice__remove'
){
if
(
$
(
e
.
target
).
attr
(
'class'
)
!==
'select2-selection__choice__remove'
){
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -154,25 +130,6 @@ $(document).ready(function () {
...
@@ -154,25 +130,6 @@ $(document).ready(function () {
}
}
})
})
})
})
.
on
(
'click'
,
'#btn_asset_modal_confirm'
,
function
()
{
var
assets
=
assetModalTable
.
selected
;
var
options
=
[];
$
(
'#id_assets option'
).
each
(
function
(
i
,
v
)
{
options
.
push
(
v
.
value
)
});
assetModalTable
.
selected_rows
.
forEach
(
function
(
i
)
{
var
name
=
i
.
hostname
+
'('
+
i
.
ip
+
')'
;
var
option
=
new
Option
(
name
,
i
.
id
,
false
,
true
);
if
(
options
.
indexOf
(
i
.
id
)
===
-
1
)
{
$
(
'#id_assets'
).
append
(
option
).
trigger
(
'change'
);
}
});
$
(
'#id_assets'
).
val
(
assets
).
trigger
(
'change'
);
$
(
"#asset_list_modal"
).
modal
(
'hide'
);
})
.
on
(
"submit"
,
"form"
,
function
(
evt
)
{
.
on
(
"submit"
,
"form"
,
function
(
evt
)
{
evt
.
preventDefault
();
evt
.
preventDefault
();
var
the_url
=
'{% url '
api
-
perms
:
asset
-
permission
-
list
' %}'
;
var
the_url
=
'{% url '
api
-
perms
:
asset
-
permission
-
list
' %}'
;
...
...
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