mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-13 08:01:17 +00:00
improve invalidations etc
This commit is contained in:
@@ -104,7 +104,7 @@ const NewBuilder = () => {
|
||||
|
||||
return (
|
||||
<NewResource
|
||||
type="Alerter"
|
||||
type="Builder"
|
||||
onSuccess={async () =>
|
||||
!!type && mutateAsync({ name, config: { type, params: {} } })
|
||||
}
|
||||
@@ -113,13 +113,13 @@ const NewBuilder = () => {
|
||||
<div className="grid md:grid-cols-2">
|
||||
Name
|
||||
<Input
|
||||
placeholder="alerter-name"
|
||||
placeholder="builder-name"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="grid md:grid-cols-2">
|
||||
Alerter Type
|
||||
Builder Type
|
||||
<Select
|
||||
value={type}
|
||||
onValueChange={(value) => setType(value as typeof type)}
|
||||
@@ -129,8 +129,8 @@ const NewBuilder = () => {
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
<SelectItem value="Slack">Slack</SelectItem>
|
||||
<SelectItem value="Custom">Custom</SelectItem>
|
||||
<SelectItem value="Aws">Aws</SelectItem>
|
||||
<SelectItem value="Server">Server</SelectItem>
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
@@ -32,7 +32,8 @@ const on_message = (
|
||||
["GetDeployment"],
|
||||
["GetLog"],
|
||||
["GetDeploymentActionState"],
|
||||
["GetDeploymentStatus"]
|
||||
["GetDeploymentStatus"],
|
||||
["GetDeploymentsSummary"]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,12 +43,33 @@ const on_message = (
|
||||
["GetServer"],
|
||||
["GetServerActionState"],
|
||||
["GetServerStatus"],
|
||||
["GetHistoricalServerStats"]
|
||||
["GetHistoricalServerStats"],
|
||||
["GetServersSummary"]
|
||||
);
|
||||
}
|
||||
|
||||
if (update.target.type === "Build") {
|
||||
invalidate(["ListBuilds"], ["GetBuild"], ["GetBuildActionState"]);
|
||||
invalidate(
|
||||
["ListBuilds"],
|
||||
["GetBuild"],
|
||||
["GetBuildActionState"],
|
||||
["GetBuildMonthlyStats"],
|
||||
["GetBuildVersions"],
|
||||
["GetBuildsSummary"]
|
||||
);
|
||||
}
|
||||
|
||||
if (update.target.type === "Builder") {
|
||||
invalidate(
|
||||
["ListBuilders"],
|
||||
["GetBuilder"],
|
||||
["GetBuilderAvailableAccounts"],
|
||||
["GetBuildersSummary"]
|
||||
);
|
||||
}
|
||||
|
||||
if (update.target.type === "Alerter") {
|
||||
invalidate(["ListAlerters"], ["GetAlerter"], ["GetAlertersSummary"]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user