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
5dede217
Commit
5dede217
authored
3 months ago
by
Johanna Szepanski
Browse files
Options
Downloads
Patches
Plain Diff
removed two way deps and unneccessary deos between details view and admin
parent
1751fb49
No related branches found
No related tags found
2 merge requests
!612
Release 5.0.0
,
!577
CE-3395: Fix infinite loop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/IOC/IOCAdmin/IOCAdmin.jsx
+7
-14
7 additions, 14 deletions
src/components/IOC/IOCAdmin/IOCAdmin.jsx
src/views/IOC/IOCDetailsView.jsx
+3
-20
3 additions, 20 deletions
src/views/IOC/IOCDetailsView.jsx
with
10 additions
and
34 deletions
src/components/IOC/IOCAdmin/IOCAdmin.jsx
+
7
−
14
View file @
5dede217
import
{
useState
}
from
"
react
"
;
import
{
AdministerUndeployment
}
from
"
../AdministerUndeployment
"
;
import
{
IOCDelete
}
from
"
../IOCDelete
"
;
import
{
IOCDetailAdmin
}
from
"
../IOCDetailAdmin
"
;
import
{
ChangeHostAdmin
}
from
"
../ChangeHostAdmin
"
;
export
const
IOCAdmin
=
({
ioc
,
getIOC
,
resetTab
,
buttonDisabled
,
setButtonDisabled
})
=>
{
export
const
IOCAdmin
=
({
ioc
})
=>
{
const
[
buttonDisabled
,
setButtonDisabled
]
=
useState
(
ioc
.
operationInProgress
);
return
(
<>
<
IOCDetailAdmin
ioc
=
{
ioc
}
getIOC
=
{
getIOC
}
resetTab
=
{
resetTab
}
buttonDisabled
=
{
buttonDisabled
}
setButtonDisabled
=
{
setButtonDisabled
}
setButtonDisabled
=
{
(
value
)
=>
setButtonDisabled
(
value
)
}
/>
{
ioc
.
activeDeployment
?
(
<
ChangeHostAdmin
ioc
=
{
ioc
}
getIOC
=
{
getIOC
}
resetTab
=
{
resetTab
}
buttonDisabled
=
{
buttonDisabled
}
setButtonDisabled
=
{
setButtonDisabled
}
setButtonDisabled
=
{
(
value
)
=>
setButtonDisabled
(
value
)
}
/>
)
:
null
}
<
AdministerUndeployment
ioc
=
{
ioc
}
buttonDisabled
=
{
buttonDisabled
}
setButtonDisabled
=
{
(
value
)
=>
setButtonDisabled
(
value
)
}
/>
<
IOCDelete
ioc
=
{
ioc
}
buttonDisabled
=
{
buttonDisabled
}
setButtonDisabled
=
{
setButtonDisabled
}
setButtonDisabled
=
{
(
value
)
=>
setButtonDisabled
(
value
)
}
/>
</>
);
...
...
This diff is collapsed.
Click to expand it.
src/views/IOC/IOCDetailsView.jsx
+
3
−
20
View file @
5dede217
...
...
@@ -13,26 +13,16 @@ import { IOCAdmin } from "../../components/IOC/IOCAdmin";
import
{
applicationTitle
}
from
"
../../components/common/Helper
"
;
export
function
IOCDetailsView
({
ioc
})
{
const
[
tabIndex
,
setTabIndex
]
=
useState
(
0
);
const
{
setTitle
}
=
useContext
(
GlobalAppBarContext
);
const
[
buttonDisabled
,
setButtonDisabled
]
=
useState
(
false
);
const
navigate
=
useNavigate
();
const
[
tabIndex
,
setTabIndex
]
=
useState
(
0
);
useEffect
(()
=>
{
setButtonDisabled
(
Boolean
(
ioc
?.
operationInProgress
));
},
[
ioc
?.
operationInProgress
]);
useEffect
(()
=>
{
if
(
ioc
)
{
setTitle
(
applicationTitle
(
`IOC Details:
${
ioc
.
namingName
}
`
));
}
},
[
ioc
,
setTitle
]);
const
handleClick
=
()
=>
{
navigate
(
-
1
);
};
const
tabs
=
[
{
label
:
"
Status
"
,
...
...
@@ -57,14 +47,7 @@ export function IOCDetailsView({ ioc }) {
if
(
isPermittedAdmin
)
{
tabs
.
push
({
label
:
"
Admin
"
,
content
:
(
<
IOCAdmin
ioc
=
{
ioc
}
resetTab
=
{
()
=>
setTabIndex
(
0
)
}
buttonDisabled
=
{
buttonDisabled
}
setButtonDisabled
=
{
setButtonDisabled
}
/>
)
content
:
<
IOCAdmin
ioc
=
{
ioc
}
/>
});
}
...
...
@@ -90,7 +73,7 @@ export function IOCDetailsView({ ioc }) {
>
<
IconButton
color
=
"inherit"
onClick
=
{
handleClick
}
onClick
=
{
()
=>
navigate
(
-
1
)
}
size
=
"large"
>
<
ArrowBackIcon
/>
...
...
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