Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/components/modal/monitor/pages/initial/parent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ const MonitorParentSelect = ({
key={monitor.monitorId}
onClick={() => onSelect(monitor.monitorId)}
>
<img
src={monitor?.icon?.url}
style={{ width: '20px', height: '20px' }}
/>
{monitor.name}
</Dropdown.Item>
))}
Expand Down
55 changes: 54 additions & 1 deletion app/components/modal/settings/authentication/configure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ const SettingsAuthenticationConfigureModal = ({
const [values, setValues] = useState({
clientId: provider?.clientId || '',
clientSecret: provider?.clientSecret || '',
authUrl: provider?.data?.authUrl || '',
tokenUrl: provider?.data?.tokenUrl || '',
userInfoUrl: provider?.data?.userInfoUrl || '',
name: provider?.data?.name || '',
});

const currentUrl = useCurrentUrl();
const { addProvider } = useAuthenticationContext();

Expand All @@ -35,7 +40,12 @@ const SettingsAuthenticationConfigureModal = ({
clientId: values.clientId,
clientSecret: values.clientSecret,
enabled: true,
data: {},
data: {
tokenUrl: values.tokenUrl,
name: values.name,
authUrl: values.authUrl,
userInfoUrl: values.userInfoUrl,
},
};

const provider = await createPostRequest(
Expand Down Expand Up @@ -70,6 +80,49 @@ const SettingsAuthenticationConfigureModal = ({
}
onClose={closeModal}
>
{integration.id === 'custom' && (
<>
<Input
id="name"
title="Name"
value={values.name}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setValues((prev) => ({ ...prev, name: e.target.value }))
}
isRequired
/>

<Input
id="auth-url"
title="Authorization URL"
value={values.authUrl}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setValues((prev) => ({ ...prev, authUrl: e.target.value }))
}
isRequired
/>

<Input
id="token-url"
title="Token URL"
value={values.tokenUrl}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setValues((prev) => ({ ...prev, tokenUrl: e.target.value }))
}
isRequired
/>

<Input
id="user-info-url"
title="User Info URL"
value={values.userInfoUrl}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setValues((prev) => ({ ...prev, userInfoUrl: e.target.value }))
}
isRequired
/>
</>
)}
<Input
id="client-id"
title="Client ID"
Expand Down
8 changes: 7 additions & 1 deletion app/types/context/authentication.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// List of providers type
export type Providers = 'discord' | 'github' | 'google' | 'slack' | 'twitch';
export type Providers =
| 'custom'
| 'discord'
| 'github'
| 'google'
| 'slack'
| 'twitch';

export interface ContextAuthenticationConfigProps {
nativeSignin: boolean;
Expand Down
170 changes: 5 additions & 165 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lunalytics",
"version": "0.10.13",
"version": "0.10.14",
"description": "Open source Node.js server/website monitoring tool",
"private": true,
"author": "KSJaay <ksjaay@gmail.com>",
Expand Down Expand Up @@ -55,7 +55,6 @@
"cors": "2.8.5",
"cron": "4.3.1",
"cross-env": "7.0.3",
"curlconverter": "4.12.0",
"dayjs": "1.11.13",
"express": "4.21.2",
"i18next": "25.3.2",
Expand Down
Loading