Sha256: b9308005d8f34a021c29efdb2cb02db2f9794fe465c4f3d5f7afbd6528e9ca1e
Contents?: true
Size: 1.19 KB
Versions: 5
Compression:
Stored size: 1.19 KB
Contents
/* global _ */ "use strict"; import "lodash/lodash"; import ConfigField from "./config_field"; const TransportConfig = { template: "#vue-transport-config", components: { "config-field": ConfigField }, props: [ "pluginType", "pluginName" ], data: function() { return { transportType: "tcp", options: ["tcp", "tls"], tlsOptions: [] }; }, computed: { token: function() { return Rails.csrfToken(); } }, filters: { toUpper: function(value) { return _.toUpper(value); } }, mounted: function() { }, methods: { onChange: function() { console.log(this.pluginType, this.pluginName, this.transportType); this.updateSection(); }, updateSection: function() { if (this.transportType === "tcp") { return; } $.ajax({ method: "GET", url: `${relativeUrlRoot}/api/config_definitions`, headers: { "X-CSRF-Token": this.token }, data: { type: this.pluginType, name: this.pluginName } }).then((data) => { this.tlsOptions = data.tlsOptions; }); } } }; export { TransportConfig as default };
Version data entries
5 entries across 5 versions & 1 rubygems