Fix: Improve service dialog theme support
This commit is contained in:
@@ -20,7 +20,6 @@ export function ServiceBasicFields({ form }: ServiceBasicFieldsProps) {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Service Name"
|
placeholder="Service Name"
|
||||||
className="bg-black border-gray-700"
|
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -38,7 +37,6 @@ export function ServiceBasicFields({ form }: ServiceBasicFieldsProps) {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="https://example.com"
|
placeholder="https://example.com"
|
||||||
className="bg-black border-gray-700"
|
|
||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
console.log("URL field changed:", e.target.value);
|
console.log("URL field changed:", e.target.value);
|
||||||
@@ -52,4 +50,4 @@ export function ServiceBasicFields({ form }: ServiceBasicFieldsProps) {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,6 @@ export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) {
|
|||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="60"
|
placeholder="60"
|
||||||
className="bg-black border-gray-700"
|
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -39,7 +38,6 @@ export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) {
|
|||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="3"
|
placeholder="3"
|
||||||
className="bg-black border-gray-700"
|
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -48,4 +46,4 @@ export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -28,14 +28,12 @@ export function ServiceFormActions({
|
|||||||
onClick={handleCancel}
|
onClick={handleCancel}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
className="border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
className="bg-primary text-primary-foreground hover:bg-primary/90"
|
|
||||||
>
|
>
|
||||||
{isSubmitting ? (
|
{isSubmitting ? (
|
||||||
<>
|
<>
|
||||||
@@ -48,4 +46,4 @@ export function ServiceFormActions({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -82,10 +82,10 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro
|
|||||||
}}
|
}}
|
||||||
value={displayValue}
|
value={displayValue}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="bg-black border-gray-700">
|
<SelectTrigger>
|
||||||
<SelectValue placeholder="Select a notification channel" />
|
<SelectValue placeholder="Select a notification channel" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent className="bg-gray-900 text-white border-gray-700">
|
<SelectContent>
|
||||||
<SelectItem value="none">None</SelectItem>
|
<SelectItem value="none">None</SelectItem>
|
||||||
{alertConfigs.map((config) => (
|
{alertConfigs.map((config) => (
|
||||||
<SelectItem key={config.id} value={config.id || ""}>
|
<SelectItem key={config.id} value={config.id || ""}>
|
||||||
@@ -119,10 +119,10 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro
|
|||||||
}}
|
}}
|
||||||
value={displayValue}
|
value={displayValue}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="bg-black border-gray-700">
|
<SelectTrigger>
|
||||||
<SelectValue placeholder="Select an alert template" />
|
<SelectValue placeholder="Select an alert template" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent className="bg-gray-900 text-white border-gray-700">
|
<SelectContent>
|
||||||
<SelectItem value="default">Default</SelectItem>
|
<SelectItem value="default">Default</SelectItem>
|
||||||
{templates?.map((template) => (
|
{templates?.map((template) => (
|
||||||
<SelectItem key={template.id} value={template.id}>
|
<SelectItem key={template.id} value={template.id}>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function ServiceTypeField({ form }: ServiceTypeFieldProps) {
|
|||||||
onValueChange={field.onChange}
|
onValueChange={field.onChange}
|
||||||
defaultValue={field.value}
|
defaultValue={field.value}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="bg-black border-gray-700">
|
<SelectTrigger>
|
||||||
<SelectValue>
|
<SelectValue>
|
||||||
{field.value === "http" && (
|
{field.value === "http" && (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
@@ -33,14 +33,14 @@ export function ServiceTypeField({ form }: ServiceTypeFieldProps) {
|
|||||||
{field.value !== "http" && "Select a service type"}
|
{field.value !== "http" && "Select a service type"}
|
||||||
</SelectValue>
|
</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent className="bg-gray-900 text-white border-gray-700">
|
<SelectContent>
|
||||||
<SelectItem value="http">
|
<SelectItem value="http">
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Globe className="w-4 h-4" />
|
<Globe className="w-4 h-4" />
|
||||||
<span>HTTP/S</span>
|
<span>HTTP/S</span>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-xs text-gray-400 mt-1">
|
<p className="text-xs text-muted-foreground mt-1">
|
||||||
Monitor websites and REST APIs with HTTP/HTTPS protocol
|
Monitor websites and REST APIs with HTTP/HTTPS protocol
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,4 +55,4 @@ export function ServiceTypeField({ form }: ServiceTypeFieldProps) {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user