From 374e5058160802070c22107d8d90764a11e92b53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Fri, 26 May 2017 11:02:02 +0200 Subject: [PATCH] SONAR-9330 Display the loading spinner immediately when page loads --- server/sonar-web/public/index.html | 7 +++- .../main/js/app/components/GlobalLoading.css | 19 ---------- .../main/js/app/components/GlobalLoading.js | 1 - .../main/less/components/global-loading.less | 38 +++++++++++++++++++ server/sonar-web/src/main/less/sonar.less | 1 + 5 files changed, 45 insertions(+), 21 deletions(-) delete mode 100644 server/sonar-web/src/main/js/app/components/GlobalLoading.css create mode 100644 server/sonar-web/src/main/less/components/global-loading.less diff --git a/server/sonar-web/public/index.html b/server/sonar-web/public/index.html index f616d690eb0..c7feadbcc69 100644 --- a/server/sonar-web/public/index.html +++ b/server/sonar-web/public/index.html @@ -28,7 +28,12 @@ SonarQube -
+
+
+ + Loading... +
+
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %> diff --git a/server/sonar-web/src/main/js/app/components/GlobalLoading.css b/server/sonar-web/src/main/js/app/components/GlobalLoading.css deleted file mode 100644 index 5537f22c69a..00000000000 --- a/server/sonar-web/src/main/js/app/components/GlobalLoading.css +++ /dev/null @@ -1,19 +0,0 @@ -.global-loading { - width: 300px; - margin: 200px auto 0; - white-space: nowrap; -} - -.global-loading-spinner { - vertical-align: middle; - width: 80px; - height: 80px; -} - -.global-loading-text { - display: inline-block; - vertical-align: middle; - margin-left: 30px; - font-size: 36px; - font-weight: 300; -} diff --git a/server/sonar-web/src/main/js/app/components/GlobalLoading.js b/server/sonar-web/src/main/js/app/components/GlobalLoading.js index 28917188145..060596c99b4 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalLoading.js +++ b/server/sonar-web/src/main/js/app/components/GlobalLoading.js @@ -19,7 +19,6 @@ */ // @flow import React from 'react'; -import './GlobalLoading.css'; export default function GlobalLoading() { return ( diff --git a/server/sonar-web/src/main/less/components/global-loading.less b/server/sonar-web/src/main/less/components/global-loading.less new file mode 100644 index 00000000000..1579ca0aabf --- /dev/null +++ b/server/sonar-web/src/main/less/components/global-loading.less @@ -0,0 +1,38 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +.global-loading { + width: 300px; + margin: 200px auto 0; + white-space: nowrap; +} + +.global-loading-spinner { + vertical-align: middle; + width: 80px; + height: 80px; +} + +.global-loading-text { + display: inline-block; + vertical-align: middle; + margin-left: 30px; + font-size: 36px; + font-weight: 300; +} diff --git a/server/sonar-web/src/main/less/sonar.less b/server/sonar-web/src/main/less/sonar.less index 897a05b0d65..876ad49a4e2 100644 --- a/server/sonar-web/src/main/less/sonar.less +++ b/server/sonar-web/src/main/less/sonar.less @@ -31,6 +31,7 @@ @import "init/misc"; @import "components/ui"; +@import "components/global-loading"; @import "components/source"; @import "components/bubble-popup"; @import "components/modals"; -- 2.39.5