diff options
author | Guillaume Peoc'h <guillaume.peoch@sonarsource.com> | 2022-07-12 11:25:34 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-07-14 20:03:47 +0000 |
commit | cc19ffe514a8548b76d4366ea6728d6fc2f3be01 (patch) | |
tree | 2e34003f6d6ca9d53d26ed72597be8dad4a71be3 /server | |
parent | 4c3977caab5cc82d8f40fbbfb35c689af346d6ff (diff) | |
download | sonarqube-cc19ffe514a8548b76d4366ea6728d6fc2f3be01.tar.gz sonarqube-cc19ffe514a8548b76d4366ea6728d6fc2f3be01.zip |
SONAR-16587 Remove the restart from the System admin page
Diffstat (limited to 'server')
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<Props, State> { target="_blank"> {translate('system.download_system_info')} </a> - {this.props.canRestart && ( - <AdminContext.Consumer> - {({ fetchSystemStatus, systemStatus }) => ( - <RestartButton - className="spacer-left" - fetchSystemStatus={fetchSystemStatus} - systemStatus={systemStatus} - /> - )} - </AdminContext.Consumer> - )} {this.state.openLogsLevelForm && ( <ChangeLogLevelForm infoMsg={translate( diff --git a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx index b36b03b3c9f..44ec350200c 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx @@ -45,7 +45,6 @@ export function PageHeader(props: Props) { {showActions && ( <PageActions canDownloadLogs={!isCluster} - canRestart={!isCluster} cluster={isCluster} logLevel={logLevel} onLogLevelChange={props.onLogLevelChange} diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx index 2e543ce57c2..47ba22c92e0 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx @@ -32,10 +32,8 @@ it('should render correctly', () => { 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( <PageActions canDownloadLogs={true} - canRestart={true} cluster={false} logLevel="INFO" onLogLevelChange={() => {}} 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 </a> - <ContextConsumer> - <Component /> - </ContextConsumer> </div> `; @@ -184,7 +181,7 @@ exports[`should render correctly 2`] = ` </Dropdown> `; -exports[`should render without restart and log download 1`] = ` +exports[`should render without log download 1`] = ` <div className="page-actions" > 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`] = ` </h1> <PageActions canDownloadLogs={false} - canRestart={false} cluster={true} logLevel="INFO" onLogLevelChange={[MockFunction]} @@ -49,7 +48,6 @@ exports[`should render correctly 3`] = ` </h1> <PageActions canDownloadLogs={false} - canRestart={false} cluster={true} logLevel="INFO" onLogLevelChange={[MockFunction]} @@ -119,7 +117,6 @@ exports[`should render correctly: on embedded database 1`] = ` </h1> <PageActions canDownloadLogs={false} - canRestart={false} cluster={true} logLevel="INFO" onLogLevelChange={[MockFunction]} |