This commit is contained in:
parent
aa192b13b3
commit
125cb10d24
|
@ -159,7 +159,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
if nil != wsChannel {
|
if nil != wsChannel {
|
||||||
channelRet["cmd"] = "run-done"
|
channelRet["cmd"] = "run-done"
|
||||||
channelRet["output"] = "<pre>" + buf + "</pre>"
|
channelRet["output"] = buf
|
||||||
err := wsChannel.Conn.WriteJSON(&channelRet)
|
err := wsChannel.Conn.WriteJSON(&channelRet)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
|
@ -173,7 +173,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
} else {
|
} else {
|
||||||
if nil != wsChannel {
|
if nil != wsChannel {
|
||||||
channelRet["cmd"] = "run"
|
channelRet["cmd"] = "run"
|
||||||
channelRet["output"] = "<pre>" + buf + "</pre>"
|
channelRet["output"] = buf
|
||||||
err := wsChannel.Conn.WriteJSON(&channelRet)
|
err := wsChannel.Conn.WriteJSON(&channelRet)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
|
@ -201,7 +201,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
wsChannel := session.OutputWS[sid]
|
wsChannel := session.OutputWS[sid]
|
||||||
|
|
||||||
channelRet["cmd"] = "run-done"
|
channelRet["cmd"] = "run-done"
|
||||||
channelRet["output"] = "<pre>" + buf + "</pre>"
|
channelRet["output"] = buf
|
||||||
err := wsChannel.Conn.WriteJSON(&channelRet)
|
err := wsChannel.Conn.WriteJSON(&channelRet)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
|
@ -217,7 +217,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
wsChannel := session.OutputWS[sid]
|
wsChannel := session.OutputWS[sid]
|
||||||
|
|
||||||
channelRet["cmd"] = "run"
|
channelRet["cmd"] = "run"
|
||||||
channelRet["output"] = "<pre>" + buf + "</pre>"
|
channelRet["output"] = buf
|
||||||
err := wsChannel.Conn.WriteJSON(&channelRet)
|
err := wsChannel.Conn.WriteJSON(&channelRet)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
|
|
Loading…
Reference in New Issue