Added hardware sensors functionality
Change-Id: I99435613bb77fc0ff72f046c2dc047b13962a7a3
Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
diff --git a/app/server-health/styles/sensors.scss b/app/server-health/styles/sensors.scss
index f720c3b..cd30d6f 100644
--- a/app/server-health/styles/sensors.scss
+++ b/app/server-health/styles/sensors.scss
@@ -1,4 +1,3 @@
-
@mixin state-label {
text-transform: uppercase;
font-weight: 700;
@@ -7,243 +6,136 @@
$title-minWidth: 210px;
-.sensor__heading {
+.header__actions-bar {
+ padding-left: 1.5em;
font-weight: 700;
- &.middle,
- &.right {
- display: none;
- @media (min-width: 950px) {
- display: inline-block;
- }
+ .sensor__heading-current {
+ padding-right: 1em;
}
}
-.sensor__critical-label {
- color: $thresh-critical;
- @include state-label;
-}
-.sensor__warning-label {
- color: $thresh-warning;
- @include state-label;
+.sensor__heading-current {
+ margin: 0;
+ @include mediaQuery(medium) {
+ margin-left: 10px;
+ margin-right: 10px;
+ }
}
-#sensors-overview {
- .sensor__group {
- position: relative;
- display: block;
- margin: .5em 0;
- background: $white;
- padding: 1.5em 6em 1.5em 3.7em;
- text-decoration: none;
- border: 1px solid $lightgrey;
+.sensor__label {
+ float: left;
+ font-weight: 300;
+ @include mediaQuery(medium) {
+ display: none;
+ }
+}
+
+.sensor__title {
+ min-width: 30%;
+ margin-bottom: 0;
+}
+
+.sensor__reading {
+ width: 100%;
+ text-align: right;
+ margin-bottom: 0;
+ display: none;
+ @include mediaQuery(medium) {
+ display: inline-block;
+ width: auto;
+ min-width: calc(70% * (1 / 5) - 10px);
+ }
+}
+
+.sensor__readings-row {
+ position: relative;
+ display: block;
+ margin: 0;
+ background: $white;
+ text-decoration: none;
+ border: 1px solid $medgrey;
+ background: lighten($lightgrey,1%);
+ margin-top: 1em;
+ @include mediaQuery(medium) {
+ padding: .3em 1em .3em 1.5em;
+ margin-top: 0;
+ border-top: 0;
+ background: transparent;
+ }
+ .icon {
+ margin: -8px 0 -8px -8px;
+ }
+ .sensor__title {
font-weight: 700;
- &:hover {
- background: $lightblue;
+ background: darken($lightgrey, 5%);
+ min-width: 100%;
+ padding: .8em;
+ @include mediaQuery(medium) {
+ min-width: 30%;
+ background: transparent;
+ padding: .5em .5em .5em 0;
+ }
+ }
+ .content-label {
+ font-size: 1em;
+ margin-left: .8em;
+ color: lighten($darkgrey, 10%);
+ }
+ .sensor__reading {
+ @include fontCourierBold;
+ display: block;
+ padding: .3em .8em;
+ @include mediaQuery(medium) {
+ display: inline-block;
+ padding: 0;
+ }
+ }
+ .sensor__current {
+ background: darken($thresh-normal, 3%);
+ margin: 0;
+ @include mediaQuery(medium) {
+ background: $thresh-normal;
+ padding: .7em 1em;
+ margin-left: 10px;
+ margin-right: 10px;
+ }
+ .sensor__label {
+ font-weight: 700;
+ @include mediaQuery(medium) {
+ font-weight:300;
+ }
+ }
+ }
+ .sensor__critical {
+ background: $thresh-critical;
+ color: $white;
+ .content-label {
+ color: $white;
+ }
+ }
+ .sensor__warn {
+ background: $thresh-warning;
+ color: $black;
+ .content-label {
color: $black;
}
- @include mediaQuery(x-large) {
- //max-width: 60%;
- }
}
- .priority-tag-circ {
- position: absolute;
- top: 50%;
- left: 1.2em;
- transform: translateY(-50%);
- }
- .header__actions-bar {
- padding-left: 3.5em;
- padding-right: 7.3em;
- }
+
}
// Sensors
#sensors, #sensors-overview {
- .accord-row {
- padding-left: 3.7em;
- padding-right: 1em;
- }
+
.content__search {
max-width: 100%;
@media(min-width: 1300px) {
- max-width: 50%;
+ max-width: 70%;
}
}
.toggle-filter {
- display: inline-block;
margin-right: 0;
}
}
-#back-link {
- margin: 1em 0 0;
- a {
- text-decoration: none;
- position: relative;
- display: inline-block;
- padding-left: 1.2em;
- font-weight: 700;
- &:before {
- content: '\221F';
- position: absolute;
- top: 50%;
- left: 0;
- transform: translateY(-53%) rotate(45deg);
- display: inline-block;
- margin-right: 6px;
- font-size: 1.1em;
- font-weight: bold;
- text-shadow: 0 0 1px black;
- }
- &:hover {
- text-decoration: underline;
- }
- }
-}
-
-#sensor__details {
- display: block;
- margin-top: .6em;
- position: relative;
- overflow: hidden;
-
- .header__actions-bar {
- position: relative;
- padding: 1em 35px 0 3.7em;
-
- .priority-tag-circ {
- position: absolute;
- left: 1.2em;
- top: 50%;
- transform: translateY(-50%);
- &.high-priority {
- background-color: rgba($critical-darkbg, .3);
- }
- }
- .sensor__category {
- margin: 0;
- color: $white;
- min-width: $title-minWidth;
- }
- }
- .header-row {
- background: $darkpurple;
- }
-
- //Export log
- .btn-export {
- text-transform: capitalize;
- color: $black;
- font-size: .9em;
- font-weight: 700;
- position: relative;
- padding: 0 0 1em 2em;
- &:hover {
- text-decoration: underline;
- }
- }
- .btn-export {
- margin-top: 7px;
- }
- .btn-export:before {
- content: '\21E5';
- position: absolute;
- font-size: 1.7em;
- vertical-align: middle;
- transform: rotate(90deg);
- display: inline-block;
- left: 2px;
- top: -5px;
- }
-
- .sensor__info {
- padding-top: 10px;
- &:hover {
- cursor: pointer;
- }
- }
-
- .accord-row {
- // accordion row
- .priority-tag-circ {
- position: absolute;
- top: 28px;
- left: 1.2em;
- }
-
- }
-
- //Sensor info
- .sensor__title {
- font-weight: 700;
- font-size: 1.1em;
- min-width: $title-minWidth;
- max-width: 78%;
- vertical-align: top;
- }
- .sensors__description {
- font-weight: 400;
- }
-
- .sensor__reading {
- @include fontCourierBold;
- font-size: 1.2em;
- color: $black;
- max-width: 18%;
- }
-
- // Sensor metadata row
- .sensors__metadata-row {
- max-height: 0;
- overflow: hidden;
- -webkit-transition: 0.5s linear max-height;
- transition: 0.5s linear max-height;
- padding: 0;
- @include fastTransition-all;
- @include mediaQuery(large) {
- margin-left: 200px;
- }
- &.active {
- max-height: 1000px; //max-height used to allow flexible height of content and still allow transition
- @include mediaQuery(small) {
- max-height: 1000px;
- }
- @include mediaQuery(medium) {
- max-height: 1000px;
- }
- }
- }
-
- //Sensor Related Items
- .sensors__related {
- width: 100%;
- }
- .sensors__related-label {
- font-weight: 700;
- margin-right: 1.2em;
- padding-top: .3em;
- }
-
- .sensors__related-item {
- margin-right: 1em;
- padding-top: .3em;
- display: inline-block;
- float: left;
- clear: both;
- }
-
- .sensors__icon {
- width: 20px;
- height: 20px;
- font-weight: normal;
- margin-right: .5em;
- margin-top: -3px;
- display: inline-block;
- }
-
-}
-
-//end sensor details
-
-
+//end sensor details
\ No newline at end of file