Fixes small issues

pull/104/head
Doflatango 2018-09-08 14:00:10 +08:00
parent 27507a698f
commit 93220344ae
5 changed files with 13 additions and 13 deletions

1
go.mod
View File

@ -14,6 +14,7 @@ require (
github.com/fsnotify/fsnotify v1.4.7
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df
github.com/gofrs/uuid v3.1.0+incompatible
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 // indirect

2
go.sum
View File

@ -24,6 +24,8 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df h1:Bao6dhmbTA1KFVxmJ6nBoMuOJit2yjEgLJpIMYpop0E=
github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df/go.mod h1:GJr+FCSXshIwgHBtLglIg9M2l2kQSi6QjVAngtzI08Y=
github.com/gofrs/uuid v3.1.0+incompatible h1:q2rtkjaKT4YEr6E1kamy0Ha4RtepWlQBedyHx0uzKwA=
github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=

View File

@ -1,6 +1,7 @@
package cronsun
import (
"encoding/json"
"fmt"
"strings"
"sync"
@ -9,8 +10,6 @@ import (
client "github.com/coreos/etcd/clientv3"
"encoding/json"
"github.com/shunfei/cronsun/conf"
"github.com/shunfei/cronsun/log"
)

View File

@ -6,7 +6,6 @@ import (
"net/http"
"sort"
"strings"
"time"
"github.com/coreos/etcd/clientv3"
"github.com/gorilla/mux"
@ -354,7 +353,6 @@ func (j *Job) GetExecutingJob(ctx *Context) {
val := string(gresp.Kvs[i].Value)
var p cronsun.Process
json.Unmarshal([]byte(val), &p)
proc.Time, _ = time.Parse(time.RFC3339, p.Time)
list = append(list, proc)
}

View File

@ -104,15 +104,15 @@ export default {
},
killProc(proc, index) {
if (confirm(this.$L("whether to kill the process"))) {
var id = proc.nodeId + "." + proc.group + "." + proc.jobId + "." + proc.id;
this.$rest.DELETE('job/executing/' + id)
.onsucceed(200, (resp) => {
this.executings.splice(index, 1);
})
.onfailed((resp)=>{vm.$bus.$emit('error', resp)})
.do();
}
if (!confirm(this.$L("whether to kill the process"))) return;
var id = proc.nodeId + "." + proc.group + "." + proc.jobId + "." + proc.id;
this.$rest.DELETE('job/executing/' + id)
.onsucceed(200, (resp) => {
this.executings.splice(index, 1);
})
.onfailed((resp) => vm.$bus.$emit('error', resp))
.do();
},
buildQuery(){