mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-12 01:07:09 +02:00
31 lines
652 B
JavaScript
31 lines
652 B
JavaScript
/* global _ */
|
|
"use strict";
|
|
import "lodash/lodash";
|
|
import GrepPattern from "./grep_pattern";
|
|
|
|
const GrepContainer = {
|
|
template: "#vue-grep-container",
|
|
components: {
|
|
"grep-pattern": GrepPattern
|
|
},
|
|
props: [
|
|
"containerType", // and/or
|
|
"index",
|
|
],
|
|
filters: {
|
|
humanize: function(value) {
|
|
return _.capitalize(value.replace(/_/g, " "));
|
|
}
|
|
},
|
|
methods: {
|
|
add: function(event) {
|
|
this.$emit("add-grep-container", this.containerType, this.index);
|
|
},
|
|
remove: function(event) {
|
|
this.$emit("remove-grep-container", this.containerType, this.index);
|
|
}
|
|
}
|
|
};
|
|
|
|
export { GrepContainer as default };
|