Skip to content

Commit

Permalink
Merge branch 'main' into checkly
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl authored Jan 27, 2025
2 parents 75afefb + 30a4507 commit 56f184d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/auto-resolve-keep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
url: "https://api.keephq.dev/incidents/${{ steps.set_ids.outputs.final_incident_id }}/enrich"
method: "POST"
customHeaders: '{"X-API-KEY": "${{ secrets.KEEP_API_KEY }}", "Content-Type": "application/json"}'
data: '{"enrichments":{"incident_title":"${{ github.event.pull_request.title || ''Manual resolution'' }}","incident_url":"${{ github.event.pull_request.html_url || github.server_url }}//${{ github.repository }}/actions/runs/${{ github.run_id }}", "incident_id": "${{ github.run_id }}", "incident_provider": "github"}}'
data: '{"enrichments":{"incident_title":"${{ github.event.pull_request.title || ''Manual resolution'' }}","incident_url":"${{ github.event.pull_request.html_url || format(''{0}/{1}/actions/runs/{2}'', github.server_url, github.repository, github.run_id) }}", "incident_id": "${{ github.run_id }}", "incident_provider": "github"}}'

- name: Auto resolve Keep alert
if: |
Expand All @@ -72,4 +72,4 @@ jobs:
url: "https://api.keephq.dev/alerts/enrich?dispose_on_new_alert=true"
method: "POST"
customHeaders: '{"Content-Type": "application/json", "X-API-KEY": "${{ secrets.KEEP_API_KEY }}"}'
data: '{"enrichments":{"status":"${{ inputs.status || ''resolved'' }}","dismissed":false,"dismissUntil":"","note":"${{ github.event.pull_request.title || ''Manual resolution'' }}","ticket_url":"${{ github.event.pull_request.html_url || github.server_url }}//${{ github.repository }}/actions/runs/${{ github.run_id }}"},"fingerprint":"${{ steps.set_ids.outputs.final_alert_fingerprint }}"}'
data: '{"enrichments":{"status":"${{ inputs.status || ''resolved'' }}","dismissed":false,"dismissUntil":"","note":"${{ github.event.pull_request.title || ''Manual resolution'' }}","ticket_url":"${{ github.event.pull_request.html_url || format(''{0}/{1}/actions/runs/{2}'', github.server_url, github.repository, github.run_id) }}"},"fingerprint":"${{ steps.set_ids.outputs.final_alert_fingerprint }}"}'
3 changes: 1 addition & 2 deletions keep-ui/app/(keep)/incidents/[id]/chat/incident-chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@ export function IncidentChat({
return (
<EmptyStateCard
title="Chat not available"
description="No alerts found for this incident. Go to the alerts feed and assign alerts to interact with the incident."
buttonText="Assign alerts to this incident"
description="Incident assitant will become available as alerts are assigned to this incident."
onClick={() => router.push("/alerts/feed")}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function IncidentLayoutClient({
/>
</div>
}
initialLeftWidth={60}
initialLeftWidth={65}
/>
) : (
<div className="flex-1 min-w-0">{children}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ export default function IncidentTimeline({

// TODO: Load data on server side
// Loading state is true if the data is not loaded and there is no error for smoother loading state on initial load
const alertsLoading = _alertsLoading || (!alerts && !alertsError);
const auditEventsLoading =
_auditEventsLoading || (!auditEvents && !auditEventsError);
// const alertsLoading = _alertsLoading || (!alerts && !alertsError);
// const auditEventsLoading =
// _auditEventsLoading || (!auditEvents && !auditEventsError);

const [selectedEvent, setSelectedEvent] = useState<AuditEvent | null>(null);

Expand Down Expand Up @@ -358,7 +358,7 @@ export default function IncidentTimeline({
return {};
}, [auditEvents, alerts]);

if (auditEventsLoading || alertsLoading) {
if (_auditEventsLoading || _alertsLoading) {
return (
<Card>
<Loading />
Expand Down
10 changes: 6 additions & 4 deletions keep-ui/components/ui/EmptyStateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function EmptyStateCard({
}: {
title: string;
description: string;
buttonText: string;
buttonText?: string;
onClick: (e: React.MouseEvent) => void;
className?: string;
}) {
Expand All @@ -29,9 +29,11 @@ export function EmptyStateCard({
<p className="text-tremor-default text-tremor-content dark:text-dark-tremor-content">
{description}
</p>
<Button className="mt-4" color="orange" onClick={onClick}>
{buttonText}
</Button>
{buttonText && (
<Button className="mt-4" color="orange" onClick={onClick}>
{buttonText}
</Button>
)}
</div>
</Card>
);
Expand Down
2 changes: 1 addition & 1 deletion keep-ui/components/ui/ResizableColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ResizableColumns = ({
onMouseDown={startDragging}
/>

<div className="flex-1 bg-white p-4 overflow-auto">{rightChild}</div>
<div className="flex-1 p-4 overflow-auto">{rightChild}</div>
</div>
);
};
Expand Down

0 comments on commit 56f184d

Please sign in to comment.