diff --git a/changes/28266-clean-up-settings b/changes/28266-clean-up-settings new file mode 100644 index 0000000000..0bfd2bd45b --- /dev/null +++ b/changes/28266-clean-up-settings @@ -0,0 +1 @@ +* Clean up various empty and configured states on the settings pages diff --git a/frontend/pages/admin/IntegrationsPage/cards/Integrations/Integrations.tsx b/frontend/pages/admin/IntegrationsPage/cards/Integrations/Integrations.tsx index 5199de829c..496bf67abd 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/Integrations/Integrations.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/Integrations/Integrations.tsx @@ -17,6 +17,7 @@ import configAPI from "services/entities/config"; import TableContainer from "components/TableContainer"; import TableDataError from "components/DataError"; import SectionHeader from "components/SectionHeader"; +import Spinner from "components/Spinner"; import AddIntegrationModal from "./components/AddIntegrationModal"; import DeleteIntegrationModal from "./components/DeleteIntegrationModal"; @@ -267,6 +268,41 @@ const Integrations = (): JSX.Element => { [jiraIntegrations, zendeskIntegrations] ); + const renderTable = () => { + if (loadingIntegrationsError) { + return ; + } + if (isLoadingIntegrations) { + return ; + } + return ( + ( + + )} + showMarkAllPages={false} + isAllPagesSelected={false} + disablePagination + /> + ); + }; + return (
@@ -274,34 +310,7 @@ const Integrations = (): JSX.Element => { Add or edit integrations to create tickets when Fleet detects new vulnerabilities.

- {loadingIntegrationsError ? ( - - ) : ( - ( - - )} - showMarkAllPages={false} - isAllPagesSelected={false} - disablePagination - /> - )} + {renderTable()} {showAddIntegrationModal && ( { - const header = "Email already configured"; - const info = ( - <> - To configure SMTP,{" "} - - + const sesBaseClass = `${baseClass}__ses-enabled`; + return ( + +
+

Email already configured

+

+ To configure SMTP,{" "} + +

+
+
); - return ; }; const renderSmtpForm = () => { diff --git a/frontend/pages/admin/_styles.scss b/frontend/pages/admin/_styles.scss index 10c4aa141c..66f1be2406 100644 --- a/frontend/pages/admin/_styles.scss +++ b/frontend/pages/admin/_styles.scss @@ -30,7 +30,7 @@ .side-nav__card-container { // all side navs in the admin section we want to limit the max width - > * { + > *:not(.loading-spinner) { width: 100%; max-width: $settings-form-max-width; }