fluentd-ui/app/javascript/packs/grep_container.js
Kenji Okimoto 85b0ff71fc
Implement view for filter_grep
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-09-11 16:58:01 +09:00

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 };