mirror of https://github.com/rancher/ui.git
Pass logging config down to logging targets for json parsing
rancher/rancher#24367
This commit is contained in:
parent
fcaaa0f53c
commit
004a9286ee
|
|
@ -61,7 +61,7 @@
|
|||
@type="checkbox"
|
||||
class="form-control"
|
||||
id="enable-json-parsing"
|
||||
@checked={{model.enableJSONParsing}}
|
||||
@checked={{loggingModel.enableJSONParsing}}
|
||||
/>
|
||||
{{t "loggingPage.additional.jsonParsing.label"}}
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -1,66 +1,66 @@
|
|||
<h2 class="mt-30">{{t 'loggingPage.elasticsearch.header'}}</h2>
|
||||
<h2 class="mt-30">{{t "loggingPage.elasticsearch.header"}}</h2>
|
||||
<hr/>
|
||||
<div class="box">
|
||||
<section class="mb-30">
|
||||
<div>
|
||||
<label class="acc-label" for="">{{t 'loggingPage.endpoint'}}{{field-required}}</label>
|
||||
<label class="acc-label" for="">{{t "loggingPage.endpoint"}}{{field-required}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t 'loggingPage.endpointPlaceholder')
|
||||
id="elasticsearch-endpoint"
|
||||
focus-out=(action "alertMessage")
|
||||
type="text"
|
||||
value=config.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.endpointPlaceholder")
|
||||
id="elasticsearch-endpoint"
|
||||
focus-out=(action "alertMessage")
|
||||
}}
|
||||
</div>
|
||||
{{#if endpointError}}
|
||||
<p class="text-error text-small">{{t endpointErrorText}}</p>
|
||||
{{else}}
|
||||
<p class="text-info text-small">{{t 'loggingPage.elasticsearch.endpointHelpText'}}</p>
|
||||
<p class="text-info text-small">{{t "loggingPage.elasticsearch.endpointHelpText"}}</p>
|
||||
{{/if}}
|
||||
</section>
|
||||
<h4>{{t 'loggingPage.elasticsearch.xpack.header'}} <span class="text-muted">{{t 'loggingPage.elasticsearch.xpack.headerOptional'}}</span></h4>
|
||||
<h4>{{t "loggingPage.elasticsearch.xpack.header"}} <span class="text-muted">{{t "loggingPage.elasticsearch.xpack.headerOptional"}}</span></h4>
|
||||
<section>
|
||||
<p class="text-info text-small"> {{t 'loggingPage.elasticsearch.xpack.helpText'}} </p>
|
||||
<p class="text-info text-small"> {{t "loggingPage.elasticsearch.xpack.helpText"}} </p>
|
||||
<div class="row">
|
||||
<div class="col span-6">
|
||||
<label class="acc-label" for=""> {{t 'loggingPage.elasticsearch.xpack.username'}} </label>
|
||||
<label class="acc-label" for=""> {{t "loggingPage.elasticsearch.xpack.username"}} </label>
|
||||
{{input
|
||||
type="text"
|
||||
utocomplete="off"
|
||||
value=config.authUsername
|
||||
classNames="form-control"
|
||||
placeholder=(t 'loggingPage.elasticsearch.xpack.usernamePlaceholder')
|
||||
type="text"
|
||||
utocomplete="off"
|
||||
value=config.authUsername
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.elasticsearch.xpack.usernamePlaceholder")
|
||||
}}
|
||||
</div>
|
||||
<div class="col span-6">
|
||||
<label class="acc-label"> {{t 'loggingPage.elasticsearch.xpack.password'}} </label>
|
||||
<label class="acc-label"> {{t "loggingPage.elasticsearch.xpack.password"}} </label>
|
||||
{{input
|
||||
utocomplete="off"
|
||||
type="password"
|
||||
value=config.authPassword
|
||||
classNames="form-control"
|
||||
placeholder=(t 'loggingPage.elasticsearch.xpack.passwordPlaceholder')
|
||||
utocomplete="off"
|
||||
type="password"
|
||||
value=config.authPassword
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.elasticsearch.xpack.passwordPlaceholder")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<h4 class="mt-20">{{t 'loggingPage.elasticsearch.indexPatterns.header'}}</h4>
|
||||
<p class="text-info text-small">{{t 'loggingPage.elasticsearch.indexPatterns.helpText'}}</p>
|
||||
<h4 class="mt-20">{{t "loggingPage.elasticsearch.indexPatterns.header"}}</h4>
|
||||
<p class="text-info text-small">{{t "loggingPage.elasticsearch.indexPatterns.helpText"}}</p>
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col span-6">
|
||||
<label class="acc-label">{{t 'loggingPage.elasticsearch.indexPatterns.prefix'}}{{field-required}}</label>
|
||||
<label class="acc-label">{{t "loggingPage.elasticsearch.indexPatterns.prefix"}}{{field-required}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.indexPrefix
|
||||
className="form-control"
|
||||
placeholder=(t 'loggingPage.elasticsearch.indexPatterns.prefixPlaceholder')
|
||||
}}
|
||||
type="text"
|
||||
value=config.indexPrefix
|
||||
className="form-control"
|
||||
placeholder=(t "loggingPage.elasticsearch.indexPatterns.prefixPlaceholder")
|
||||
}}
|
||||
</div>
|
||||
<div class="col span-6">
|
||||
<div style="margin-top: 34px;">
|
||||
<label>{{t 'loggingPage.elasticsearch.indexPatterns.dateFormat'}}</label>
|
||||
<label>{{t "loggingPage.elasticsearch.indexPatterns.dateFormat"}}</label>
|
||||
<label class="mr-10">{{radio-button selection=config.dateFormat value="YYYY-MM-DD"}} YYYY-MM-DD</label>
|
||||
<label class="mr-10">{{radio-button selection=config.dateFormat value="YYYY-MM"}} YYYY-MM</label>
|
||||
<label class="mr-10">{{radio-button selection=config.dateFormat value="YYYY"}} YYYY</label>
|
||||
|
|
@ -68,10 +68,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{{t 'loggingPage.elasticsearch.generatedIndex'
|
||||
esIndex=esIndex
|
||||
indexFormat=indexFormat
|
||||
htmlSafe=true
|
||||
{{t "loggingPage.elasticsearch.generatedIndex"
|
||||
esIndex=esIndex
|
||||
indexFormat=indexFormat
|
||||
htmlSafe=true
|
||||
}}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -79,13 +79,17 @@
|
|||
|
||||
|
||||
{{logging/form-log-ssl
|
||||
config=config
|
||||
targetType=targetType
|
||||
disabled=(not enableSSLConfig)
|
||||
config=config
|
||||
targetType=targetType
|
||||
disabled=(not enableSSLConfig)
|
||||
}}
|
||||
|
||||
{{logging/form-log-format logPreview=logPreview model=model}}
|
||||
{{logging/form-log-format
|
||||
logPreview=logPreview
|
||||
model=model
|
||||
loggingModel=parentModel
|
||||
}}
|
||||
{{!--
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
|
|
|
|||
|
|
@ -148,4 +148,5 @@
|
|||
{{logging/form-log-format
|
||||
logPreview=logPreview
|
||||
model=model
|
||||
loggingModel=parentModel
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -34,63 +34,63 @@
|
|||
</div>
|
||||
<hr/>
|
||||
<section class="mb-30">
|
||||
{{#if (eq brokerType "zookeeper")}}
|
||||
<div>
|
||||
<label class="acc-label" for="">
|
||||
{{t "loggingPage.endpoint"}}
|
||||
{{field-required}}
|
||||
</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.zookeeperEndpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.kafka.endpoint.zookeeper.placeholder")
|
||||
id="kafka-endpoint"
|
||||
}}
|
||||
</div>
|
||||
<p class="text-info text-small mb-0">
|
||||
{{t "loggingPage.kafka.zookeeperHelpText"}}
|
||||
</p>
|
||||
{{else}}
|
||||
{{#each brokerEndpoints as |item idx|}}
|
||||
<div class="row">
|
||||
<div class="col span-11">
|
||||
<label class="acc-label" for="">
|
||||
{{t "loggingPage.endpoint"}}
|
||||
{{#if (eq idx 0)}}
|
||||
{{field-required}}
|
||||
{{/if}}
|
||||
</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=item.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.kafka.endpoint.broker.placeholder")
|
||||
}}
|
||||
</div>
|
||||
<div class="col span-1" style="padding-top: 29px">
|
||||
<button class="btn bg-primary icon-btn {{if canRemove "" "disabled"}}" {{action "remove" item}}>
|
||||
<span class="darken">
|
||||
<i class="icon icon-minus"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
{{#if (eq brokerType "zookeeper")}}
|
||||
<div>
|
||||
<label class="acc-label" for="">
|
||||
{{t "loggingPage.endpoint"}}
|
||||
{{field-required}}
|
||||
</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.zookeeperEndpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.kafka.endpoint.zookeeper.placeholder")
|
||||
id="kafka-endpoint"
|
||||
}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<p class="text-info text-small mb-0">
|
||||
{{t "loggingPage.kafka.brokerHelpText"}}
|
||||
</p>
|
||||
<div class="mt-20">
|
||||
<button class="btn bg-link icon-btn p-0" {{action "add"}}>
|
||||
<span class="darken">
|
||||
<i class="icon icon-plus text-small"/>
|
||||
</span>
|
||||
<span>
|
||||
{{t "loggingPage.kafka.addEndpoint"}}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
<p class="text-info text-small mb-0">
|
||||
{{t "loggingPage.kafka.zookeeperHelpText"}}
|
||||
</p>
|
||||
{{else}}
|
||||
{{#each brokerEndpoints as |item idx|}}
|
||||
<div class="row">
|
||||
<div class="col span-11">
|
||||
<label class="acc-label" for="">
|
||||
{{t "loggingPage.endpoint"}}
|
||||
{{#if (eq idx 0)}}
|
||||
{{field-required}}
|
||||
{{/if}}
|
||||
</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=item.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.kafka.endpoint.broker.placeholder")
|
||||
}}
|
||||
</div>
|
||||
<div class="col span-1" style="padding-top: 29px">
|
||||
<button class="btn bg-primary icon-btn {{if canRemove "" "disabled"}}" {{action "remove" item}}>
|
||||
<span class="darken">
|
||||
<i class="icon icon-minus"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
<p class="text-info text-small mb-0">
|
||||
{{t "loggingPage.kafka.brokerHelpText"}}
|
||||
</p>
|
||||
<div class="mt-20">
|
||||
<button class="btn bg-link icon-btn p-0" {{action "add"}}>
|
||||
<span class="darken">
|
||||
<i class="icon icon-plus text-small"/>
|
||||
</span>
|
||||
<span>
|
||||
{{t "loggingPage.kafka.addEndpoint"}}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
|
|
@ -126,8 +126,9 @@
|
|||
{{logging/form-log-format
|
||||
logPreview=logPreview
|
||||
model=model
|
||||
loggingModel=parentModel
|
||||
}}
|
||||
{{!--
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<h2 class="mt-30">
|
||||
{{t "loggingPage.splunk.header"}}
|
||||
<span class="text-info text-small">
|
||||
{{t "loggingPage.splunk.helpText" htmlSafe=true}}
|
||||
{{t "loggingPage.splunk.helpText" htmlSafe=true}}
|
||||
</span>
|
||||
</h2>
|
||||
<hr/>
|
||||
|
|
@ -9,11 +9,11 @@
|
|||
<div class="mb-30">
|
||||
<label class="acc-label" for="">{{t "loggingPage.endpoint"}}{{field-required}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.endpoint.placeholder")
|
||||
id="splunk-endpoint"
|
||||
type="text"
|
||||
value=config.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.endpoint.placeholder")
|
||||
id="splunk-endpoint"
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -21,10 +21,10 @@
|
|||
<div class="col span-12 mt-0 pt-0">
|
||||
<label class="acc-label" for="">{{t "loggingPage.splunk.token"}}{{field-required}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.token
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.tokenPlaceholder")
|
||||
type="text"
|
||||
value=config.token
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.tokenPlaceholder")
|
||||
}}
|
||||
<p class="text-info text-small">
|
||||
{{t "loggingPage.splunk.tokenHelpText" htmlSafe=true}}
|
||||
|
|
@ -35,10 +35,10 @@
|
|||
<div class="col span-6 mt-0 pt-0">
|
||||
<label class="acc-label" for="">{{t "loggingPage.splunk.source"}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.source
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.sourcePlaceholder")
|
||||
type="text"
|
||||
value=config.source
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.sourcePlaceholder")
|
||||
}}
|
||||
<p class="text-info text-small">
|
||||
{{t "loggingPage.splunk.sourceHelpText" htmlSafe=true}}
|
||||
|
|
@ -47,10 +47,10 @@
|
|||
<div class="col span-6 mt-0 pt-0">
|
||||
<label class="acc-label" for="">{{t "loggingPage.splunk.index"}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.index
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.indexPlaceholder")
|
||||
type="text"
|
||||
value=config.index
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.indexPlaceholder")
|
||||
}}
|
||||
<p class="text-info text-small">
|
||||
{{t "loggingPage.splunk.indexHelpText" htmlSafe=true}}
|
||||
|
|
@ -60,16 +60,17 @@
|
|||
</section>
|
||||
|
||||
{{logging/form-log-ssl
|
||||
config=config
|
||||
targetType=targetType
|
||||
disabled=(not enableSSLConfig)
|
||||
config=config
|
||||
targetType=targetType
|
||||
disabled=(not enableSSLConfig)
|
||||
}}
|
||||
|
||||
{{logging/form-log-format
|
||||
logPreview=logPreview
|
||||
model=model
|
||||
logPreview=logPreview
|
||||
model=model
|
||||
loggingModel=parentModel
|
||||
}}
|
||||
{{!--
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
|
|
|
|||
|
|
@ -1,57 +1,57 @@
|
|||
<h2 class="mt-30">{{t 'loggingPage.syslog.header'}}</h2>
|
||||
<h2 class="mt-30">{{t "loggingPage.syslog.header"}}</h2>
|
||||
<hr/>
|
||||
<section class="box">
|
||||
<div class="row">
|
||||
<label class="acc-label">{{t 'loggingPage.endpoint'}}{{field-required}}</label>
|
||||
<div class="input-group">
|
||||
{{input
|
||||
type="text"
|
||||
value=config.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t 'loggingPage.syslog.endpointPlaceholder')
|
||||
id="syslog-endpoint"
|
||||
}}
|
||||
<div class="input-group-btn bg-primary">
|
||||
{{#basic-dropdown
|
||||
horizontalPosition="right"
|
||||
as |dd|}}
|
||||
{{#dd.trigger class="btn bg-default text-uppercase"}}
|
||||
<span class="pr-5">{{config.protocol}}</span><i class="icon icon-chevron-down"></i>
|
||||
{{/dd.trigger}}
|
||||
<label class="acc-label">{{t "loggingPage.endpoint"}}{{field-required}}</label>
|
||||
<div class="input-group">
|
||||
{{input
|
||||
type="text"
|
||||
value=config.endpoint
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.syslog.endpointPlaceholder")
|
||||
id="syslog-endpoint"
|
||||
}}
|
||||
<div class="input-group-btn bg-primary">
|
||||
{{#basic-dropdown
|
||||
horizontalPosition="right"
|
||||
as |dd|}}
|
||||
{{#dd.trigger class="btn bg-default text-uppercase"}}
|
||||
<span class="pr-5">{{config.protocol}}</span><i class="icon icon-chevron-down"></i>
|
||||
{{/dd.trigger}}
|
||||
|
||||
{{#dd.content}}
|
||||
<li><a {{action "changeProtocol" 'tcp'}}>TCP</a></li>
|
||||
<li><a {{action "changeProtocol" 'udp'}}>UDP</a></li>
|
||||
{{/dd.content}}
|
||||
{{#dd.content}}
|
||||
<li><a {{action "changeProtocol" "tcp"}}>TCP</a></li>
|
||||
<li><a {{action "changeProtocol" "udp"}}>UDP</a></li>
|
||||
{{/dd.content}}
|
||||
|
||||
{{/basic-dropdown}}
|
||||
</div>
|
||||
{{/basic-dropdown}}
|
||||
</div>
|
||||
<p class="text-info text-small mb-0">{{t 'loggingPage.syslog.endpointHelpText'}}</p>
|
||||
</div>
|
||||
<p class="text-info text-small mb-0">{{t "loggingPage.syslog.endpointHelpText"}}</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col span-6 mt-0 pt-0">
|
||||
<label class="acc-label" for="">{{t 'loggingPage.syslog.program'}}</label>
|
||||
<label class="acc-label" for="">{{t "loggingPage.syslog.program"}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.program
|
||||
classNames="form-control"
|
||||
placeholder=(t 'loggingPage.syslog.programPlaceholder')
|
||||
type="text"
|
||||
value=config.program
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.syslog.programPlaceholder")
|
||||
}}
|
||||
<p class="text-info text-small">{{t 'loggingPage.syslog.programHelpText'}}</p>
|
||||
<p class="text-info text-small">{{t "loggingPage.syslog.programHelpText"}}</p>
|
||||
</div>
|
||||
|
||||
<div class="col span-6 mt-0 pt-0">
|
||||
<label class="acc-label" for="">{{t 'loggingPage.splunk.token'}}</label>
|
||||
<label class="acc-label" for="">{{t "loggingPage.splunk.token"}}</label>
|
||||
{{input
|
||||
type="text"
|
||||
value=config.token
|
||||
classNames="form-control"
|
||||
placeholder=(t 'loggingPage.splunk.tokenPlaceholder')
|
||||
type="text"
|
||||
value=config.token
|
||||
classNames="form-control"
|
||||
placeholder=(t "loggingPage.splunk.tokenPlaceholder")
|
||||
}}
|
||||
<p class="text-info text-small">
|
||||
{{t 'loggingPage.syslog.tokenHelpText' htmlSafe=true}}
|
||||
{{t "loggingPage.syslog.tokenHelpText" htmlSafe=true}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -64,18 +64,22 @@
|
|||
{{t item.label}}
|
||||
</label>
|
||||
{{/each}}
|
||||
{{t 'loggingPage.syslog.severityHelpText' htmlSafe=true}}
|
||||
{{t "loggingPage.syslog.severityHelpText" htmlSafe=true}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{logging/form-log-ssl
|
||||
config=config
|
||||
targetType=targetType
|
||||
disabled=(or (not enableSSLConfig) (not config.enableTls))
|
||||
config=config
|
||||
targetType=targetType
|
||||
disabled=(or (not enableSSLConfig) (not config.enableTls))
|
||||
}}
|
||||
|
||||
{{logging/form-log-format logPreview=logPreview model=model}}
|
||||
{{logging/form-log-format
|
||||
logPreview=logPreview
|
||||
model=model
|
||||
loggingModel=parentModel
|
||||
}}
|
||||
{{!--
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
{{#advanced-section advanced=showAdvanced}}
|
||||
{{logging/form-log-docker model=model parentModel=parentModel}}
|
||||
{{/advanced-section}} --}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue