diff --git a/ui/src/kapacitor/components/HandlerEmpty.js b/ui/src/kapacitor/components/HandlerEmpty.js index 149690f94f..6c6b3518a1 100644 --- a/ui/src/kapacitor/components/HandlerEmpty.js +++ b/ui/src/kapacitor/components/HandlerEmpty.js @@ -5,10 +5,14 @@ const HandlerEmpty = ({configLink}) => { return (
-
- This handler does not seem to be configured. +
+

This handler does not seem to be configured.

- Configure it here. +
+ +
diff --git a/ui/src/kapacitor/components/HandlerInput.js b/ui/src/kapacitor/components/HandlerInput.js index 895ebd1e22..0a001b5c8d 100644 --- a/ui/src/kapacitor/components/HandlerInput.js +++ b/ui/src/kapacitor/components/HandlerInput.js @@ -7,25 +7,37 @@ const HandlerInput = ({ selectedHandler, handleModifyHandler, redacted = false, - editable = true, + disabled = false, + fieldColumns = 'col-md-6', }) => { + const formGroupClass = `form-group ${fieldColumns}` return ( -
- - -
+
+
+ +
+ + {redacted + ? + Value set in Config + + : null} +
+
+
) } @@ -35,10 +47,11 @@ HandlerInput.propTypes = { fieldName: string.isRequired, fieldDisplay: string, placeholder: string, + disabled: bool, redacted: bool, - editable: bool, selectedHandler: shape({}).isRequired, handleModifyHandler: func.isRequired, + fieldColumns: string, } export default HandlerInput diff --git a/ui/src/kapacitor/components/RuleHandlers.js b/ui/src/kapacitor/components/RuleHandlers.js index 63b0acb4e1..7ce6bf16f3 100644 --- a/ui/src/kapacitor/components/RuleHandlers.js +++ b/ui/src/kapacitor/components/RuleHandlers.js @@ -56,7 +56,7 @@ class RuleHandlers extends Component { handleAddEndpoint = selectedItem => { const {handlersOnThisAlert, handlersOfKind} = this.state const newItemNumbering = _.get(handlersOfKind, selectedItem.type, 0) + 1 - const newItemName = selectedItem.type + newItemNumbering + const newItemName = `${selectedItem.type}-${newItemNumbering}` const newEndpoint = { ...selectedItem, alias: newItemName, diff --git a/ui/src/kapacitor/components/handlers/AlertaHandler.js b/ui/src/kapacitor/components/handlers/AlertaHandler.js index a9d2173c47..2a0fcaea06 100644 --- a/ui/src/kapacitor/components/handlers/AlertaHandler.js +++ b/ui/src/kapacitor/components/handlers/AlertaHandler.js @@ -7,66 +7,69 @@ const AlertaHandler = ({selectedHandler, handleModifyHandler, configLink}) => { ?

Parameters from Kapacitor Configuration

+ -
-

Optional Parameters

- - - - - +

Parameters for this Alert Handler

+
+ + + + + +
: diff --git a/ui/src/kapacitor/components/handlers/ExecHandler.js b/ui/src/kapacitor/components/handlers/ExecHandler.js index 77877d5c71..20f7b8f859 100644 --- a/ui/src/kapacitor/components/handlers/ExecHandler.js +++ b/ui/src/kapacitor/components/handlers/ExecHandler.js @@ -5,13 +5,14 @@ const ExecHandler = ({selectedHandler, handleModifyHandler}) => { return (
-

Optional Parameters

+

Parameters for this Alert Handler

diff --git a/ui/src/kapacitor/components/handlers/HipchatHandler.js b/ui/src/kapacitor/components/handlers/HipchatHandler.js index a3804887bd..25a7d2c92a 100644 --- a/ui/src/kapacitor/components/handlers/HipchatHandler.js +++ b/ui/src/kapacitor/components/handlers/HipchatHandler.js @@ -1,13 +1,7 @@ import React, {PropTypes} from 'react' import HandlerInput from 'src/kapacitor/components/HandlerInput' import HandlerEmpty from 'src/kapacitor/components/HandlerEmpty' -// import RedactedInput from './RedactedInput' -// const HipchatHandler = ({selectedHandler, handleModifyHandler, configLink}) => { return selectedHandler.enabled ?
@@ -18,22 +12,23 @@ const HipchatHandler = ({selectedHandler, handleModifyHandler, configLink}) => { handleModifyHandler={handleModifyHandler} fieldName="url" fieldDisplay="Subdomain Url" - placeholder="Ex: hipchat_subdomain" + placeholder="ex: hipchat_subdomain" editable={false} + fieldColumns="col-md-12" />
diff --git a/ui/src/kapacitor/components/handlers/LogHandler.js b/ui/src/kapacitor/components/handlers/LogHandler.js index 44c2e669a8..9c8e9d3843 100644 --- a/ui/src/kapacitor/components/handlers/LogHandler.js +++ b/ui/src/kapacitor/components/handlers/LogHandler.js @@ -5,13 +5,14 @@ const LogHandler = ({selectedHandler, handleModifyHandler}) => { return (
-

Optional Parameters

+

Parameters for this Alert Handler

diff --git a/ui/src/kapacitor/components/handlers/OpsGenieHandler.js b/ui/src/kapacitor/components/handlers/OpsGenieHandler.js index 9c34403fa6..57fb7032be 100644 --- a/ui/src/kapacitor/components/handlers/OpsGenieHandler.js +++ b/ui/src/kapacitor/components/handlers/OpsGenieHandler.js @@ -10,20 +10,32 @@ const OpsgenieHandler = ({ return selectedHandler.enabled ?
-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ +
+
+

Parameters for this Alert Handler:

diff --git a/ui/src/kapacitor/components/handlers/PagerDutyHandler.js b/ui/src/kapacitor/components/handlers/PagerDutyHandler.js index 1e9e9de030..4725760012 100644 --- a/ui/src/kapacitor/components/handlers/PagerDutyHandler.js +++ b/ui/src/kapacitor/components/handlers/PagerDutyHandler.js @@ -10,14 +10,18 @@ const PagerdutyHandler = ({ return selectedHandler.enabled ?
-

Optional Parameters

- +

Parameters

+
+ +
: diff --git a/ui/src/kapacitor/components/handlers/PostHandler.js b/ui/src/kapacitor/components/handlers/PostHandler.js index 4367408834..f5851ee0c0 100644 --- a/ui/src/kapacitor/components/handlers/PostHandler.js +++ b/ui/src/kapacitor/components/handlers/PostHandler.js @@ -1,24 +1,18 @@ import React, {PropTypes} from 'react' import HandlerInput from 'src/kapacitor/components/HandlerInput' -import HandlerCheckbox from 'src/kapacitor/components/HandlerCheckbox' const HttpHandler = ({selectedHandler, handleModifyHandler}) => { return (
-

Optional Parameters

+

Parameters for this Alert Handler

-
diff --git a/ui/src/kapacitor/components/handlers/PushoverHandler.js b/ui/src/kapacitor/components/handlers/PushoverHandler.js index f4258a7b46..a7dfe6b523 100644 --- a/ui/src/kapacitor/components/handlers/PushoverHandler.js +++ b/ui/src/kapacitor/components/handlers/PushoverHandler.js @@ -10,50 +10,62 @@ const PushoverHandler = ({ return selectedHandler.enabled ?
-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ - +
+
+

Parameters for this Alert Handler

-
-
+
diff --git a/ui/src/kapacitor/components/handlers/SMTPHandler.js b/ui/src/kapacitor/components/handlers/SMTPHandler.js index 9fb80afaf6..ec00d013e0 100644 --- a/ui/src/kapacitor/components/handlers/SMTPHandler.js +++ b/ui/src/kapacitor/components/handlers/SMTPHandler.js @@ -6,13 +6,40 @@ const SmtpHandler = ({selectedHandler, handleModifyHandler, configLink}) => { return selectedHandler.enabled ?
-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ + + +
+
+

Parameters for this Alert Handler

diff --git a/ui/src/kapacitor/components/handlers/SensuHandler.js b/ui/src/kapacitor/components/handlers/SensuHandler.js index 0db1067715..c89386e231 100644 --- a/ui/src/kapacitor/components/handlers/SensuHandler.js +++ b/ui/src/kapacitor/components/handlers/SensuHandler.js @@ -6,20 +6,32 @@ const SensuHandler = ({selectedHandler, handleModifyHandler, configLink}) => { return selectedHandler.enabled ?
-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ +
+
+

Parameters for this Alert Handler

diff --git a/ui/src/kapacitor/components/handlers/SlackHandler.js b/ui/src/kapacitor/components/handlers/SlackHandler.js index 0749909e34..7541a0f7bc 100644 --- a/ui/src/kapacitor/components/handlers/SlackHandler.js +++ b/ui/src/kapacitor/components/handlers/SlackHandler.js @@ -6,27 +6,43 @@ const SlackHandler = ({selectedHandler, handleModifyHandler, configLink}) => { return selectedHandler.enabled ?
-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ +
+
+

Parameters for this Alert Handler

diff --git a/ui/src/kapacitor/components/handlers/TalkHandler.js b/ui/src/kapacitor/components/handlers/TalkHandler.js index 5fa0745370..c8dfa46be5 100644 --- a/ui/src/kapacitor/components/handlers/TalkHandler.js +++ b/ui/src/kapacitor/components/handlers/TalkHandler.js @@ -1,10 +1,30 @@ import React, {PropTypes} from 'react' +import HandlerInput from 'src/kapacitor/components/HandlerInput' import HandlerEmpty from 'src/kapacitor/components/HandlerEmpty' -const TalkHandler = ({selectedHandler, configLink}) => { +const TalkHandler = ({selectedHandler, handleModifyHandler, configLink}) => { return selectedHandler.enabled - ?
-

Talk requires no additional alert parameters.

+ ?
+
+

Parameters from Kapacitor Configuration

+ + +
: } diff --git a/ui/src/kapacitor/components/handlers/TcpHandler.js b/ui/src/kapacitor/components/handlers/TcpHandler.js index ffb033cfc2..8dd09960c0 100644 --- a/ui/src/kapacitor/components/handlers/TcpHandler.js +++ b/ui/src/kapacitor/components/handlers/TcpHandler.js @@ -5,13 +5,13 @@ const TcpHandler = ({selectedHandler, handleModifyHandler}) => { return (
-

Optional Parameters

+

Parameters for this Alert Handler

diff --git a/ui/src/kapacitor/components/handlers/TelegramHandler.js b/ui/src/kapacitor/components/handlers/TelegramHandler.js index f13c9c3d71..07a0ddc640 100644 --- a/ui/src/kapacitor/components/handlers/TelegramHandler.js +++ b/ui/src/kapacitor/components/handlers/TelegramHandler.js @@ -11,20 +11,33 @@ const TelegramHandler = ({ return selectedHandler.enabled ?
-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ +
+
+

Parameters for this Alert Handler

-

Optional Parameters

+

Parameters from Kapacitor Configuration

+ +
+
+

Parameters for this Alert Handler

diff --git a/ui/src/style/pages/kapacitor.scss b/ui/src/style/pages/kapacitor.scss index d71cf34162..3423c1647c 100644 --- a/ui/src/style/pages/kapacitor.scss +++ b/ui/src/style/pages/kapacitor.scss @@ -260,7 +260,7 @@ $rule-builder--radius-lg: 5px; top: ($rule-builder--padding-lg * 2); left: $rule-builder--padding-sm; width: calc(100% - #{$rule-builder--padding-sm * 2}); - height: calc(100% - #{$rule-builder--padding-lg * 2}) !important;; + height: calc(100% - #{$rule-builder--padding-lg * 2}) !important; } > .dygraph > .dygraph-child { position: absolute; @@ -290,7 +290,10 @@ $rule-builder--radius-lg: 5px; } .rule-builder--graph-options { width: 100%; - padding: $rule-builder--padding-sm ($rule-builder--padding-lg - $rule-builder--padding-sm); + padding: $rule-builder--padding-sm + ( + $rule-builder--padding-lg - $rule-builder--padding-sm + ); display: flex; align-items: center; height: ($rule-builder--padding-lg * 2); @@ -422,7 +425,7 @@ $rule-builder--radius-lg: 5px; } .endpoint-tabs { - width: 260px; + width: 150px; background-color: $rule-builder--section-border; border-bottom-left-radius: $rule-builder--radius-lg; display: flex; @@ -448,9 +451,7 @@ $rule-builder--radius-lg: 5px; font-size: 14.5px; font-weight: 600; border-right: 2px solid $rule-builder--section-border; - transition: - color 0.25s ease, - background-color 0.25s ease, + transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease; &:last-child { @@ -490,7 +491,7 @@ $rule-builder--radius-lg: 5px; left: 50%; background-color: $g8-storm; border-radius: 1px; - transform: translate(-50%,-50%) rotate(45deg); + transform: translate(-50%, -50%) rotate(45deg); transition: background-color 0.25s ease; } &:before { @@ -506,7 +507,9 @@ $rule-builder--radius-lg: 5px; background-color: $g5-pepper; cursor: pointer; &:before, - &:after {background-color: $g20-white;} + &:after { + background-color: $g20-white; + } } &:hover:active { background-color: $c-curacao; @@ -519,6 +522,7 @@ $rule-builder--radius-lg: 5px; display: flex; flex-direction: column; align-items: stretch; + min-height: 350px; h4 { width: 100%; @@ -532,4 +536,31 @@ $rule-builder--radius-lg: 5px; } .endpoint-tab--parameters { padding: $rule-builder--padding-lg; + padding-bottom: 0; + + &:last-child { + padding-bottom: $rule-builder--padding-lg; + } +} +.endpoint-tab--parameters form { + margin-left: -7px; + margin-right: -7px; +} +.endpoint-tab--parameters--empty { + align-items: center; + justify-content: center; + @include no-user-select(); + + p { + margin: 0; + font-size: 16px; + line-height: 23px; + text-align: center; + color: $g12-forge; + + strong { + color: $g18-cloud; + font-weight: 900; + } + } }