Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mock-cheops
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
chephren
mock-cheops
Commits
3e1090b8
Unverified
Commit
3e1090b8
authored
1 year ago
by
REIG Julien
Browse files
Options
Downloads
Patches
Plain Diff
fix command wrong format and resources don't return commands
parent
2d965b32
No related branches found
No related tags found
1 merge request
!10
fix command wrong format and resources don't return commands
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
controllers/resource_controller.py
+2
-2
2 additions, 2 deletions
controllers/resource_controller.py
models/command.py
+2
-2
2 additions, 2 deletions
models/command.py
with
4 additions
and
4 deletions
controllers/resource_controller.py
+
2
−
2
View file @
3e1090b8
...
...
@@ -18,9 +18,9 @@ class ResourceResource(Resource):
if
get_state
()
==
Status
.
OFFLINE
:
return
response_offline
,
403
resource
=
get_resource
(
id
)
resource
=
get_resource
(
id
,
True
)
if
resource
:
return
jsonify
(
resource
.
to_
simple
_dict
())
return
jsonify
(
resource
.
to_
full
_dict
())
else
:
return
{
"
message
"
:
"
Resource not found
"
},
404
...
...
This diff is collapsed.
Click to expand it.
models/command.py
+
2
−
2
View file @
3e1090b8
...
...
@@ -17,9 +17,9 @@ class Command:
@staticmethod
def
from_tuple
(
data
):
command
=
Command
(
data
[
1
])
command
=
Command
(
data
[
2
])
command
.
id
=
data
[
0
]
command
.
date
=
data
[
2
]
command
.
date
=
data
[
1
]
return
command
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment