From e2c4b886964dc4682f724893639846559c16e816 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 9 May 2017 15:07:57 +0200 Subject: [PATCH] clean quality gates styles --- .../components/QualityGatesApp.js | 1 + .../src/main/js/apps/quality-gates/styles.css | 8 + .../quality-gate-detail-projects.hbs | 13 -- .../quality-gates/views/gate-projects-view.js | 3 +- .../src/main/less/pages/quality-gates.less | 149 ------------------ server/sonar-web/src/main/less/sonar.less | 1 - 6 files changed, 10 insertions(+), 165 deletions(-) create mode 100644 server/sonar-web/src/main/js/apps/quality-gates/styles.css delete mode 100644 server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gate-detail-projects.hbs delete mode 100644 server/sonar-web/src/main/less/pages/quality-gates.less diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js index cb7ec0746fb..6bfddd60fe8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js @@ -24,6 +24,7 @@ import { fetchQualityGatesAppDetails, fetchQualityGates as fetchQualityGatesAPI } from '../../../api/quality-gates'; +import '../styles.css'; export default class QualityGatesApp extends Component { state = {}; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/styles.css b/server/sonar-web/src/main/js/apps/quality-gates/styles.css new file mode 100644 index 00000000000..f9a40f07de4 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/quality-gates/styles.css @@ -0,0 +1,8 @@ +.quality-gate-section { + max-width: 1440px; +} + +.quality-gate-section + .quality-gate-section { + margin-top: 10px; + padding-top: 20px; +} \ No newline at end of file diff --git a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gate-detail-projects.hbs b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gate-detail-projects.hbs deleted file mode 100644 index 1622542fcc5..00000000000 --- a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gate-detail-projects.hbs +++ /dev/null @@ -1,13 +0,0 @@ -
{{t 'quality_gates.projects'}}
- -{{#if isDefault}} -

- {{#if canEdit}} - {{t 'quality_gates.projects_for_default.edit'}} - {{else}} - {{t 'quality_gates.projects_for_default'}} - {{/if}} -

-{{else}} -
-{{/if}} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js index 7366f2533aa..6df371f3a93 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js @@ -19,12 +19,11 @@ */ import Marionette from 'backbone.marionette'; import escapeHtml from 'escape-html'; -import Template from '../templates/quality-gate-detail-projects.hbs'; import '../../../components/SelectList'; import { translate } from '../../../helpers/l10n'; export default Marionette.ItemView.extend({ - template: Template, + template: () => {}, onRender() { const { qualityGate } = this.options; diff --git a/server/sonar-web/src/main/less/pages/quality-gates.less b/server/sonar-web/src/main/less/pages/quality-gates.less deleted file mode 100644 index 418f71e8859..00000000000 --- a/server/sonar-web/src/main/less/pages/quality-gates.less +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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. - */ -@import (reference) "../variables"; -@import (reference) "../mixins"; - -.quality-gates-side { - background-color: @barBackgroundColor; -} - -@qualityGateSidebarWidth: 230px; - -.quality-gates-navigator { - - .navigator-side { - display: table-cell; - vertical-align: top; - width: @qualityGateSidebarWidth + 2 * @navigatorPadding; - min-width: 0; - } - - .navigator-header { - margin-left: 0; - .spinner { margin-top: 9px; } - } - - .navigator-actions { - height: @navigatorHeaderHeight; - width: @qualityGateSidebarWidth; - margin: @navigatorPadding; - padding: (@navigatorHeaderHeight - @formControlHeight) / 2 @navigatorPadding; - - .navigator-header-title { - color: @baseFontColor; - font-size: 13px; - font-weight: bold; - text-transform: uppercase; - } - } - - .navigator-results { - width: @qualityGateSidebarWidth; - min-width: 0; - } - - .navigator-details { margin-left: 0; } - -} - - -.quality-gates-nav { - - .navigator-results-list { - - & > li { - border-color: transparent; - - &:hover:not(.active):not(.empty) { - background-color: @barBackgroundColor; - } - - &.active { - border-color: #4B9FD5; - } - - &.empty { - cursor: default; - } - - .line { - padding-top: 2px; - padding-bottom: 2px; - } - } - } -} - -.quality-gate-section { - max-width: 1440px; -} - -.quality-gate-section + .quality-gate-section { - margin-top: @navigatorPadding; - padding-top: 2 * @navigatorPadding; -} - -.quality-gate-section-empty + .quality-gate-section { - border-top: 1px solid @barBorderColor; -} - -.quality-gate-section-name { - margin-bottom: @navigatorPadding; - font-weight: bold; - text-transform: uppercase; -} - - -.quality-gate-introduction { - margin-bottom: 2 * @navigatorPadding; -} - - -.quality-gate-new-condition { - margin-bottom: @navigatorPadding; -} - -.quality-gate-condition-actions { - position: relative; -} - -.quality-gate-default-message { - padding: 6px 5px; - border: 1px solid #ddd; - background-color: #efefef; -} - -.quality-gate-conditions-wrap { - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; -} - -.quality-gate-conditions { - & .deprecated { - color: #777; - text-transform: lowercase; - font-variant: small-caps; - } - - tbody { - border-left: none !important; - border-right: none !important; - } -} diff --git a/server/sonar-web/src/main/less/sonar.less b/server/sonar-web/src/main/less/sonar.less index 7d819138a74..897a05b0d65 100644 --- a/server/sonar-web/src/main/less/sonar.less +++ b/server/sonar-web/src/main/less/sonar.less @@ -59,7 +59,6 @@ @import "components/react-select"; @import "pages/coding-rules"; -@import "pages/quality-gates"; @import "pages/maintenance"; @import "pages/login"; -- 2.39.5