mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
small fixes to CA story (#27679)
For #27678 adds another error message to UI for custom profiles. also fixes an issue with the wrong link for private key, and also
This commit is contained in:
parent
29034bb230
commit
8f056c83d1
2 changed files with 9 additions and 4 deletions
|
|
@ -88,9 +88,12 @@ export const getErrorMessage = (err: AxiosResponse<IApiError>) => {
|
|||
return generateSecretErrMsg(err);
|
||||
}
|
||||
|
||||
if (apiReason.includes("Fleet variable")) {
|
||||
if (
|
||||
apiReason.includes("Fleet variable") &&
|
||||
apiReason.includes("not supported in configuration profiles")
|
||||
) {
|
||||
return generateUnsupportedVariableErrMsg(apiReason);
|
||||
}
|
||||
|
||||
return apiReason || DEFAULT_ERROR_MESSAGE;
|
||||
return `Couldn't add. ${apiReason}` || DEFAULT_ERROR_MESSAGE;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import React from "react";
|
||||
|
||||
import CustomLink from "components/CustomLink";
|
||||
import { LEARN_MORE_ABOUT_BASE_LINK } from "utilities/constants";
|
||||
import { IDropdownOption } from "interfaces/dropdownOption";
|
||||
import { getErrorReason } from "interfaces/errors";
|
||||
|
||||
import CustomLink from "components/CustomLink";
|
||||
|
||||
const DEFAULT_CERT_AUTHORITY_OPTIONS: IDropdownOption[] = [
|
||||
{ label: "DigiCert", value: "digicert" },
|
||||
{
|
||||
|
|
@ -42,7 +44,7 @@ const PRIVATE_KEY_NOT_CONFIGURED_ERROR = (
|
|||
Private key must be configured.{" "}
|
||||
<CustomLink
|
||||
text="Learn more"
|
||||
url="https://learn-more-about/fleet-server-private-key"
|
||||
url={`${LEARN_MORE_ABOUT_BASE_LINK}/fleet-server-private-key`}
|
||||
newTab
|
||||
variant="flash-message-link"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue