Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to RC: UI – 2 small unreleased bug fixes for software install policy automat… #22182

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import React, {
import PATHS from "router/paths";
import { AppContext } from "context/app";
import { NotificationContext } from "context/notification";
import { SoftwareInstallStatus, ISoftwarePackage } from "interfaces/software";
import { ISoftwarePackage } from "interfaces/software";
import softwareAPI from "services/entities/software";

import { buildQueryStringFromParams } from "utilities/url";
@@ -102,7 +102,7 @@ const STATUS_DISPLAY_OPTIONS: Record<
<br />
with exit code 0). Currently, if the software is uninstalled, the
<br />
&quot;installed&quot; status won&apos;t be updated.
&quot;Installed&quot; status won&apos;t be updated.
</>
),
},
Original file line number Diff line number Diff line change
@@ -110,16 +110,19 @@ const AddPackage = ({
) {
renderFlash(
"error",
`${reason}. ${(
<>
{reason}{" "}
<CustomLink
newTab
url={`${LEARN_MORE_ABOUT_BASE_LINK}/read-package-version`}
text="Learn more"
iconColor="core-fleet-white"
/>
)} `
</>
);
} else {
renderFlash("error", getErrorMessage(e));
}
renderFlash("error", getErrorMessage(e));
}

onExit();

Unchanged files with check annotations Beta

interface IPlatformWrapperProps {
enrollSecret: string;
onCancel: () => void;
certificate: any;

Check warning on line 59 in frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx

GitHub Actions / lint-js (ubuntu-latest)

Unexpected any. Specify a different type
isFetchingCertificate: boolean;
fetchCertificateError: any;

Check warning on line 61 in frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx

GitHub Actions / lint-js (ubuntu-latest)

Unexpected any. Specify a different type
config: IConfig | null;
}
import Fleet500 from "pages/errors/Fleet500";
import Spinner from "components/Spinner";
import { IMdmVppToken } from "interfaces/mdm";

Check warning on line 35 in frontend/components/App/App.tsx

GitHub Actions / lint-js (ubuntu-latest)

'IMdmVppToken' is defined but never used
interface IAppProps {
children: JSX.Element;
if (authToken() && !location?.pathname.includes("/device/")) {
fetchCurrentUser();
}
}, [location?.pathname]);

Check warning on line 200 in frontend/components/App/App.tsx

GitHub Actions / lint-js (ubuntu-latest)

React Hook useEffect has a missing dependency: 'fetchCurrentUser'. Either include it or remove the dependency array
// Updates title that shows up on browser tabs
useEffect(() => {
!isAnyTeamMaintainerOrTeamAdmin &&
!location?.pathname.includes("/device/");
const getEnrollSecret = async () => {

Check warning on line 226 in frontend/components/App/App.tsx

GitHub Actions / lint-js (ubuntu-latest)

Expected to return a value at the end of async arrow function
try {
const { spec } = await configAPI.loadEnrollSecret();
setEnrollSecret(spec.secrets);
// "any" is used on purpose. We are using Axios but this
// function expects a native React Error type, which is incompatible.
const renderErrorOverlay = ({ error }: any) => {

Check warning on line 243 in frontend/components/App/App.tsx

GitHub Actions / lint-js (ubuntu-latest)

Unexpected any. Specify a different type
// @ts-ignore
console.error(error);
return (
<div
className={clickableUrlClasses}
dangerouslySetInnerHTML={{ __html: sanitizedTextWithLinks }}

Check warning on line 34 in frontend/components/ClickableUrls/ClickableUrls.tsx

GitHub Actions / lint-js (ubuntu-latest)

Dangerous property 'dangerouslySetInnerHTML' found
/>
);
};
isFormField?: boolean;
maxLines?: number;
className?: string;
onChange?: (value: string, event?: any) => void;

Check warning on line 38 in frontend/components/Editor/Editor.tsx

GitHub Actions / lint-js (ubuntu-latest)

Unexpected any. Specify a different type
}
/**
toggleDeleteSecretModal,
isUpdatingSecret,
}: IDeleteSecretModal): JSX.Element => {
const renderTeam = () => {

Check warning on line 24 in frontend/components/EnrollSecrets/DeleteSecretModal/DeleteSecretModal.tsx

GitHub Actions / lint-js (ubuntu-latest)

'renderTeam' is assigned a value but never used
if (typeof selectedTeam === "string") {
selectedTeam = parseInt(selectedTeam, 10);
}
accept: ".pdf",
isLoading: false,
onFileUpload: () => {
alert("File uploaded!");

Check warning on line 15 in frontend/components/FileUploader/FileUploader.stories.tsx

GitHub Actions / lint-js (ubuntu-latest)

Unexpected alert
},
},
};