check disabled

This commit is contained in:
mbecker20
2024-05-12 23:48:53 -07:00
parent b97f9b30b3
commit ef91577ac5
4 changed files with 12 additions and 10 deletions

View File

@@ -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">

View File

@@ -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={() =>

View File

@@ -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={() =>

View File

@@ -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={() =>