Move parse plugin config under plugin_config

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-06-15 11:01:19 +09:00
parent e7580f42f9
commit 404f2929f8
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1
2 changed files with 3 additions and 5 deletions

View File

@ -19,7 +19,7 @@ class ApiController < ApplicationController
end
def regexp_preview
preview = RegexpPreview.processor(params[:parse_type]).new(params[:file], params[:parse_type], params)
preview = RegexpPreview.processor(params[:parse_type]).new(params[:file], params[:parse_type], params[:plugin_config])
render json: preview.matches
end

View File

@ -26,7 +26,7 @@ $(document).ready(() => {
},
watch: {
'parse.expression': function() {
console.log('parse.expression')
console.log(`parse.expression: ${this.parse.expression}`)
this.preview()
},
'parse.time_format': function() {
@ -53,7 +53,7 @@ $(document).ready(() => {
this.parseType = name
},
onChangeParseConfig: function(data) {
console.log("onChangeParseConfig")
console.log(`onChangeParseConfig: ${data}`)
_.merge(this.parse, data)
this.preview()
},
@ -132,8 +132,6 @@ $(document).ready(() => {
'X-CSRF-Token': this.token
},
data: {
expression: this.parse.expression,
time_format: this.parse.timeFormat,
parse_type: _.isEmpty(this.parseType) ? "regexp" : this.parseType,
file: this.path,
plugin_config: this.parse