Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
immerda
Immerda Apps
users
Commits
4f185a86
Commit
4f185a86
authored
Oct 13, 2020
by
o
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
query deleted and existing at once
parent
bcccea4d
Pipeline
#4142
failed with stages
in 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
app/controllers/resources_admin_controller.rb
app/controllers/resources_admin_controller.rb
+3
-2
No files found.
app/controllers/resources_admin_controller.rb
View file @
4f185a86
...
...
@@ -11,9 +11,10 @@ class ResourcesAdminController < ApplicationController
if
resource_list
.
include?
@resource_name
begin
@resource_schema
=
api
.
resource_schema
(
@resource_name
)[
'schema'
]
@resources
=
api
.
resource_list
(
@resource_name
)[
'data'
]
resources
=
api
.
resource_list
(
@resource_name
,
'both'
)
@resources
=
resources
[
'data'
]
@resources
.
sort!
{
|
a
,
b
|
a
[
'uid'
]
<=>
b
[
'uid'
]}
@deleted_resources
=
api
.
resource
_list
(
@resource_name
,
true
)
[
'deleted'
]
@deleted_resources
=
resource
s
[
'deleted'
]
@deleted_resources
.
sort!
{
|
a
,
b
|
a
[
'uid'
]
<=>
b
[
'uid'
]}
rescue
ApiBackend
::
ApiError
flash
[
:danger
]
=
:failed
...
...
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