From 0d6255b7e92390696069b10bc4ad7f30c31582c7 Mon Sep 17 00:00:00 2001 From: Sylvain Afchain Date: Tue, 24 Sep 2019 15:16:11 +0200 Subject: [PATCH] ui: remove increment parameter as not used anymore --- cmd/injector/standalone.go | 2 +- statics/js/components/inject-form.js | 32 ++++++++++------------------ 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/cmd/injector/standalone.go b/cmd/injector/standalone.go index 6d7dcf38e6..f94e261900 100644 --- a/cmd/injector/standalone.go +++ b/cmd/injector/standalone.go @@ -64,7 +64,7 @@ func AddInjectPacketInjectFlags(cmd *cobra.Command) { cmd.Flags().StringVarP(&payload, "payload", "", "", "payload") cmd.Flags().StringVar(&pcap, "pcap", "", "PCAP file") cmd.Flags().Uint16VarP(&id, "id", "", 0, "ICMP identification") - cmd.Flags().IntVarP(&mode, "mode", "", types.PIModeRandom, "specify type of modification between injections") + cmd.Flags().IntVarP(&mode, "mode", "", types.PIModeUniqPerNode, "specify type of modification between injections") cmd.Flags().Int64VarP(&incrementPayload, "inc-payload", "", 0, "increase payload size each packet") cmd.Flags().Uint64VarP(&count, "count", "", 1, "number of packets to be generated") cmd.Flags().Uint64VarP(&interval, "interval", "", 0, "wait interval milliseconds between sending each packet") diff --git a/statics/js/components/inject-form.js b/statics/js/components/inject-form.js index abb851d471..9655e6065b 100644 --- a/statics/js/components/inject-form.js +++ b/statics/js/components/inject-form.js @@ -56,29 +56,22 @@ Vue.component('inject-form', { \ \ \ -
\ - \ -
\ \
\ \ \
\ -
\ +
\ \ - \ + \
\ -
\ +
\ \ \
\ @@ -118,17 +111,16 @@ Vue.component('inject-form', { type: "icmp4", id: 0, interval: 0, - increment: false, port1: 0, port2: 0, - payloadlength: 0, + payloadLength: 0, srcNode: null, dstNode: null, srcIP: "", dstIP: "", srcMAC: "", dstMAC: "", - mode: "random", + payloadMode: "random", payload: "", incrementPayload: 0, ttl: 64, @@ -237,15 +229,14 @@ Vue.component('inject-form', { }, reset: function() { - var self = this; this.node1 = this.node2 = ""; this.count = 1; this.type = "icmp4"; - this.payloadlength = this.incrementPayload = 0; + this.payloadLength = this.incrementPayload = 0; this.srcNode = this.dstNode = null; this.srcIP = this.dstIP = ""; this.srcMAC = this.dstMAC = ""; - this.mode = "random"; + this.payloadMode = "random"; this.payload = ""; this.ttl = 64; }, @@ -256,8 +247,8 @@ Vue.component('inject-form', { this.$error({message: this.error}); return; } - if (this.mode == "random") { - this.payload = "x".repeat(this.payloadlength); + if (this.payloadMode == "random") { + this.payload = "x".repeat(this.payloadLength); } var requestTTL = this.interval*this.count; var headers = {"X-Resource-TTL": requestTTL + 5000 + "ms"}; @@ -276,7 +267,6 @@ Vue.component('inject-form', { "Type": this.type, "Count": this.count, "ICMPID": this.id, - "Increment": this.increment, "Interval": this.interval, "Payload": this.payload, "IncrementPayload": this.incrementPayload,