Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
999e2c20
Commit
999e2c20
authored
1 year ago
by
cjenkscybercom
Browse files
Options
Downloads
Patches
Plain Diff
CE-2213
: remove job type from job list view
parent
46c6f553
No related branches found
No related tags found
2 merge requests
!407
CE-2141: 3.0.0
,
!405
Qa release tasks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/jobs/JobListView.js
+4
-66
4 additions, 66 deletions
src/views/jobs/JobListView.js
with
4 additions
and
66 deletions
src/views/jobs/JobListView.js
+
4
−
66
View file @
999e2c20
import
React
,
{
useContext
,
useCallback
,
useMemo
}
from
"
react
"
;
import
React
,
{
useContext
,
useCallback
,
useMemo
}
from
"
react
"
;
import
{
Grid
,
TextField
,
Autocomplete
}
from
"
@mui/material
"
;
import
{
Box
}
from
"
@mui/material
"
;
import
{
RootPaper
,
useAPIMethod
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
RootPaper
,
useAPIMethod
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
initRequestParams
}
from
"
../../components/common/Helper
"
;
import
{
initRequestParams
}
from
"
../../components/common/Helper
"
;
import
{
useEffect
}
from
"
react
"
;
import
{
useEffect
}
from
"
react
"
;
...
@@ -13,13 +13,6 @@ import { usePagination } from "../../hooks/pagination";
...
@@ -13,13 +13,6 @@ import { usePagination } from "../../hooks/pagination";
import
{
JobTable
}
from
"
../../components/Job/JobTable
"
;
import
{
JobTable
}
from
"
../../components/Job/JobTable
"
;
import
{
apiContext
}
from
"
../../api/DeployApi
"
;
import
{
apiContext
}
from
"
../../api/DeployApi
"
;
const
jobTypeOptions
=
[
{
label
:
"
Show all
"
},
{
label
:
"
Only deployments
"
,
filter
:
"
DEPLOYMENT
"
},
{
label
:
"
Only commands
"
,
filter
:
"
COMMAND
"
}
];
const
defaultJobTypeOption
=
jobTypeOptions
[
0
];
export
function
JobListView
()
{
export
function
JobListView
()
{
const
client
=
useContext
(
apiContext
);
const
client
=
useContext
(
apiContext
);
...
@@ -38,8 +31,7 @@ export function JobListView() {
...
@@ -38,8 +31,7 @@ export function JobListView() {
{
{
rows
:
"
20
"
,
rows
:
"
20
"
,
page
:
"
0
"
,
page
:
"
0
"
,
query
:
""
,
query
:
""
job_type
:
null
},
},
{
navigateMode
:
"
replace
"
}
{
navigateMode
:
"
replace
"
}
);
);
...
@@ -92,16 +84,12 @@ export function JobListView() {
...
@@ -92,16 +84,12 @@ export function JobListView() {
deserialize
(
urlState
.
query
)
deserialize
(
urlState
.
query
)
);
);
if
(
urlState
.
job_type
)
{
requestParams
.
type
=
deserialize
(
urlState
.
job_type
);
}
getOperations
(
requestParams
);
getOperations
(
requestParams
);
return
()
=>
{
return
()
=>
{
abort
();
abort
();
};
};
},
[
getOperations
,
urlPagination
,
urlState
.
query
,
urlState
.
job_type
,
abort
]);
},
[
getOperations
,
urlPagination
,
urlState
.
query
,
abort
]);
const
setSearch
=
useCallback
(
const
setSearch
=
useCallback
(
(
query
)
=>
{
(
query
)
=>
{
...
@@ -134,57 +122,7 @@ export function JobListView() {
...
@@ -134,57 +122,7 @@ export function JobListView() {
return
(
return
(
<
RootPaper
>
<
RootPaper
>
<
Grid
<
Box
paddingY
=
{
2
}
>
{
content
}
<
/Box
>
container
spacing
=
{
1
}
>
<
Grid
container
spacing
=
{
1
}
justifyContent
=
"
flex-end
"
alignItems
=
"
center
"
style
=
{{
display
:
"
flex
"
}}
>
<
Grid
item
xs
=
{
3
}
>
<
Autocomplete
id
=
"
combo-box-demo
"
options
=
{
jobTypeOptions
}
defaultValue
=
{
urlState
.
job_type
?
jobTypeOptions
.
find
(
(
o
)
=>
o
.
filter
===
urlState
.
job_type
)
||
defaultJobTypeOption
:
defaultJobTypeOption
}
getOptionLabel
=
{(
option
)
=>
option
.
label
}
isOptionEqualToValue
=
{(
option
,
value
)
=>
option
.
label
===
value
.
label
}
renderInput
=
{(
params
)
=>
(
<
TextField
{...
params
}
label
=
"
Job type
"
variant
=
"
outlined
"
/>
)}
onChange
=
{(
event
,
value
,
reason
)
=>
setUrlState
({
job_type
:
value
?.
filter
})
}
autoSelect
/>
<
/Grid
>
<
/Grid
>
<
Grid
item
xs
=
{
12
}
md
=
{
12
}
>
{
content
}
<
/Grid
>
<
/Grid
>
<
/RootPaper
>
<
/RootPaper
>
);
);
}
}
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