diff --git a/app/views/fluentd/settings/in_tail/_form.html.haml b/app/views/fluentd/settings/in_tail/_form.html.haml index 73567f3..5710ff5 100644 --- a/app/views/fluentd/settings/in_tail/_form.html.haml +++ b/app/views/fluentd/settings/in_tail/_form.html.haml @@ -23,11 +23,11 @@ = form.field(:tag) = form.field(:pos_file) -.well.well-sm - %h4{"data-toggle" => "collapse", "href" => "#advanced-setting"} +.card.mb-3 + %h4.card-header{"data-toggle" => "collapse", "href" => "#advanced-setting"} = icon('fa-caret-down') = t('terms.advanced_setting') - #advanced-setting.collapse + #advanced-setting.card-body.collapse .form-group = form.field(:rotate_wait) .form-group diff --git a/app/views/fluentd/settings/in_tail/after_file_choose.html.haml b/app/views/fluentd/settings/in_tail/after_file_choose.html.haml index 0e6db65..6d966d6 100644 --- a/app/views/fluentd/settings/in_tail/after_file_choose.html.haml +++ b/app/views/fluentd/settings/in_tail/after_file_choose.html.haml @@ -12,7 +12,7 @@ = f.text_field :path, class: "form-control", disabled: true = render "shared/vue/in_tail_parse", setting: @setting - .card + .card.mb-3 %pre.card-body= file_tail(@setting.path, Settings.in_tail_preview_line_count).join("\n") %p diff --git a/app/views/shared/vue/_aws_credential.html.haml b/app/views/shared/vue/_aws_credential.html.haml index 87687f9..f1b83a0 100644 --- a/app/views/shared/vue/_aws_credential.html.haml +++ b/app/views/shared/vue/_aws_credential.html.haml @@ -1,10 +1,8 @@ = render "shared/vue/config_field" %script{type: "text/x-template", id: "vue-aws-credential"} - .form-group.card.bg-light.mb-3 - .card-body - %label{"for" => "aws-credential"} - AWS credential + .form-group.mb-3 + %b-card{"header" => "AWS credential", "bg-variant" => "light"} %select{"id" => "aws-credential", "class" => "form-control mb-3", "v-model" => "credentialType", diff --git a/app/views/shared/vue/_grep_container.html.haml b/app/views/shared/vue/_grep_container.html.haml index 773fdad..5a59520 100644 --- a/app/views/shared/vue/_grep_container.html.haml +++ b/app/views/shared/vue/_grep_container.html.haml @@ -1,10 +1,10 @@ = render "shared/vue/grep_pattern" %script{type: "text/x-template", id: "vue-grep-container"} - .form-group.card - .card-header - %a.btn.btn-xs{"v-on:click" => "add", "v-if" => "index == 0"} + %b-card.form-group + %template{"slot" => "header"} + %b-button{"v-on:click" => "add", "size" => "sm", "variant" => "light", "v-if" => "index === 0"} = icon("fa-plus") - %a.btn.btn-xs{"v-on:click" => "remove", "v-if" => "index != 0"} + %b-button{"v-on:click" => "remove", "size" => "sm", "variant" => "light", "v-if" => "index !== 0"} = icon("fa-minus") %label {{ containerType | humanize }} @@ -20,13 +20,12 @@ "v-bind:name" => "inputName(index)", "v-model" => "grepType"} Exclude - .card-body - .row - %template{"v-for" => "(enabled, i) in patterns"} - %grep-pattern.col-xl-3{"v-if" => "enabled", - "v-bind:container-type" => "containerType", - "v-bind:grep-type" => "grepType", - "v-bind:index" => "index", - "v-bind:subIndex" => "i", - "v-on:add-grep-pattern" => "addGrepPattern", - "v-on:remove-grep-pattern" => "removeGrepPattern"} + .row + %template{"v-for" => "(enabled, i) in patterns"} + %grep-pattern.col-xl-3{"v-if" => "enabled", + "v-bind:container-type" => "containerType", + "v-bind:grep-type" => "grepType", + "v-bind:index" => "index", + "v-bind:subIndex" => "i", + "v-on:add-grep-pattern" => "addGrepPattern", + "v-on:remove-grep-pattern" => "removeGrepPattern"} diff --git a/app/views/shared/vue/_grep_pattern.html.haml b/app/views/shared/vue/_grep_pattern.html.haml index 46abc08..4ed4907 100644 --- a/app/views/shared/vue/_grep_pattern.html.haml +++ b/app/views/shared/vue/_grep_pattern.html.haml @@ -1,8 +1,8 @@ %script{type: "text/x-template", id: "vue-grep-pattern"} %div - %a.btn.btn-xs{"v-on:click" => "add", "v-if" => "subIndex == 0"} + %b-button{"v-on:click" => "add", "size" => "sm", "variant" => "light", "v-if" => "subIndex === 0"} = icon("fa-plus") - %a.btn.btn-xs{"v-on:click" => "remove", "v-if" => "subIndex != 0"} + %b-button{"v-on:click" => "remove", "size" => "sm", "variant" => "light", "v-if" => "subIndex !== 0"} = icon("fa-minus") %label {{ grepType | humanize }} diff --git a/app/views/shared/vue/_in_tail_parse.html.haml b/app/views/shared/vue/_in_tail_parse.html.haml index 231df99..afeb728 100644 --- a/app/views/shared/vue/_in_tail_parse.html.haml +++ b/app/views/shared/vue/_in_tail_parse.html.haml @@ -12,9 +12,9 @@ "v-on:change-plugin-name" => "onChangePluginName", "v-on:change-formats" => "onChangeFormats"} - .card.mb-3 - %pre{"class" => "card-body", "v-html" => "highlightedLines"} + %b-card.mb-3 + %pre{"v-html" => "highlightedLines"} - .card.md-3 - %p.card-body.pb-0 + %b-card.mb-3 + %p.pb-0.mb-0 =raw(t("fluentd.settings.in_tail_option_guide")) diff --git a/app/views/shared/vue/_parser_plugin_form.html.haml b/app/views/shared/vue/_parser_plugin_form.html.haml index 7153429..cd2bc81 100644 --- a/app/views/shared/vue/_parser_plugin_form.html.haml +++ b/app/views/shared/vue/_parser_plugin_form.html.haml @@ -2,7 +2,7 @@ = render "shared/vue/config_field" %script{type: "text/x-template", id: "vue-parser-plugin-form"} - .form-group.card.bg-light.mb-3{"v-bind:id" => "id"} + .form-group.mb-3{"v-bind:id" => "id"} %b-card{"bg-variant" => "light"} %label{"v-bind:for" => "selectId(pluginType)"} {{ pluginLabel }} diff --git a/app/views/shared/vue/_treeview.html.erb b/app/views/shared/vue/_treeview.html.erb deleted file mode 100644 index 57c7196..0000000 --- a/app/views/shared/vue/_treeview.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -<% add_javascript_pack_tag("treeview") %> -<% name ||= "" %> -<% action ||= "" %> -<% submit_button ||= "" %> -<%= form_tag(action, method: :post) do %> -
-
-
{{ path }}
-
- -
- - - <%= icon('fa-caret-right') %> - - {{ basename(dir) }} - -
-
- - <%= icon("fa-folder") %> - <%= icon("fa-file-o") %> - {{ basename(value.path) }} -
-
-
- -
{{ preview }}
-

- <%= submit_tag submit_button, class: "btn btn-lg btn-primary float-right", "v-bind:disabled" => "selectedIsDir" %> -

-
-<% end %> diff --git a/app/views/shared/vue/_treeview.html.haml b/app/views/shared/vue/_treeview.html.haml new file mode 100644 index 0000000..32e7798 --- /dev/null +++ b/app/views/shared/vue/_treeview.html.haml @@ -0,0 +1,30 @@ +:ruby + add_javascript_pack_tag("treeview") + name ||= "" + action ||= "" + submit_button ||= "" + += form_tag(action, method: :post) do + #treeview + %b-card{"variant" => "light"} + %pre.pb-0.mb-0 + {{ path }} + %input{"type" => "hidden", "name" => name, "v-model" => "path"} + .dirs + %span{"v-for" => "(dir, index) in currentDirs"} + %span{"v-if" => "index > 0"}= icon("fa-caret-right") + %span.dir{"v-on:click" => "selectPath(dir)"} + {{ basename(dir) }} + .tree + %span{"v-on:click" => "selectPath(value.path)", + "v-bind:class" => "{ selected: isSelected(value.path) }", + "v-for" => "value in paths"} + %span{"v-if" => "value.is_dir"}= icon("fa-folder") + %span{"v-if" => "!value.is_dir"}= icon("fa-file-o") + {{ basename(value.path) }} + %br + + %pre.preview{"v-if" => "preview"} + {{ preview }} + %p.mt-3 + = submit_tag(submit_button, class: "btn btn-lg btn-primary float-right", "v-bind:disabled" => "selectedIsDir")