From cc19ffe514a8548b76d4366ea6728d6fc2f3be01 Mon Sep 17 00:00:00 2001 From: Guillaume Peoc'h Date: Tue, 12 Jul 2022 11:25:34 +0200 Subject: [PATCH] SONAR-16587 Remove the restart from the System admin page --- .../pages/instance-administration/marketplace.md | 6 ++---- .../main/js/apps/system/components/PageActions.tsx | 14 -------------- .../main/js/apps/system/components/PageHeader.tsx | 1 - .../components/__tests__/PageActions-test.tsx | 7 ++----- .../__snapshots__/PageActions-test.tsx.snap | 5 +---- .../__snapshots__/PageHeader-test.tsx.snap | 3 --- 6 files changed, 5 insertions(+), 31 deletions(-) diff --git a/server/sonar-docs/src/pages/instance-administration/marketplace.md b/server/sonar-docs/src/pages/instance-administration/marketplace.md index 239b962e13b..da1952ef783 100644 --- a/server/sonar-docs/src/pages/instance-administration/marketplace.md +++ b/server/sonar-docs/src/pages/instance-administration/marketplace.md @@ -31,10 +31,8 @@ To view/install plugin updates, your SonarQube server needs internet access. Ins When you perform an action in the Marketplace (install, update, or uninstall a plugin), a yellow banner appears at the top of the page showing pending operations that will be executed once SonarQube is restarted. Pending operations can be canceled until the server is restarted. ## Restart SonarQube -Restarting SonarQube can be done manually from the command line by running `sonar.sh restart` or directly from the UI: - -* in the Update Center when you have Pending Changes, the restart button will be displayed in the yellow banner (see Pending Operations) -* in the System Info page at any time +Restarting SonarQube can be done manually from the command line by running `sonar.sh restart`. +In SonarQube Community Edition, you can also restart from the UI, in the Update Center. When you have Pending Changes, the restart button will be displayed in the yellow banner (see Pending Operations). Please note that restarting the server won't reload the changes applied to the **sonar.properties**. ## Manual Updates If you're using a commercial edition or your server doesn't have internet access, you won't be able to rely on the Marketplace for plugins, and you will have to handle plugin installations and upgrades manually. diff --git a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx index 527ec1b1ee7..ffcd1ed9712 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx @@ -18,8 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import AdminContext from '../../../app/components/AdminContext'; -import RestartButton from '../../../components/common/RestartButton'; import { Button, EditButton } from '../../../components/controls/buttons'; import Dropdown from '../../../components/controls/Dropdown'; import DropdownIcon from '../../../components/icons/DropdownIcon'; @@ -30,7 +28,6 @@ import ChangeLogLevelForm from './ChangeLogLevelForm'; interface Props { canDownloadLogs: boolean; - canRestart: boolean; cluster: boolean; logLevel: string; onLogLevelChange: () => void; @@ -156,17 +153,6 @@ export default class PageActions extends React.PureComponent { target="_blank"> {translate('system.download_system_info')} - {this.props.canRestart && ( - - {({ fetchSystemStatus, systemStatus }) => ( - - )} - - )} {this.state.openLogsLevelForm && ( { expect(wrapper.find('Dropdown')).toMatchSnapshot(); }); -it('should render without restart and log download', () => { - expect( - getWrapper({ canDownloadLogs: false, canRestart: false, cluster: true }) - ).toMatchSnapshot(); +it('should render without log download', () => { + expect(getWrapper({ canDownloadLogs: false, cluster: true })).toMatchSnapshot(); }); it('should open change log level modal', () => { @@ -48,7 +46,6 @@ function getWrapper(props = {}) { return shallow( {}} diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap index 01cd2d0dee6..c388d56ea63 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap @@ -104,9 +104,6 @@ exports[`should render correctly 1`] = ` > system.download_system_info - - - `; @@ -184,7 +181,7 @@ exports[`should render correctly 2`] = ` `; -exports[`should render without restart and log download 1`] = ` +exports[`should render without log download 1`] = `
diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap index 42c55f420c6..c8ef70f9e61 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap @@ -11,7 +11,6 @@ exports[`should render correctly 1`] = `