diff --git a/command.go b/command.go
index e580a8c..7b3ea35 100644
--- a/command.go
+++ b/command.go
@@ -95,17 +95,16 @@ func handleCmdReq(br *broker, c *gin.Context) {
params := jsoniter.Get(content, "params")
- data := make([]string, 5)
+ data := make([]string, 4)
data[0] = jsoniter.Get(content, "username").ToString()
- data[1] = jsoniter.Get(content, "password").ToString()
- data[2] = jsoniter.Get(content, "cmd").ToString()
- data[3] = token
- data[4] = string(byte(params.Size()))
+ data[1] = jsoniter.Get(content, "cmd").ToString()
+ data[2] = token
+ data[3] = string(byte(params.Size()))
msg := []byte(strings.Join(data, string(byte(0))))
- for i := 0; i < params.Size(); i++ {
+ for i := range params.Size() {
msg = append(msg, params.Get(i).ToString()...)
msg = append(msg, 0)
}
diff --git a/ui/src/views/Home.vue b/ui/src/views/Home.vue
index 50eaf40..9ff1d0f 100644
--- a/ui/src/views/Home.vue
+++ b/ui/src/views/Home.vue
@@ -45,9 +45,6 @@
-
-
-
@@ -130,7 +127,6 @@ export default {
},
cmdData: {
username: '',
- password: '',
cmd: '',
params: [],
currentParam: '',
@@ -309,17 +305,18 @@ export default {
doCmd() {
(this.$refs['cmdForm']).validate(valid => {
if (valid) {
+ const selection = this.selection.filter(item => item.proto > 4)
+
this.cmdModal = false
this.cmdStatus.modal = true
- this.cmdStatus.total = this.selection.length
- this.cmdStatus.execing = this.selection.length
+ this.cmdStatus.total = selection.length
+ this.cmdStatus.execing = selection.length
this.cmdStatus.fail = 0
this.cmdStatus.responses = []
- this.selection.forEach(item => {
+ selection.forEach(item => {
const data = {
username: this.cmdData.username,
- password: this.cmdData.password,
cmd: this.cmdData.cmd,
params: this.cmdData.params
}