Skip to content

Commit 9377db9

Browse files
authored
Merge branch 'main' into Matvey-Kuk/moving-background-tasks-outside-of-the-server
2 parents 0e502d5 + 5aea39e commit 9377db9

File tree

360 files changed

+4577
-3374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+4577
-3374
lines changed

docs/images/appdynamics_1.png

151 KB
Loading

docs/images/appdynamics_10.png

127 KB
Loading

docs/images/appdynamics_2.png

64.9 KB
Loading

docs/images/appdynamics_3.png

68.6 KB
Loading

docs/images/appdynamics_4.png

85.1 KB
Loading

docs/images/appdynamics_5.png

118 KB
Loading

docs/images/appdynamics_6.png

87.4 KB
Loading

docs/images/appdynamics_7.png

90.8 KB
Loading

docs/images/appdynamics_8.png

98.3 KB
Loading

docs/images/appdynamics_9.png

120 KB
Loading

docs/providers/documentation/appdynamics-provider.mdx

+89-7
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,100 @@ The AppDynamics provider requires the following authentication parameter:
1515
- `Host`: This is the hostname of the AppDynamics instance you wish to connect to. It identifies the AppDynamics server that the API will interact with.
1616

1717
## Connecting with the Provider
18-
1. Ensure you have a AppDynamics account with the necessary [permissions](https://docs.appdynamics.com/accounts/en/cisco-appdynamics-on-premises-user-management/roles-and-permissions). The basic permissions required are `Account Owner` or `Administrator`. Alternatively you can create an account (instructions)[https://docs.appdynamics.com/accounts/en/global-account-administration/access-management/manage-user-accounts]
18+
1. Ensure you have a AppDynamics account with the necessary [permissions](https://docs.appdynamics.com/accounts/en/cisco-appdynamics-on-premises-user-management/roles-and-permissions). The basic permissions required are `Account Owner` or `Administrator`. Alternatively you can create an account [instructions](https://docs.appdynamics.com/accounts/en/global-account-administration/access-management/manage-user-accounts)
1919

20-
### Basic Auth authentication
20+
## Provider configuration
2121

22-
Obtain AppDynamics Username and Password:
2322
1. Find your account name [here](https://accounts.appdynamics.com/overview).
23+
2. Get the appId of the Appdynamics instance in which you wish to install the webhook into.
24+
3. Determine the Host [here](https://accounts.appdynamics.com/overview).
2425

25-
OR create Access Token:
26-
1. Follow instructions [here](https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/api-clients)
26+
### Basic Auth authentication
2727

28-
1. Determine the Host [here](https://accounts.appdynamics.com/overview).
29-
2. Get the appId of the Appdynamics instance in which you wish to install the webhook into.
28+
1. Obtain AppDynamics **Username** and **Password**
29+
2. Go to **Basic Auth** tab under **Authentication** section
30+
3. Enter **Username** and **Password**
31+
32+
<Frame>
33+
<img src="/images/appdynamics_9.png" width="1000" alt="Keep add AppDynamics Username and Password"/>
34+
</Frame>
35+
36+
### Access Token authentication
37+
38+
1. Log in to the **Controller UI** as an **Account Owner** or other roles with the **Administer users**, **groups**, **roles** permission.
39+
2. Go to **Administration**
40+
41+
<Frame>
42+
<img src="/images/appdynamics_1.png" width="1000" alt="AppDynamics Administration"/>
43+
</Frame>
44+
45+
3. Go to **API Client** tab
46+
47+
<Frame>
48+
<img src="/images/appdynamics_2.png" width="1000" alt="AppDynamics API Client tab"/>
49+
</Frame>
50+
51+
4. Click **+ Create**
52+
53+
<Frame>
54+
<img src="/images/appdynamics_3.png" width="1000" alt="Create new AppDynamics API Client"/>
55+
</Frame>
56+
57+
5. Fill Client **Name** and **Description**
58+
6. Click **Generate Secret**
59+
60+
<Frame>
61+
<img src="/images/appdynamics_4.png" width="1000" alt="AppDynamics generate API Client Secret"/>
62+
</Frame>
63+
64+
<Tip>
65+
This API Client secret is not an authentication token yet
66+
</Tip>
67+
68+
7. Add **Account Owner** and/or **Administrator** roles
69+
70+
<Frame>
71+
<img src="/images/appdynamics_5.png" width="1000" alt="AppDynamics add API Client roles"/>
72+
</Frame>
73+
74+
8. Click **Save**
75+
76+
<Frame>
77+
<img src="/images/appdynamics_6.png" width="1000" alt="AppDynamics save API Client"/>
78+
</Frame>
79+
80+
9. Click **Generate Temporary Token**
81+
82+
<Frame>
83+
<img src="/images/appdynamics_7.png" width="1000" alt="AppDynamics Generate API Client Temporary Access Token"/>
84+
</Frame>
85+
86+
<Tip>
87+
This token is not persistent, but since Keep uses it just once to install Webhook, we will use it without oAuth
88+
</Tip>
89+
90+
10. Click **Save** one again
91+
<Warning>
92+
This is important. Otherwise generated token will not be saved and authentication will fail
93+
</Warning>
94+
11. Copy generated token
95+
96+
<Frame>
97+
<img src="/images/appdynamics_8.png" width="1000" alt="AppDynamics copy API Client Temporary Access Token"/>
98+
</Frame>
99+
100+
12. Go to **Access Token** tab under **Authentication** section
101+
102+
<Frame>
103+
<img src="/images/appdynamics_10.png" width="1000" alt="Keep add AppDynamics Access Token"/>
104+
</Frame>
105+
106+
13. Enter Access Token
107+
108+
## Connecting provider
109+
110+
1. Ensure **Install webhook** is checked
111+
2. Click **Connect**
30112

31113
## Webhook Integration Modifications
32114

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"use client";
2+
3+
import { notFound } from "next/navigation";
4+
5+
// https://github.com/vercel/next.js/discussions/50034
6+
export default function NotFoundDummy() {
7+
notFound();
8+
}
File renamed without changes.

keep-ui/app/ai/model.ts keep-ui/app/(keep)/ai/model.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ export interface AIStats {
33
incidents_count: number;
44
first_alert_datetime?: Date;
55
is_mining_enabled: boolean;
6-
algorithm_verbose_name: string
6+
algorithm_verbose_name: string;
77
}
88

99
export interface AILogs {
1010
log: string;
11-
}
11+
}
File renamed without changes.

keep-ui/app/alerts/ThemeSelection.tsx keep-ui/app/(keep)/alerts/ThemeSelection.tsx

+61-39
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,54 @@
1-
import React, { useState, Fragment, useRef, FormEvent } from 'react';
2-
import { Popover } from '@headlessui/react';
3-
import { Button, Tab, TabGroup, TabList, TabPanels, TabPanel } from "@tremor/react";
4-
import { IoColorPaletteOutline } from 'react-icons/io5';
1+
import React, { useState, Fragment, useRef, FormEvent } from "react";
2+
import { Popover } from "@headlessui/react";
3+
import {
4+
Button,
5+
Tab,
6+
TabGroup,
7+
TabList,
8+
TabPanels,
9+
TabPanel,
10+
} from "@tremor/react";
11+
import { IoColorPaletteOutline } from "react-icons/io5";
512
import { FloatingArrow, arrow, offset, useFloating } from "@floating-ui/react";
613

714
const predefinedThemes = {
815
Transparent: {
9-
critical: 'bg-white',
10-
high: 'bg-white',
11-
warning: 'bg-white',
12-
low: 'bg-white',
13-
info: 'bg-white'
16+
critical: "bg-white",
17+
high: "bg-white",
18+
warning: "bg-white",
19+
low: "bg-white",
20+
info: "bg-white",
1421
},
1522
Keep: {
16-
critical: 'bg-orange-400', // Highest opacity for critical
17-
high: 'bg-orange-300',
18-
warning: 'bg-orange-200',
19-
low: 'bg-orange-100',
20-
info: 'bg-orange-50' // Lowest opacity for info
23+
critical: "bg-orange-400", // Highest opacity for critical
24+
high: "bg-orange-300",
25+
warning: "bg-orange-200",
26+
low: "bg-orange-100",
27+
info: "bg-orange-50", // Lowest opacity for info
2128
},
2229
Basic: {
23-
critical: 'bg-red-200',
24-
high: 'bg-orange-200',
25-
warning: 'bg-yellow-200',
26-
low: 'bg-green-200',
27-
info: 'bg-blue-200'
28-
}
30+
critical: "bg-red-200",
31+
high: "bg-orange-200",
32+
warning: "bg-yellow-200",
33+
low: "bg-green-200",
34+
info: "bg-blue-200",
35+
},
2936
};
3037

3138
const themeKeyMapping = {
32-
0: 'Transparent',
33-
1: 'Keep',
34-
2: 'Basic'
39+
0: "Transparent",
40+
1: "Keep",
41+
2: "Basic",
3542
};
3643
type ThemeName = keyof typeof predefinedThemes;
3744

38-
export const ThemeSelection = ({ onThemeChange }: { onThemeChange: (theme: any) => void }) => {
45+
export const ThemeSelection = ({
46+
onThemeChange,
47+
}: {
48+
onThemeChange: (theme: any) => void;
49+
}) => {
3950
const arrowRef = useRef(null);
40-
const [selectedTab, setSelectedTab] = useState<ThemeName>('Transparent');
51+
const [selectedTab, setSelectedTab] = useState<ThemeName>("Transparent");
4152

4253
const { refs, floatingStyles, context } = useFloating({
4354
strategy: "fixed",
@@ -50,22 +61,17 @@ export const ThemeSelection = ({ onThemeChange }: { onThemeChange: (theme: any)
5061
handleApplyTheme(themeIndex as 0 | 1 | 2);
5162
};
5263

53-
54-
55-
5664
const handleApplyTheme = (themeKey: keyof typeof themeKeyMapping) => {
5765
const themeName = themeKeyMapping[themeKey];
5866
setSelectedTab(themeName as ThemeName);
59-
};
60-
61-
67+
};
6268

6369
const onApplyTheme = (close: () => void) => {
6470
// themeName is now assured to be a key of predefinedThemes
6571
const themeName: ThemeName = selectedTab;
6672
const newTheme = predefinedThemes[themeName]; // This should now be error-free
6773
onThemeChange(newTheme);
68-
setSelectedTab('Transparent'); // Assuming 'Transparent' is a valid key
74+
setSelectedTab("Transparent"); // Assuming 'Transparent' is a valid key
6975
close(); // Close the popover
7076
};
7177

@@ -85,7 +91,7 @@ export const ThemeSelection = ({ onThemeChange }: { onThemeChange: (theme: any)
8591
<Popover.Panel
8692
className="bg-white z-30 p-4 rounded-sm"
8793
ref={refs.setFloating}
88-
style={{ ...floatingStyles, minWidth: '250px' }} // Adjust width here
94+
style={{ ...floatingStyles, minWidth: "250px" }} // Adjust width here
8995
>
9096
<FloatingArrow
9197
className="fill-white [&>path:last-of-type]:stroke-white"
@@ -100,19 +106,35 @@ export const ThemeSelection = ({ onThemeChange }: { onThemeChange: (theme: any)
100106
<Tab>Basic</Tab>
101107
</TabList>
102108
<TabPanels>
103-
{Object.keys(predefinedThemes).map(themeName => (
109+
{Object.keys(predefinedThemes).map((themeName) => (
104110
<TabPanel key={themeName}>
105-
{Object.entries(predefinedThemes[themeName as keyof typeof predefinedThemes]).map(([severity, color]) => (
106-
<div key={severity} className="flex justify-between items-center my-2">
107-
<span>{severity.charAt(0).toUpperCase() + severity.slice(1).toLowerCase()}</span>
108-
<div className={`w-6 h-6 rounded-full border border-gray-400 ${color}`}></div>
111+
{Object.entries(
112+
predefinedThemes[
113+
themeName as keyof typeof predefinedThemes
114+
]
115+
).map(([severity, color]) => (
116+
<div
117+
key={severity}
118+
className="flex justify-between items-center my-2"
119+
>
120+
<span>
121+
{severity.charAt(0).toUpperCase() +
122+
severity.slice(1).toLowerCase()}
123+
</span>
124+
<div
125+
className={`w-6 h-6 rounded-full border border-gray-400 ${color}`}
126+
></div>
109127
</div>
110128
))}
111129
</TabPanel>
112130
))}
113131
</TabPanels>
114132
</TabGroup>
115-
<Button className="mt-5" color="orange" onClick={() => onApplyTheme(close)}>
133+
<Button
134+
className="mt-5"
135+
color="orange"
136+
onClick={() => onApplyTheme(close)}
137+
>
116138
Apply theme
117139
</Button>
118140
</Popover.Panel>
File renamed without changes.

keep-ui/app/alerts/alert-assign-ticket-modal.tsx keep-ui/app/(keep)/alerts/alert-assign-ticket-modal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Select, { components } from "react-select";
33
import { Button, TextInput, Text } from "@tremor/react";
44
import { PlusIcon } from "@heroicons/react/20/solid";
55
import { useForm, Controller, SubmitHandler } from "react-hook-form";
6-
import { Providers } from "./../providers/providers";
6+
import { Providers } from "../providers/providers";
77
import { useHydratedSession as useSession } from "@/shared/lib/hooks/useHydratedSession";
88
import { useApiUrl } from "utils/hooks/useConfig";
99
import { AlertDto } from "./models";

keep-ui/app/alerts/alert-associate-incident-modal.tsx keep-ui/app/(keep)/alerts/alert-associate-incident-modal.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import { useHydratedSession as useSession } from "@/shared/lib/hooks/useHydrated
66
import { FormEvent, useCallback, useEffect, useState } from "react";
77
import { toast } from "react-toastify";
88
import { useApiUrl } from "utils/hooks/useConfig";
9-
import { useIncidents, usePollIncidents } from "../../utils/hooks/useIncidents";
10-
import Loading from "../loading";
9+
import {
10+
useIncidents,
11+
usePollIncidents,
12+
} from "../../../utils/hooks/useIncidents";
13+
import Loading from "@/app/(keep)/loading";
1114
import { AlertDto } from "./models";
1215
import { getIncidentName } from "@/entities/incidents/lib/utils";
1316

keep-ui/app/alerts/alert-create-incident-ai-modal.tsx keep-ui/app/(keep)/alerts/alert-create-incident-ai-modal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Modal from "@/components/ui/Modal";
33
import { Callout, Button, Title, Card } from "@tremor/react";
44
import { useHydratedSession as useSession } from "@/shared/lib/hooks/useHydratedSession";
55
import { toast } from "react-toastify";
6-
import Loading from "../loading";
6+
import Loading from "@/app/(keep)/loading";
77
import { AlertDto } from "./models";
88
import { IncidentDto, IncidentCandidateDto } from "@/entities/incidents/model";
99
import { useApiUrl } from "utils/hooks/useConfig";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.react-datepicker {
2+
font-size: 14px !important;
3+
color: #070707 !important;
4+
}
5+
6+
.react-datepicker__header {
7+
background-color: white !important;
8+
padding-top: 0px !important;
9+
border: none !important;
10+
}
11+
12+
.react-datepicker__day-name {
13+
color: #c7c7c7 !important;
14+
font-size: 14px !important;
15+
}
16+
17+
.react-datepicker__day {
18+
color: black !important;
19+
font-size: 13px !important;
20+
}
21+
22+
.react-datepicker__day--selected,
23+
.react-datepicker__day--keyboard-selected {
24+
border-radius: 25px !important;
25+
background: orange !important;
26+
color: white !important;
27+
}
28+
29+
.react-datepicker__time-list-item--selected {
30+
background: orange !important;
31+
color: white !important;
32+
}
33+
34+
.react-datepicker__day--disabled,
35+
.react-datepicker__time-list-item--disabled {
36+
color: #c7c7c7 !important;
37+
}

0 commit comments

Comments
 (0)