mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
[tiny unreleased bugs] Fleet UI: Calendar feature calendar settings page (#17905)
This commit is contained in:
parent
fc19b0fa5f
commit
2a8d84a0fe
@ -27,7 +27,7 @@ const GOOGLE_WORKSPACE_DOMAINS =
|
|||||||
const DOMAIN_WIDE_DELEGATION =
|
const DOMAIN_WIDE_DELEGATION =
|
||||||
"https://www.fleetdm.com/learn-more-about/domain-wide-delegation";
|
"https://www.fleetdm.com/learn-more-about/domain-wide-delegation";
|
||||||
const ENABLING_CALENDAR_API =
|
const ENABLING_CALENDAR_API =
|
||||||
"fleetdm.com/learn-more-about/enabling-calendar-api";
|
"https://www.fleetdm.com/learn-more-about/enabling-calendar-api";
|
||||||
const OAUTH_SCOPES =
|
const OAUTH_SCOPES =
|
||||||
"https://www.googleapis.com/auth/calendar.events,https://www.googleapis.com/auth/calendar.settings.readonly";
|
"https://www.googleapis.com/auth/calendar.events,https://www.googleapis.com/auth/calendar.settings.readonly";
|
||||||
|
|
||||||
@ -112,10 +112,10 @@ const Calendars = (): JSX.Element => {
|
|||||||
|
|
||||||
// Must set all keys or no keys at all
|
// Must set all keys or no keys at all
|
||||||
if (!curFormData.apiKeyJson && !!curFormData.domain) {
|
if (!curFormData.apiKeyJson && !!curFormData.domain) {
|
||||||
errors.apiKeyJson = "API key JSON must be present";
|
errors.apiKeyJson = "API key JSON must be completed";
|
||||||
}
|
}
|
||||||
if (!curFormData.domain && !!curFormData.apiKeyJson) {
|
if (!curFormData.domain && !!curFormData.apiKeyJson) {
|
||||||
errors.domain = "Domain must be present";
|
errors.domain = "Domain must be completed";
|
||||||
}
|
}
|
||||||
if (curFormData.apiKeyJson) {
|
if (curFormData.apiKeyJson) {
|
||||||
try {
|
try {
|
||||||
@ -167,11 +167,11 @@ const Calendars = (): JSX.Element => {
|
|||||||
await configAPI.update({ integrations: destination });
|
await configAPI.update({ integrations: destination });
|
||||||
renderFlash(
|
renderFlash(
|
||||||
"success",
|
"success",
|
||||||
"Successfully saved calendar integration settings"
|
"Successfully saved calendar integration settings."
|
||||||
);
|
);
|
||||||
refetchConfig();
|
refetchConfig();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
renderFlash("error", "Could not save calendar integration settings");
|
renderFlash("error", "Could not save calendar integration settings.");
|
||||||
} finally {
|
} finally {
|
||||||
setIsUpdatingSettings(false);
|
setIsUpdatingSettings(false);
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ const Calendars = (): JSX.Element => {
|
|||||||
</p>
|
</p>
|
||||||
<p className={`${baseClass}__configuration`}>
|
<p className={`${baseClass}__configuration`}>
|
||||||
5. Configure your service account integration in Fleet using the
|
5. Configure your service account integration in Fleet using the
|
||||||
form below:
|
form below.
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
Paste the full contents of the JSON file downloaded when
|
Paste the full contents of the JSON file downloaded when
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
margin-block-start: $pad-small;
|
margin-block-start: $pad-small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin: $pad-small 0;
|
margin: $pad-small 0;
|
||||||
}
|
}
|
||||||
@ -27,6 +31,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__api-key-json {
|
&__api-key-json {
|
||||||
|
font-family: "SourceCodePro", $monospace;
|
||||||
min-width: 100%; // resize vertically only
|
min-width: 100%; // resize vertically only
|
||||||
height: 294px;
|
height: 294px;
|
||||||
font-size: $x-small;
|
font-size: $x-small;
|
||||||
|
Loading…
Reference in New Issue
Block a user