diff --git a/CHANGELOG.md b/CHANGELOG.md index 42bf2fb139..93f5df85d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,13 @@ 1. [#1382](https://github.com/influxdata/chronograf/pull/1382): Add line-protocol proxy for InfluxDB data sources 1. [#1391](https://github.com/influxdata/chronograf/pull/1391): :dashboardTime: - Support cell-specific time ranges 1. [#1201](https://github.com/influxdata/chronograf/pull/1201): Allow chronograf to enable/disable all tickscripts. + 1. [#1401](https://github.com/influxdata/chronograf/pull/1401): Add support for kapacitor config deletion. ### UI Improvements 1. [#1378](https://github.com/influxdata/chronograf/pull/1378): Save query time range for dashboards 1. [#1365](https://github.com/influxdata/chronograf/pull/1365): Show red indicator on Hosts Page for an offline host 1. [#1373](https://github.com/influxdata/chronograf/pull/1373): Re-address dashboard cell stacking contexts + 1. [#1385](https://github.com/influxdata/chronograf/pull/1385): Combined Measurements & Tags columns within the Data Explorer, feels more spacious and intuitive. New design for applying functions to Fields. 1. [#602](https://github.com/influxdata/chronograf/pull/602): Normalize terminology in app 1. [#1392](https://github.com/influxdata/chronograf/pull/1392): Overlays are now full screen 1. [#1395](https://github.com/influxdata/chronograf/pull/1395): Change default global time range to past 1 hour diff --git a/ui/src/dashboards/components/CellEditorOverlay.js b/ui/src/dashboards/components/CellEditorOverlay.js index 2044fefeeb..9f9be2d135 100644 --- a/ui/src/dashboards/components/CellEditorOverlay.js +++ b/ui/src/dashboards/components/CellEditorOverlay.js @@ -3,9 +3,7 @@ import React, {Component, PropTypes} from 'react' import _ from 'lodash' import uuid from 'node-uuid' -import ResizeContainer, { - ResizeBottom, -} from 'src/shared/components/ResizeContainer' +import ResizeContainer from 'src/shared/components/ResizeContainer' import QueryMaker from 'src/data_explorer/components/QueryMaker' import Visualization from 'src/data_explorer/components/Visualization' import OverlayControls from 'src/dashboards/components/OverlayControls' @@ -14,6 +12,7 @@ import * as queryModifiers from 'src/utils/queryTransitions' import defaultQueryConfig from 'src/utils/defaultQueryConfig' import buildInfluxQLQuery from 'utils/influxql' import {getQueryConfig} from 'shared/apis' +import {MINIMUM_HEIGHTS} from 'src/data_explorer/constants' class CellEditorOverlay extends Component { constructor(props) { @@ -152,8 +151,12 @@ class CellEditorOverlay extends Component { } return ( -
- +
+ - -
- - -
-
+
+ + +
) diff --git a/ui/src/dashboards/components/TemplateVariableManager.js b/ui/src/dashboards/components/TemplateVariableManager.js index 79dd0c32d9..36334f195e 100644 --- a/ui/src/dashboards/components/TemplateVariableManager.js +++ b/ui/src/dashboards/components/TemplateVariableManager.js @@ -1,5 +1,5 @@ import React, {Component, PropTypes} from 'react' -import classNames from 'classnames' +import classnames from 'classnames' import uuid from 'node-uuid' import TemplateVariableTable @@ -34,7 +34,7 @@ const TemplateVariableManager = ({ Add Variable
@@ -86,6 +88,7 @@ ManageSources.propTypes = { removeAndLoadSources: func.isRequired, fetchKapacitors: func.isRequired, setActiveKapacitor: func.isRequired, + deleteKapacitor: func.isRequired, } const mapStateToProps = ({sources}) => ({ @@ -96,6 +99,7 @@ const mapDispatchToProps = dispatch => ({ removeAndLoadSources: bindActionCreators(removeAndLoadSources, dispatch), fetchKapacitors: bindActionCreators(fetchKapacitorsAsync, dispatch), setActiveKapacitor: bindActionCreators(setActiveKapacitorAsync, dispatch), + deleteKapacitor: bindActionCreators(deleteKapacitorAsync, dispatch), }) export default connect(mapStateToProps, mapDispatchToProps)(ManageSources) diff --git a/ui/src/style/chronograf.scss b/ui/src/style/chronograf.scss index b57ca46946..25ad4af5a5 100644 --- a/ui/src/style/chronograf.scss +++ b/ui/src/style/chronograf.scss @@ -45,6 +45,7 @@ @import 'components/search-widget'; @import 'components/source-indicator'; @import 'components/tables'; +@import 'components/function-selector'; // Pages diff --git a/ui/src/style/components/function-selector.scss b/ui/src/style/components/function-selector.scss new file mode 100644 index 0000000000..e874ed51ce --- /dev/null +++ b/ui/src/style/components/function-selector.scss @@ -0,0 +1,73 @@ +/* + Function Selector + ------------------------------------------------------ + Used within the FieldListItem component +*/ +$function-selector--bg: $g2-kevlar; +$function-selector--gutter: 6px; +$function-selector--size: 26px; +$function-selector--item: $g3-castle; +$function-selector--text: $g11-sidewalk; +$function-selector--item-hover: $g4-onyx; +$function-selector--text-hover: $g15-platinum; +$function-selector--item-active: $c-pool; +$function-selector--text-active: $g20-white; + +.function-selector { + padding: 4px 11px 8px 32px; + background-color: $g4-onyx; +} +.function-selector--header { + background-color: $function-selector--bg; + display: flex; + align-items: center; + justify-content: space-between; + padding: $function-selector--gutter; + border-radius: $radius $radius 0 0; + font-size: 12px; + font-weight: 600; + color: $g11-sidewalk; + @include no-user-select(); +} +.function-selector--grid { + display: flex; + flex-wrap: wrap; + padding: $function-selector--gutter; + padding-top: 0; + border-radius: 0 0 $radius $radius; + background-color: $function-selector--bg; +} +.function-selector--item { + @include no-user-select(); + border-radius: $radius; + font-size: 12px; + font-weight: 700; + font-family: $code-font; + flex: 0 0 calc(25% - 2px); + margin: 1px; + text-align: center; + height: $function-selector--size; + line-height: ($function-selector--size - 3px); + background-color: $function-selector--item; + color: $function-selector--text; + transition: + background-color 0.25s ease, + color 0.25s ease; + + &:hover { + background-color: $function-selector--item-hover; + color: $function-selector--text-hover; + cursor: pointer; + } + &.active { + background-color: $function-selector--item-active; + color: $function-selector--text-active; + } +} + +.btn.function-selector--toggled { + &, &:hover, &:active, &:hover:active { + background-color: $g7-graphite !important; + color: $g20-white !important; + } +} \ No newline at end of file diff --git a/ui/src/style/components/graph.scss b/ui/src/style/components/graph.scss index 60f3721f5a..110e2cf712 100644 --- a/ui/src/style/components/graph.scss +++ b/ui/src/style/components/graph.scss @@ -3,33 +3,35 @@ --------------------------------------------- */ $graph-heading-height: 44px; - +$graph-gutter: 16px; /* Graph Styles --------------------------------------------- */ +.graph, +.graph-heading, +.graph-container, +.graph > .table-container { + position: relative; +} .graph { - position: absolute; - top: 0; - width: calc(100% - #{($page-wrapper-padding * 2)}); - left: $page-wrapper-padding; + margin: 0 $page-wrapper-padding; + height: 100%; } .graph-heading { - position: relative; - top: 16px; background-color: $g3-castle; border-radius: $radius $radius 0 0; display: flex; align-items: center; justify-content: space-between; height: $graph-heading-height; + top: $graph-gutter; padding: 0 16px; transition: background-color 0.25s ease; - .toggle { - margin: 0; + .toggle-btn { text-transform: capitalize; } } @@ -37,22 +39,19 @@ $graph-heading-height: 44px; font-size: 14px; color: $g13-mist; font-weight: 600; - margin-right: 16px; @include no-user-select(); transition: color 0.25s ease; } -.graph-actions { - display: flex; - align-items: center; -} -.graph .table-container { +.graph .table-container, +.graph-container { + top: $graph-gutter; background-color: $g3-castle; border-radius: 0 0 $radius $radius; + height: calc(100% - #{($graph-heading-height + ($graph-gutter * 2))}); +} +.graph .table-container { padding: 8px 16px; - position: relative; - top: 16px; - height: calc(100% - #{($graph-heading-height + 32px)}); & > div > div:last-child { position: absolute; @@ -63,26 +62,10 @@ $graph-heading-height: 44px; .fixedDataTableLayout_main { height: 100% !important; } - .generic-empty-state { - background-color: transparent; - padding: 50px 0; - height: 100%; - font-size: 22px; - @include no-user-select(); - } } .graph-container { @include no-user-select(); - background-color: $g3-castle; - border-radius: 0 0 $radius $radius; - position: relative; - height: 316px; - transition: - background-color 0.25s ease; - top: 16px; - height: calc(100% - #{$graph-heading-height + 32px}); -} -.data-explorer .graph-container { + & > div:not(.graph-panel__refreshing) { position: absolute; width: 100%; @@ -101,15 +84,16 @@ $graph-heading-height: 44px; .graph-empty { width: 100%; - height: 300px; + height: 100%; display: flex; align-items: center; justify-content: center; align-content: center; + @include no-user-select(); > p { - font-size: 28px; - font-weight: 300; + font-size: 20px; + font-weight: 400; margin: 0; text-align: center; color: $g8-storm; diff --git a/ui/src/style/components/query-builder.scss b/ui/src/style/components/query-builder.scss index 46e60bd710..66e920acba 100644 --- a/ui/src/style/components/query-builder.scss +++ b/ui/src/style/components/query-builder.scss @@ -9,12 +9,13 @@ display: flex; align-items: stretch; flex-wrap: nowrap; - overflow-x: auto; - @include custom-scrollbar($query-builder--list-bg,$c-pool); } .query-builder--column { display: flex; flex-direction: column; + flex: 2 0 0; +} +.query-builder--column-db { flex: 1 0 0; } .query-builder--heading { @@ -200,4 +201,10 @@ .query-builder--list-item:hover .group-by-tag, .query-builder--list-item.active .group-by-tag { visibility: visible; +} + + + +.query-builder--db-dropdown { + display: inline-block; } \ No newline at end of file diff --git a/ui/src/style/components/query-editor.scss b/ui/src/style/components/query-editor.scss index ae59cbe338..f4cfce0077 100644 --- a/ui/src/style/components/query-editor.scss +++ b/ui/src/style/components/query-editor.scss @@ -11,7 +11,7 @@ border-radius: 0 $radius 0 0; background-color: $query-editor--bg; position: relative; - z-index: 2; /* Minimum amount to obcure the toggle flip within Query Builder. Will fix later */ + z-index: 3; /* Minimum amount to obcure the toggle flip within Query Builder. Will fix later */ } .query-editor--field { font-family: $code-font; diff --git a/ui/src/style/components/query-maker.scss b/ui/src/style/components/query-maker.scss index 8ab3b04151..30fb57aaab 100644 --- a/ui/src/style/components/query-maker.scss +++ b/ui/src/style/components/query-maker.scss @@ -7,9 +7,8 @@ */ .query-maker { - position: relative; - left: $explorer-page-padding; - width: calc(100% - #{($explorer-page-padding * 2)}); + height: 100%; + margin: 0 $explorer-page-padding; display: flex; flex-direction: column; align-items: stretch; diff --git a/ui/src/style/components/resizer.scss b/ui/src/style/components/resizer.scss index 0b1d47ef4c..d5d20872fb 100644 --- a/ui/src/style/components/resizer.scss +++ b/ui/src/style/components/resizer.scss @@ -1,3 +1,8 @@ +/* + Resizable Container + ---------------------------------------------- +*/ + $resizer-line-width: 2px; $resizer-line-z: 2; $resizer-handle-width: 10px; @@ -9,14 +14,40 @@ $resizer-color: $g5-pepper; $resizer-color-hover: $g8-storm; $resizer-color-active: $c-pool; -.resizer__handle { +.resize--container { + overflow: hidden !important; + + &.resize--dragging * { + @include no-user-select(); + } +} +.resize--top, +.resize--bottom { + position: absolute; + width: 100%; + left: 0; +} + +.resizer--full-size { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +/* + Resizable Container Handle + ---------------------------------------------- +*/ +.resizer--handle { top: 60%; left: 0; height: $resizer-click-area; margin-top: -$resizer-click-area/2; margin-bottom: -$resizer-click-area/2; width: 100%; - z-index: 2; + z-index: 1; user-select: none; -webkit-user-select: none; position: absolute; @@ -78,37 +109,4 @@ $resizer-color-active: $c-pool; box-shadow: 0 0 $resizer-glow $resizer-color-active; } } -} - -.resize-container.page-contents { - overflow: hidden; - display: flex; - flex-direction: row; - align-items: stretch; -} - -.resize-container { - .resize-top { - display: flex; - flex-direction: column; - position: absolute; - top: 0; - left: 0; - height: 60%; - width: 100%; - } - .resize-bottom { - display: flex; - flex-direction: column; - position: absolute; - height: 40%; - bottom: 0; - left: 0; - width: 100%; - } -} - -/* Special rule for when a graph is in the bottom of resizer */ -.resize-bottom .graph { - height: 100%; -} +} \ No newline at end of file diff --git a/ui/src/style/pages/overlay-technology.scss b/ui/src/style/pages/overlay-technology.scss index b5c952f6dc..0211c9a7eb 100644 --- a/ui/src/style/pages/overlay-technology.scss +++ b/ui/src/style/pages/overlay-technology.scss @@ -15,6 +15,10 @@ $overlay-z: 100; z-index: $overlay-z; padding: 0 30px; + /* + Semi-transparent gradient in background + Makes it possible to leave opacity alone + */ &:before { content: ''; display: block; @@ -37,7 +41,6 @@ $overlay-z: 100; flex: 0 0 $overlay-controls-height; width: calc(100% - #{($explorer-page-padding * 2)}); left: $explorer-page-padding; - margin-top: 16px; border: 0; background-color: $g2-kevlar; border-radius: $radius $radius 0 0; @@ -65,6 +68,13 @@ $overlay-z: 100; @include no-user-select; } } +.overlay-technology--editor { + display: flex; + flex-direction: column; + align-items: stretch; + height: 100%; + padding: 16px 0; +} .overlay-controls .confirm-buttons { margin-left: 32px; } @@ -92,30 +102,12 @@ $overlay-z: 100; } /* Graph editing in Dashboards is a little smaller so the dash can be seen in the background */ -.overlay-technology .resize-container.page-contents { - background-image: none !important; - overflow: visible; -} .overlay-technology .graph { - width: 70%; - left: 15%; -} -.overlay-technology .graph-heading, -.overlay-technology .graph-container, -.overlay-technology .table-container { - top: -24px; -} -.overlay-technology .graph-heading .graph-actions { - order: 2; -} -.overlay-technology .graph-container, -.overlay-technology .table-container { - height: calc(100% - 38px); + margin: 0 15%; } .overlay-technology .query-maker { flex: 1 0 0; padding: 0 8px; - margin-bottom: 8px; border-radius: 0 0 $radius $radius; background-color: $g2-kevlar; } diff --git a/ui/src/style/theme/theme-dark.scss b/ui/src/style/theme/theme-dark.scss index 504c29dbb9..31509c31b6 100644 --- a/ui/src/style/theme/theme-dark.scss +++ b/ui/src/style/theme/theme-dark.scss @@ -348,6 +348,7 @@ $toggle-border: 2px; .toggle { display: inline-block; + margin: 0; width: auto; padding: $toggle-border; border-radius: 3px;