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
8c64b959
Commit
8c64b959
authored
9 months ago
by
Johanna Szepanski
Browse files
Options
Downloads
Patches
Plain Diff
refactoring and cleanup of host details view
parent
d1139807
No related branches found
No related tags found
2 merge requests
!497
CE-2790: Prepare for 4.0.0
,
!476
CE-2226: Added job log to host details view
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Job/JobTable/JobTable.js
+2
-1
2 additions, 1 deletion
src/components/Job/JobTable/JobTable.js
src/views/host/details/HostDetailsView.js
+68
-83
68 additions, 83 deletions
src/views/host/details/HostDetailsView.js
with
70 additions
and
84 deletions
src/components/Job/JobTable/JobTable.js
+
2
−
1
View file @
8c64b959
...
...
@@ -16,7 +16,8 @@ const defaultColumns = [
width
:
"
100%
"
},
{
field
:
"
host
"
field
:
"
host
"
,
headerName
:
"
Host
"
},
{
field
:
"
user
"
,
...
...
This diff is collapsed.
Click to expand it.
src/views/host/details/HostDetailsView.js
+
68
−
83
View file @
8c64b959
...
...
@@ -49,16 +49,12 @@ export function HostDetailsView({ hostId, host }) {
}
},
[
setUrlState
,
urlState
]);
const
handleClick
=
(
event
)
=>
{
navigate
(
-
1
);
};
return
(
<
Stack
gap
=
{
2
}
>
<
Box
>
<
IconButton
color
=
"
inherit
"
onClick
=
{
handleClick
}
onClick
=
{
()
=>
navigate
(
-
1
)
}
size
=
"
large
"
>
<
ArrowBackIcon
/>
...
...
@@ -66,89 +62,78 @@ export function HostDetailsView({ hostId, host }) {
<
/Box
>
{
host
?
(
<>
<
AlertBannerList
alerts
=
{
host
?
.
alerts
??
[]}
/
>
<
AlertBannerList
alerts
=
{
host
.
alerts
??
[]}
/
>
<
HostBadge
host
=
{
host
}
/
>
<
/
>
)
:
null
}
<
Stack
>
<
HostIocSection
hostId
=
{
hostId
}
rows
=
{
deserialize
(
urlState
.
iocs_rows
)}
page
=
{
deserialize
(
urlState
.
iocs_page
)}
onUrlStateChange
=
{(
params
)
=>
setUrlState
(
params
)}
/
>
<
/Stack
>
{
hostId
?
(
<
HostJobsSection
hostId
=
{
hostId
}
rows
=
{
deserialize
(
urlState
.
job_log_rows
)}
page
=
{
deserialize
(
urlState
.
job_log_page
)}
expanded
=
{
deserialize
(
urlState
.
job_log_open
)}
onUrlStateChange
=
{(
params
)
=>
setUrlState
(
params
)}
/
>
)
:
null
}
<
Stack
>
<
HostIocSection
hostId
=
{
hostId
}
rows
=
{
deserialize
(
urlState
.
iocs_rows
)}
page
=
{
deserialize
(
urlState
.
iocs_page
)}
onUrlStateChange
=
{(
params
)
=>
setUrlState
(
params
)}
/
>
<
/Stack
>
<
HostJobsSection
hostId
=
{
hostId
}
rows
=
{
deserialize
(
urlState
.
job_log_rows
)}
page
=
{
deserialize
(
urlState
.
job_log_page
)}
expanded
=
{
deserialize
(
urlState
.
job_log_open
)}
onUrlStateChange
=
{(
params
)
=>
setUrlState
(
params
)}
/
>
<
AccessControl
allowedRoles
=
{[
"
DeploymentToolAdmin
"
,
"
DeploymentToolIntegrator
"
]}
renderNoAccess
=
{()
=>
<><
/>
}
>
{
host
?
(
<
SimpleAccordion
summary
=
"
Host details
"
expanded
=
{
deserialize
(
urlState
.
details_open
)}
onChange
=
{(
event
,
expanded
)
=>
setUrlState
({
details_open
:
serialize
(
expanded
)
})
}
sx
=
{{
marginTop
:
"
0 !important
"
}}
<
AccessControl
allowedRoles
=
{[
"
DeploymentToolAdmin
"
,
"
DeploymentToolIntegrator
"
]}
renderNoAccess
=
{()
=>
<><
/>
}
>
<
HostDetailsTable
host
=
{
host
}
/
>
<
/SimpleAccordion
>
)
:
null
}
<
/AccessControl
>
<
AccessControl
allowedRoles
=
{[
"
DeploymentToolAdmin
"
,
"
DeploymentToolIntegrator
"
]}
renderNoAccess
=
{()
=>
<><
/>
}
>
<
Stack
gap
=
{
2
}
>
<
Typography
variant
=
"
h3
"
>
Host
log
stream
<
/Typography
>
{
host
?
(
<
LokiPanel
host
=
{
host
}
isSyslog
isDeployed
/>
)
:
null
}
<
/Stack
>
<
/AccessControl
>
<
KeyValueTable
obj
=
{{
"
Host Configuration
"
:
(
<
ExternalLink
href
=
{
host
?.
netBoxHost
.
vm
?
`
${
window
.
NETBOX_ADDRESS
}
/virtualization/virtual-machines/
${
host
?.
netBoxHost
.
id
}
`
:
`
${
window
.
NETBOX_ADDRESS
}
/dcim/devices/
${
host
?.
netBoxHost
.
id
}
`
<
SimpleAccordion
summary
=
"
Host details
"
expanded
=
{
deserialize
(
urlState
.
details_open
)}
onChange
=
{(
_
,
expanded
)
=>
setUrlState
({
details_open
:
serialize
(
expanded
)
})
}
aria
-
label
=
"
Host Configuration
"
>
{
"
"
}
{
host
?.
netBoxHost
.
vm
?
`
${
window
.
NETBOX_ADDRESS
}
/virtualization/virtual-machines/
${
host
?.
netBoxHost
.
id
}
`
:
`
${
window
.
NETBOX_ADDRESS
}
/dcim/devices/
${
host
?.
netBoxHost
.
id
}
`
}
<
/ExternalLink
>
),
"
Host Metrics
"
:
(
<
ExternalLink
href
=
{
`https://grafana.tn.esss.lu.se/d/5zJT23xWz/node-exporter-full?orgId=1&var-node=
${
host
?.
netBoxHost
.
fqdn
}
`
}
aria
-
label
=
"
Host Metrics
"
sx
=
{{
marginTop
:
"
0 !important
"
}}
>
{
`https://grafana.tn.esss.lu.se/d/5zJT23xWz/node-exporter-full?orgId=1&var-node=
${
host
?.
netBoxHost
.
fqdn
}
`
}
<
/ExternalLink
>
)
}}
variant
=
"
overline
"
/>
<
HostDetailsTable
host
=
{
host
}
/
>
<
/SimpleAccordion
>
<
Stack
gap
=
{
2
}
>
<
Typography
variant
=
"
h3
"
>
Host
log
stream
<
/Typography
>
<
LokiPanel
host
=
{
host
}
isSyslog
isDeployed
/>
<
/Stack
>
<
/AccessControl
>
<
KeyValueTable
obj
=
{{
"
Host Configuration
"
:
(
<
ExternalLink
href
=
{
host
?.
netBoxHost
.
vm
?
`
${
window
.
NETBOX_ADDRESS
}
/virtualization/virtual-machines/
${
host
?.
netBoxHost
.
id
}
`
:
`
${
window
.
NETBOX_ADDRESS
}
/dcim/devices/
${
host
?.
netBoxHost
.
id
}
`
}
aria
-
label
=
"
Host Configuration
"
>
{
"
"
}
{
host
?.
netBoxHost
.
vm
?
`
${
window
.
NETBOX_ADDRESS
}
/virtualization/virtual-machines/
${
host
?.
netBoxHost
.
id
}
`
:
`
${
window
.
NETBOX_ADDRESS
}
/dcim/devices/
${
host
?.
netBoxHost
.
id
}
`
}
<
/ExternalLink
>
),
"
Host Metrics
"
:
(
<
ExternalLink
href
=
{
`https://grafana.tn.esss.lu.se/d/5zJT23xWz/node-exporter-full?orgId=1&var-node=
${
host
?.
netBoxHost
.
fqdn
}
`
}
aria
-
label
=
"
Host Metrics
"
>
{
`https://grafana.tn.esss.lu.se/d/5zJT23xWz/node-exporter-full?orgId=1&var-node=
${
host
?.
netBoxHost
.
fqdn
}
`
}
<
/ExternalLink
>
)
}}
variant
=
"
overline
"
/>
<
/
>
)
:
null
}
<
/Stack
>
);
}
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