优化调试GUI

This commit is contained in:
wh_zcy 2022-09-27 11:08:46 +08:00
parent 245361a871
commit 2856f18728
5 changed files with 23 additions and 9 deletions

View File

@ -4,5 +4,5 @@ Website = "http://legu.cc"
Icon = "app.png"
Name = "RobotGUI"
ID = "cc.legu.app"
Version = "1.0.8"
Build = 9
Version = "1.0.9"
Build = 10

View File

@ -21,6 +21,7 @@ import (
"fyne.io/fyne/v2"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
"google.golang.org/protobuf/proto"
)
@ -642,6 +643,16 @@ var (
MainType: string(comm.ModuleRtask),
SubType: rtask.RtaskSubTypeList,
Enabled: true,
Print: func(rsp proto.Message) string {
if in, ok := rsp.(*pb.UserMessage); ok {
out := &pb.RtasklistResp{}
if !comm.ProtoUnmarshal(in, out) {
return errors.New("unmarshal err").Error()
}
return strings.Join(cast.ToStringSlice(out.RtaskIds), ",")
}
return ""
},
},
ff(comm.ModuleRtask, rtask.RtaskSubTypeApply): {
NavLabel: "做任务",

View File

@ -34,7 +34,7 @@ func (this *RtaskListView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.form.AppendItem(widget.NewFormItem("", input))
res := widget.NewEntry()
res.PlaceHolder = "已完成任务列表"
res.PlaceHolder = "已完成任务列表 ,号分隔"
this.form.AppendItem(widget.NewFormItem("", res))
// task list button

View File

@ -31,13 +31,16 @@ func (this *apiComp) Rtest(session comm.IUserSession, req *pb.RtaskTestReq) (cod
}
rtaskIds := make([]int32, 0)
if v, ok := rtask.FrtaskIds[req.GroupId]; ok {
ids := strings.Split(req.RtaskIds, ",")
for _, id := range ids {
rtaskIds = append(rtaskIds, cast.ToInt32(id))
}
if v, ok := rtask.FrtaskIds[req.GroupId]; ok {
v.RtaskIds = rtaskIds
} else {
rtask.FrtaskIds = make(map[int32]*pb.FrtaskIds)
rtask.FrtaskIds[req.GroupId] = &pb.FrtaskIds{RtaskIds: rtaskIds}
}
update := map[string]interface{}{