From 0068e827180b6fabe54b57bd0410723c4eda209c Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Thu, 4 Jan 2018 13:08:49 +0100 Subject: [PATCH] new styling and markup --- .../AlertRuleList/AlertRuleList.tsx | 69 ++++---- .../app/plugins/panel/alertlist/module.html | 84 +++++---- public/sass/pages/_alerting.scss | 160 +++++++++++------- 3 files changed, 177 insertions(+), 136 deletions(-) diff --git a/public/app/containers/AlertRuleList/AlertRuleList.tsx b/public/app/containers/AlertRuleList/AlertRuleList.tsx index b12a9f234d0..0d32a4fca1b 100644 --- a/public/app/containers/AlertRuleList/AlertRuleList.tsx +++ b/public/app/containers/AlertRuleList/AlertRuleList.tsx @@ -52,6 +52,18 @@ export class AlertRuleList extends React.Component {
+
+ +
@@ -69,8 +81,10 @@ export class AlertRuleList extends React.Component {
-
-
    {alertList.rules.map(rule => )}
+
+
    + {alertList.rules.map(rule => )} +
@@ -108,36 +122,33 @@ export class AlertRuleItem extends React.Component { let ruleUrl = `dashboard/${rule.dashboardUri}?panelId=${rule.panelId}&fullscreen&edit&tab=alert`; return ( -
  • -
    -
    -
  • +
    + + + +
    + -
    -
    -
    - -
    - - {rule.stateText} - - for {rule.stateAge} -
    - {rule.info &&
    {rule.info}
    } +
    + {rule.stateText} + for {rule.stateAge}
    + {rule.info &&
    {rule.info}
    } +
    +
  • ); diff --git a/public/app/plugins/panel/alertlist/module.html b/public/app/plugins/panel/alertlist/module.html index bb946817cbd..abc35cef7fb 100644 --- a/public/app/plugins/panel/alertlist/module.html +++ b/public/app/plugins/panel/alertlist/module.html @@ -3,24 +3,22 @@ {{ctrl.noAlertsMessage}} -
    -
      -
    1. -
      -
      -
      - -
      -
      -

      - - {{alert.name}} - -

      -

      - {{alert.stateModel.text}} - for {{alert.newStateDateAgo}} -

      +
      +
        +
      1. +
        +
        + +
        +
        +

        + + {{alert.name}} + +

        +
        + {{alert.stateModel.text}} + for {{alert.newStateDateAgo}}
        @@ -28,30 +26,28 @@
      -
      -
        -
      1. -
        -
        -
        - -
        -
        -

        {{al.alertName}}

        -
        - {{al.stateModel.text}} - {{al.info}} -
        -
        -
        - -
        -
      2. -
      -
      +
      +
        +
      1. +
        +
        + +
        +
        +

        {{al.alertName}}

        +
        + {{al.stateModel.text}} +
        +
        + {{al.info}} +
        + +
      2. +
      +
      diff --git a/public/sass/pages/_alerting.scss b/public/sass/pages/_alerting.scss index b20c90cda1c..384af829be6 100644 --- a/public/sass/pages/_alerting.scss +++ b/public/sass/pages/_alerting.scss @@ -28,69 +28,6 @@ border: 0; } -// Alert List -.alert-list { - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.alert-list-icon { - font-weight: bold; - display: flex; - justify-content: center; - align-items: center; - .icon-gf, - .fa { - font-size: 200%; - position: relative; - top: 2px; - } -} - -.alert-list-body { - display: flex; -} - -.alert-list-main { - padding: 0 2rem; - display: flex; - flex-direction: column; - justify-content: center; -} - -.alert-list-title { - font-size: $font-size-base; - margin: 0; - font-weight: 600; -} - -.alert-list-state { - font-weight: bold; -} - -.alert-list-text { - font-size: $font-size-sm; - margin: 0; - line-height: 1.5rem; - color: $text-color-weak; -} - -.alert-list-info { - color: $text-color; -} - -.alert-list-info-left { - padding-left: 2rem; -} - -.alert-list-footer { - display: flex; - justify-content: space-between; - flex-direction: column; - align-items: flex-end; -} - .panel-has-alert { .panel-alert-icon:before { content: '\e611'; @@ -136,3 +73,100 @@ opacity: 1; } } + +// Alert List +// Alert List + +.alert-rule-list { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + list-style-type: none; +} + +.alert-rule-item { + display: flex; + justify-content: space-between; + width: 100%; + height: 100%; + background: $card-background; + box-shadow: $card-shadow; + padding: 4px 8px; + border-radius: 4px; + margin-bottom: 4px; +} + +.alert-rule-item__body { + display: flex; + width: 100%; + //flex-grow: 2; +} + +.alert-rule-item__icon { + font-weight: bold; + display: flex; + justify-content: center; + align-items: center; + width: 40px; + .icon-gf, + .fa { + font-size: 200%; + position: relative; + top: 2px; + } +} + +.alert-rule-item__header { + padding: 0 20px; + display: flex; + flex-direction: column; + justify-content: space-between; + //width: 100%; +} + +.alert-rule-item__name { + font-size: $font-size-base; + margin: 0; + font-weight: 600; +} + +.alert-list__btn { + margin: 0 2px; + display: flex; + align-items: center; + justify-content: center; +} + +.alert-rule-item__text { + font-weight: bold; + font-size: $font-size-sm; + margin: 0; +} + +.alert-rule-item__time { + color: $text-color-weak; + font-weight: normal; +} + +.alert-rule-item__info { + //color: $text-color; + font-weight: normal; + flex-grow: 2; + display: flex; + align-items: flex-end; + padding-left: 20px; +} + +.alert-rule-item__footer { + display: flex; + align-items: center; +} + +.alert-list__footer--column { + flex-direction: column; +} + +.alert-tesint { + display: flex; +}