diff --git a/internal/models/task.go b/internal/models/task.go
index f9062f90b..9c027642b 100644
--- a/internal/models/task.go
+++ b/internal/models/task.go
@@ -273,4 +273,9 @@ func (task *Task) parseWhere(session *xorm.Session, params CommonMap) {
if ok && tag.(string) != "" {
session.And("tag = ? ", tag)
}
+
+ command, ok := params["Command"]
+ if ok && command.(string) != "" {
+ session.And("t.command LIKE ?", "%"+command.(string)+"%")
+ }
}
diff --git a/internal/routers/task/task.go b/internal/routers/task/task.go
index 42865a1d0..0c430240b 100644
--- a/internal/routers/task/task.go
+++ b/internal/routers/task/task.go
@@ -286,6 +286,7 @@ func parseQueryParams(ctx *macaron.Context) models.CommonMap {
params["Name"] = ctx.QueryTrim("name")
params["Protocol"] = ctx.QueryInt("protocol")
params["Tag"] = ctx.QueryTrim("tag")
+ params["Command"] = ctx.QueryTrim("command")
status := ctx.QueryInt("status")
if status >= 0 {
status -= 1
diff --git a/web/vue/src/pages/task/list.vue b/web/vue/src/pages/task/list.vue
index 474fb0eb6..9232f7b8b 100644
--- a/web/vue/src/pages/task/list.vue
+++ b/web/vue/src/pages/task/list.vue
@@ -10,6 +10,9 @@
+
+
+
@@ -203,7 +206,8 @@ export default {
name: '',
tag: '',
host_id: '',
- status: ''
+ status: '',
+ command: ''
},
isAdmin: this.$store.getters.user.isAdmin,
protocolList: [