Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
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
luna
Commits
d0732590
Commit
d0732590
authored
Sep 24, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改地址
parent
ddf7a66b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
asset-tree.component.ts
src/app/elements/asset-tree/asset-tree.component.ts
+1
-1
http.ts
src/app/services/http.ts
+8
-8
No files found.
src/app/elements/asset-tree/asset-tree.component.ts
View file @
d0732590
...
...
@@ -97,7 +97,7 @@ export class ElementAssetTreeComponent implements OnInit, OnDestroy {
if
(
this
.
isLoadTreeAsync
)
{
setting
[
'async'
]
=
{
enable
:
true
,
url
:
'/api/
perms/v1
/users/nodes/children-with-assets/tree/?cache_policy=1'
,
url
:
'/api/
v1/perms
/users/nodes/children-with-assets/tree/?cache_policy=1'
,
autoParam
:
[
'id=key'
,
'name=n'
,
'level=lv'
],
type
:
'get'
};
...
...
src/app/services/http.ts
View file @
d0732590
...
...
@@ -49,29 +49,29 @@ export class HttpService {
}
getUserProfile
()
{
return
this
.
http
.
get
<
_User
>
(
'/api/
users/v1
/profile/'
);
return
this
.
http
.
get
<
_User
>
(
'/api/
v1/users
/profile/'
);
}
getMyGrantedAssets
(
keyword
)
{
const
url
=
`/api/
perms/v1
/users/assets/tree/?search=
${
keyword
}
`
;
const
url
=
`/api/
v1/perms
/users/assets/tree/?search=
${
keyword
}
`
;
return
this
.
http
.
get
<
Array
<
TreeNode
>>
(
url
);
}
filterMyGrantedAssetsById
(
id
:
string
)
{
const
url
=
`/api/
perms/v1
/users/assets/tree/?id=
${
id
}
`
;
const
url
=
`/api/
v1/perms
/users/assets/tree/?id=
${
id
}
`
;
return
this
.
http
.
get
<
Array
<
TreeNode
>>
(
url
);
}
getMyGrantedNodes
(
async
:
boolean
,
refresh
?:
boolean
)
{
const
cachePolicy
=
refresh
?
'2'
:
'1'
;
const
syncUrl
=
`/api/
perms/v1
/users/nodes-with-assets/tree/?cache_policy=
${
cachePolicy
}
`
;
const
asyncUrl
=
`/api/
perms/v1
/users/nodes/children-with-assets/tree/?cache_policy=
${
cachePolicy
}
`
;
const
syncUrl
=
`/api/
v1/perms
/users/nodes-with-assets/tree/?cache_policy=
${
cachePolicy
}
`
;
const
asyncUrl
=
`/api/
v1/perms
/users/nodes/children-with-assets/tree/?cache_policy=
${
cachePolicy
}
`
;
const
url
=
async
?
asyncUrl
:
syncUrl
;
return
this
.
http
.
get
<
Array
<
TreeNode
>>
(
url
);
}
getMyGrantedRemoteApps
(
id
?:
string
)
{
let
url
=
'/api/
perms/v1
/user/remote-apps/tree/'
;
let
url
=
'/api/
v1/perms
/user/remote-apps/tree/'
;
if
(
id
)
{
url
+=
`?id=
${
id
}
&only=1`
;
}
...
...
@@ -189,7 +189,7 @@ export class HttpService {
}
getReplay
(
token
:
string
)
{
return
this
.
http
.
get
(
'/api/
terminal/v1
/sessions/'
+
token
+
'/replay'
);
return
this
.
http
.
get
(
'/api/
v1/terminal
/sessions/'
+
token
+
'/replay'
);
}
// get_replay_json(token: string) {
...
...
@@ -204,7 +204,7 @@ export class HttpService {
const
params
=
new
HttpParams
()
.
set
(
'user-only'
,
'1'
)
.
set
(
'token'
,
token
);
return
this
.
http
.
get
(
'/api/
users/v1
/connection-token/'
,
{
params
:
params
});
return
this
.
http
.
get
(
'/api/
v1/users
/connection-token/'
,
{
params
:
params
});
}
}
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