Skip to content

Commit

Permalink
feat: Merge branch 'main' into feature/azuread
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl committed Nov 10, 2024
2 parents ffcc569 + 76f87d7 commit acd8c5f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion keep-ui/app/workflows/[workflow_id]/executions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Callout, Card } from "@tremor/react";
import React, { useEffect, useState } from "react";
import { useSession } from "next-auth/react";
import { ExclamationCircleIcon } from "@heroicons/react/24/outline";
import Loading from "../../loading";
import Loading from "app/loading";
import { useRouter } from "next/navigation";
import { Workflow } from "../models";
import SideNavBar from "./side-nav-bar";
Expand Down
9 changes: 5 additions & 4 deletions keep-ui/app/workflows/[workflow_id]/workflow-overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import { ExclamationCircleIcon } from "@heroicons/react/20/solid";
import { Callout, Button, Title, Card, Tab, TabGroup, TabList } from "@tremor/react";
import { load, JSON_SCHEMA } from "js-yaml";
import { useSearchParams } from "next/navigation";
import { useState, useEffect, Dispatch, SetStateAction } from "react";
import Loading from "react-loading";
import { useState, useEffect, Dispatch, SetStateAction, useLayoutEffect } from "react";
import Loading from "app/loading";
import { WorkflowSteps } from "../mockworkflows";
import { Workflow } from "../models";
import WorkflowGraph from "../workflow-graph";
import AlertTriggerModal from "../workflow-run-with-alert-modal";
import { TableFilters } from "./table-filters";
import { ExecutionTable } from "./workflow-execution-table";
import { PaginatedWorkflowExecutionDto } from "../builder/types";

interface Pagination {
limit: number;
Expand Down Expand Up @@ -89,7 +90,7 @@ export default function WorkflowOverview({
});
}, [tab, searchParams]);

const { data, isLoading, error } = useWorkflowExecutionsV2(
const { data, isLoading, error, isValidating } = useWorkflowExecutionsV2(
workflow_id,
tab,
executionPagination.limit,
Expand All @@ -104,7 +105,6 @@ export default function WorkflowOverview({
message,
} = useWorkflowRun(data?.workflow!);

if (isLoading) return <Loading />;

if (error) {
return (
Expand Down Expand Up @@ -157,6 +157,7 @@ export default function WorkflowOverview({
</Button>
)}
</div>
{!data || isLoading || isValidating && <Loading />}
{data?.items && (
<div className="mt-2 flex flex-col gap-2">
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 p-0.5">
Expand Down
8 changes: 2 additions & 6 deletions keep/providers/pagerduty_provider/pagerduty_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,9 @@ def _format_alert(
data = actual_event.get("data", {})
url = data.pop("self", data.pop("html_url", None))
# format status and severity to Keep format
status = PagerdutyProvider.STATUS_MAP.get(
data.pop("status"), AlertStatus.FIRING
)
status = PagerdutyProvider.STATUS_MAP.get(data.pop("status", "firing"))
priority_summary = (data.get("priority", {}) or {}).get("summary")
priority = PagerdutyProvider.SEVERITIES_MAP.get(
priority_summary, AlertSeverity.INFO
)
priority = PagerdutyProvider.SEVERITIES_MAP.get(priority_summary, "P4")
last_received = data.pop("created_at")
name = data.pop("title")
service = data.pop("service", {}).get("summary", "unknown")
Expand Down
8 changes: 6 additions & 2 deletions keep/providers/zabbix_provider/zabbix_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,12 @@ def validate_scopes(self) -> dict[str, bool | str]:
validated_scopes[scope.name] = "Permission denied"
continue
else:
validated_scopes[scope.name] = error
continue
if error and "invalid parameter" in error.lower():
# This is OK, it means the request is broken but we have access to the endpoint.
pass
else:
validated_scopes[scope.name] = error
continue
validated_scopes[scope.name] = True
return validated_scopes

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "keep"
version = "0.28.2"
version = "0.28.3"
description = "Alerting. for developers, by developers."
authors = ["Keep Alerting LTD"]
readme = "README.md"
Expand Down

0 comments on commit acd8c5f

Please sign in to comment.