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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
e6e32061
Commit
e6e32061
authored
4 years ago
by
Zoltan Runyo
Browse files
Options
Downloads
Patches
Plain Diff
ICSWHI-7509
: Fix React warning
parent
583aefe8
No related branches found
No related tags found
1 merge request
!43
ICSHWI-7509
Pipeline
#87158
passed
4 years ago
Stage: build
Stage: lint
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/deployments/DeploymentJobOutput.js
+12
-13
12 additions, 13 deletions
src/components/deployments/DeploymentJobOutput.js
with
12 additions
and
13 deletions
src/components/deployments/DeploymentJobOutput.js
+
12
−
13
View file @
e6e32061
...
...
@@ -4,6 +4,8 @@ import { useDeploymentJob } from '../../api/SwaggerApi';
export
function
DeploymentJobOutput
({
awxJobId
,
update
})
{
const
[
deploymentJob
,
getDeploymentJob
]
=
useDeploymentJob
(
awxJobId
);
const
stdoutRef
=
useRef
(
null
);
const
[
firstTime
,
setFirstTime
]
=
useState
(
true
);
useEffect
(()
=>
{
const
interval
=
setInterval
(()
=>
{
...
...
@@ -15,12 +17,6 @@ export function DeploymentJobOutput({ awxJobId, update }) {
},
[
update
,
getDeploymentJob
]);
useEffect
(()
=>
{
scrollDown
();
},
[
deploymentJob
]);
const
stdoutRef
=
useRef
(
null
);
const
[
firstTime
,
setFirstTime
]
=
useState
(
true
);
function
scrollDown
()
{
if
(
stdoutRef
.
current
)
{
stdoutRef
.
current
.
scrollTop
=
stdoutRef
.
current
.
scrollHeight
;
...
...
@@ -31,6 +27,9 @@ export function DeploymentJobOutput({ awxJobId, update }) {
}
}
scrollDown
();
},
[
deploymentJob
,
firstTime
]);
return
deploymentJob
?.
job
.
started
?
<
div
ref
=
{
stdoutRef
}
...
...
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