diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-07-10 14:41:16 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-07-10 20:21:20 +0200 |
commit | f09ee6b610528aa37b7b51be395c93524cebae8f (patch) | |
tree | c1ec210eb18ce9ae6a86b5c68f10ceef9dfcab50 /server/sonar-web/src/main/js/apps/sessions | |
parent | 4e9feaddc45af56194e90e941d591bc465add571 (diff) | |
download | sonarqube-f09ee6b610528aa37b7b51be395c93524cebae8f.tar.gz sonarqube-f09ee6b610528aa37b7b51be395c93524cebae8f.zip |
load web app asynchronously (#493)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/sessions')
-rw-r--r-- | server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap | 24 |
2 files changed, 12 insertions, 18 deletions
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx index ab0cecf826e..6d322c62ac4 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Link } from 'react-router'; import DeferredSpinner from '../../../components/common/DeferredSpinner'; import GlobalMessagesContainer from '../../../app/components/GlobalMessagesContainer'; import { SubmitButton } from '../../../components/ui/buttons'; import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import './LoginForm.css'; interface Props { @@ -129,9 +129,9 @@ export default class LoginForm extends React.PureComponent<Props, State> { <SubmitButton disabled={this.state.loading}> {translate('sessions.log_in')} </SubmitButton> - <Link className="spacer-left" to="/"> + <a className="spacer-left" href={`${getBaseUrl()}/`}> {translate('cancel')} - </Link> + </a> </div> </div> </form> diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap index aa19aded41e..4790486f71e 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap @@ -76,14 +76,12 @@ exports[`expands more options 2`] = ` > sessions.log_in </SubmitButton> - <Link + <a className="spacer-left" - onlyActiveOnIndex={false} - style={Object {}} - to="/" + href="/" > cancel - </Link> + </a> </div> </div> </form> @@ -151,14 +149,12 @@ exports[`logs in with simple credentials 1`] = ` > sessions.log_in </SubmitButton> - <Link + <a className="spacer-left" - onlyActiveOnIndex={false} - style={Object {}} - to="/" + href="/" > cancel - </Link> + </a> </div> </div> </form> @@ -226,14 +222,12 @@ exports[`should display a spinner and disabled button while loading 1`] = ` > sessions.log_in </SubmitButton> - <Link + <a className="spacer-left" - onlyActiveOnIndex={false} - style={Object {}} - to="/" + href="/" > cancel - </Link> + </a> </div> </div> </form> |