mirror of
https://github.com/moghtech/komodo.git
synced 2026-04-28 11:49:39 -05:00
check disabled
This commit is contained in:
@@ -58,8 +58,9 @@ export const AlerterConfig = ({ id }: { id: string }) => {
|
||||
enabled: update.enabled === undefined ? true : update.enabled,
|
||||
});
|
||||
}}
|
||||
disabled={disabled}
|
||||
>
|
||||
<SelectTrigger className="w-32 capitalize">
|
||||
<SelectTrigger className="w-32 capitalize" disabled={disabled}>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent className="w-32">
|
||||
|
||||
@@ -153,7 +153,7 @@ export const BuildConfig = ({ id }: { id: string }) => {
|
||||
label: "Extra Args",
|
||||
contentHidden:
|
||||
(update.extra_args ?? config.extra_args)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
@@ -186,7 +186,7 @@ export const BuildConfig = ({ id }: { id: string }) => {
|
||||
{
|
||||
label: "Labels",
|
||||
contentHidden: (update.labels ?? config.labels)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
|
||||
@@ -55,7 +55,7 @@ const AwsBuilderConfig = ({ id }: { id: string }) => {
|
||||
contentHidden:
|
||||
(update.security_group_ids ?? config.security_group_ids)
|
||||
?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
@@ -91,7 +91,7 @@ const AwsBuilderConfig = ({ id }: { id: string }) => {
|
||||
label: "Github Accounts",
|
||||
contentHidden:
|
||||
(update.github_accounts ?? config.github_accounts)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
@@ -127,7 +127,7 @@ const AwsBuilderConfig = ({ id }: { id: string }) => {
|
||||
label: "Docker Accounts",
|
||||
contentHidden:
|
||||
(update.docker_accounts ?? config.docker_accounts)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
|
||||
@@ -118,6 +118,7 @@ export const DeploymentConfig = ({
|
||||
value={value}
|
||||
onUpdate={(command) => set({ command })}
|
||||
triggerClassName="min-w-[300px] max-w-[400px]"
|
||||
disabled={disabled}
|
||||
/>
|
||||
</ConfigItem>
|
||||
),
|
||||
@@ -127,7 +128,7 @@ export const DeploymentConfig = ({
|
||||
label: "Ports",
|
||||
hidden: hide_ports,
|
||||
contentHidden: (update.ports ?? config.ports)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
@@ -158,7 +159,7 @@ export const DeploymentConfig = ({
|
||||
{
|
||||
label: "Volumes",
|
||||
contentHidden: (update.volumes ?? config.volumes)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
@@ -190,7 +191,7 @@ export const DeploymentConfig = ({
|
||||
label: "Extra Args",
|
||||
contentHidden:
|
||||
(update.extra_args ?? config.extra_args)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<AddExtraArgMenu
|
||||
onSelect={(suggestion) =>
|
||||
set({
|
||||
@@ -217,7 +218,7 @@ export const DeploymentConfig = ({
|
||||
{
|
||||
label: "Labels",
|
||||
contentHidden: (update.labels ?? config.labels)?.length === 0,
|
||||
actions: (
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
|
||||
Reference in New Issue
Block a user