Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bacula Community Edition
Bacula Community
Commits
e654a550
Commit
e654a550
authored
Dec 12, 2022
by
Marcin Haba
Browse files
Add afterjobid parameter to job list endpoint
parent
449c01f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
gui/baculum/protected/API/Pages/API/Jobs.php
View file @
e654a550
...
...
@@ -36,6 +36,7 @@ class Jobs extends BaculumAPIServer {
public
function
get
()
{
$misc
=
$this
->
getModule
(
'misc'
);
$jobids
=
$this
->
Request
->
contains
(
'jobids'
)
&&
$misc
->
isValidIdsList
(
$this
->
Request
[
'jobids'
])
?
$this
->
Request
[
'jobids'
]
:
''
;
$afterjobid
=
$this
->
Request
->
contains
(
'afterjobid'
)
&&
$misc
->
isValidInteger
(
$this
->
Request
[
'afterjobid'
])
?
$this
->
Request
[
'afterjobid'
]
:
0
;
$limit
=
$this
->
Request
->
contains
(
'limit'
)
&&
$misc
->
isValidInteger
(
$this
->
Request
[
'limit'
])
?
(
int
)
$this
->
Request
[
'limit'
]
:
0
;
$offset
=
$this
->
Request
->
contains
(
'offset'
)
&&
$misc
->
isValidInteger
(
$this
->
Request
[
'offset'
])
?
(
int
)
$this
->
Request
[
'offset'
]
:
0
;
$jobstatus
=
$this
->
Request
->
contains
(
'jobstatus'
)
?
$this
->
Request
[
'jobstatus'
]
:
''
;
...
...
@@ -109,6 +110,15 @@ class Jobs extends BaculumAPIServer {
$params
=
[];
if
(
$afterjobid
>
0
)
{
$params
[
'Job.JobId'
]
=
[];
$params
[
'Job.JobId'
][]
=
[
'operator'
=>
'>'
,
'vals'
=>
$afterjobid
];
}
$jobstatuses
=
array_keys
(
$misc
->
getJobState
());
$sts
=
str_split
(
$jobstatus
);
$counter
=
0
;
...
...
gui/baculum/protected/API/openapi_baculum.json
View file @
e654a550
...
...
@@ -863,6 +863,15 @@
"type"
:
"string"
}
},
{
"name"
:
"afterjobid"
,
"in"
:
"query"
,
"required"
:
false
,
"description"
:
"Displays jobs after given job identifier with excluding the given jobid."
,
"schema"
:
{
"type"
:
"integer"
}
},
{
"name"
:
"jobstatus"
,
"in"
:
"query"
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment