Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: changed location of uninstall button and added disabled con… #10563

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ exports[`Installations should render component with data 1`] = `
"
data-has-call-to-action="false"
data-has-expandable-action="true"
data-num-columns-excl-action-col="9"
data-num-columns-excl-action-col="8"
>
<mock-styled.div>
<mock-styled.div>
Expand All @@ -849,9 +849,6 @@ exports[`Installations should render component with data 1`] = `
<mock-styled.div>
Date Installed
</mock-styled.div>
<mock-styled.div>
Uninstall
</mock-styled.div>
<mock-styled.div>
Installed By
</mock-styled.div>
Expand Down Expand Up @@ -936,18 +933,6 @@ exports[`Installations should render component with data 1`] = `
23-03-2022
</mock-styled.div>
</mock-styled.div>
<mock-styled.div
classname="mock-css."
>
<mock-styled.div>
<mock-styled.button
classname="mock-css."
>
<mock-styled.div />
Uninstall
</mock-styled.button>
</mock-styled.div>
</mock-styled.div>
<mock-styled.div
classname="mock-css."
>
Expand Down Expand Up @@ -999,6 +984,13 @@ exports[`Installations should render component with data 1`] = `
<mock-styled.div />
Togggle API Consumption
</mock-styled.button>
<mock-styled.button
classname="mock-css."
disabled="false"
>
<mock-styled.div />
Uninstall
</mock-styled.button>
</mock-styled.div>
</mock-styled.div>
</mock-styled.div>
Expand Down Expand Up @@ -1295,7 +1287,7 @@ exports[`Installations should render component with data 1`] = `
"
data-has-call-to-action="false"
data-has-expandable-action="true"
data-num-columns-excl-action-col="9"
data-num-columns-excl-action-col="8"
>
<mock-styled.div>
<mock-styled.div>
Expand All @@ -1313,9 +1305,6 @@ exports[`Installations should render component with data 1`] = `
<mock-styled.div>
Date Installed
</mock-styled.div>
<mock-styled.div>
Uninstall
</mock-styled.div>
<mock-styled.div>
Installed By
</mock-styled.div>
Expand Down Expand Up @@ -1400,18 +1389,6 @@ exports[`Installations should render component with data 1`] = `
23-03-2022
</mock-styled.div>
</mock-styled.div>
<mock-styled.div
classname="mock-css."
>
<mock-styled.div>
<mock-styled.button
classname="mock-css."
>
<mock-styled.div />
Uninstall
</mock-styled.button>
</mock-styled.div>
</mock-styled.div>
<mock-styled.div
classname="mock-css."
>
Expand Down Expand Up @@ -1463,6 +1440,13 @@ exports[`Installations should render component with data 1`] = `
<mock-styled.div />
Togggle API Consumption
</mock-styled.button>
<mock-styled.button
classname="mock-css."
disabled="false"
>
<mock-styled.div />
Uninstall
</mock-styled.button>
</mock-styled.div>
</mock-styled.div>
</mock-styled.div>
Expand Down
28 changes: 12 additions & 16 deletions packages/admin-portal/src/components/installations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,6 @@ export const Installations: FC = () => {
showLabel: true,
},
},
{
label: 'Uninstall',
children: (
<Button
onClick={() =>
setSelectedInstallation({
installationId: id as string,
appId: appId as string,
})
}
intent="danger"
>
Uninstall
</Button>
),
},
{
label: 'Installed By',
value: installedBy,
Expand Down Expand Up @@ -311,6 +295,18 @@ export const Installations: FC = () => {
>
Togggle API Consumption
</Button>
<Button
onClick={() =>
setSelectedInstallation({
installationId: id as string,
appId: appId as string,
})
}
disabled={uninstalledBy !== null && uninstalledBy !== ''}
intent="danger"
>
Uninstall
</Button>
</ButtonGroup>
{installIdConsumption && installIdConsumption === id && (
<ToggleConsumption
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export const UninstallModal: FC<{
})
setUninstalling(false)

console.log('result', result)

if (result) {
installationRefresh()
onClose()
Expand Down
Loading