mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-11 16:57:11 +02:00
Display tooltip and guide for parser_multiline
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
41b18ffba1
commit
fce12c5cb5
@ -1,14 +1,17 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
import 'lodash/lodash'
|
||||||
const ParserMultilineForm = {
|
const ParserMultilineForm = {
|
||||||
template: "#vue-parser-multiline-form",
|
template: "#vue-parser-multiline-form",
|
||||||
props: [
|
props: [
|
||||||
"pluginType"
|
"pluginType",
|
||||||
|
"commonOptions"
|
||||||
],
|
],
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
formatFirstline: "",
|
formatFirstline: "",
|
||||||
formats: ""
|
formats: "",
|
||||||
|
formatFirstlineDesc: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -26,6 +29,12 @@ const ParserMultilineForm = {
|
|||||||
"format_firstline": this.formatFirstline,
|
"format_firstline": this.formatFirstline,
|
||||||
"formats": this.formats
|
"formats": this.formats
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
"commonOptions": function(newValue, oldValue) {
|
||||||
|
const option = _.find(newValue, (o) => {
|
||||||
|
return o.name === "format_firstline"
|
||||||
|
})
|
||||||
|
this.formatFirstlineDesc = option.desc
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
{{ option }}
|
{{ option }}
|
||||||
%parser-multiline-form{"v-if" => 'pluginName==="multiline"',
|
%parser-multiline-form{"v-if" => 'pluginName==="multiline"',
|
||||||
"v-bind:plugin-type" => "pluginType",
|
"v-bind:plugin-type" => "pluginType",
|
||||||
|
"v-bind:common-options" => "commonOptions",
|
||||||
"v-on:change-formats" => "onChangeFormats"}
|
"v-on:change-formats" => "onChangeFormats"}
|
||||||
.form-group(v-else){"v-for" => "option in commonOptions"}
|
.form-group(v-else){"v-for" => "option in commonOptions"}
|
||||||
%template{"v-if" => 'option.type==="enum"'}
|
%template{"v-if" => 'option.type==="enum"'}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
%script{type: "text/x-template", id: "vue-parser-multiline-form"}
|
%script{type: "text/x-template", id: "vue-parser-multiline-form"}
|
||||||
.form-group
|
.form-group
|
||||||
%label{"for" => "setting_parse_0__format_firstline"}
|
%label{"for" => "setting_parse_0__format_firstline",
|
||||||
|
"data-toggle" => "tooltip",
|
||||||
|
"data-placement" => "right",
|
||||||
|
"v-bind:title" => "formatFirstlineDesc"}
|
||||||
Format first line
|
Format first line
|
||||||
%input.form-control{"type" => "text",
|
%input.form-control{"type" => "text",
|
||||||
"id" => "setting_parse_0__format_firstline",
|
"id" => "setting_parse_0__format_firstline",
|
||||||
@ -8,6 +11,8 @@
|
|||||||
"v-model.lazy" => "formatFirstline"}
|
"v-model.lazy" => "formatFirstline"}
|
||||||
%label.mt-3{"v-bind:for" => "textareaId(pluginType)"}
|
%label.mt-3{"v-bind:for" => "textareaId(pluginType)"}
|
||||||
Formats
|
Formats
|
||||||
|
%p.alert.alert-warning
|
||||||
|
= t("fluentd.settings.in_tail.notice_for_multiline_limit")
|
||||||
%textarea.form-control{"v-bind:id" => "textareaId(pluginType)",
|
%textarea.form-control{"v-bind:id" => "textareaId(pluginType)",
|
||||||
"v-bind:name" => "textareaName(pluginType)",
|
"v-bind:name" => "textareaName(pluginType)",
|
||||||
"v-model.lazy" => "formats",
|
"v-model.lazy" => "formats",
|
||||||
|
Loading…
Reference in New Issue
Block a user