failed 2 error

This commit is contained in:
Liang Ding 2014-10-27 23:58:10 +08:00
parent e2ffefd173
commit f439a45ade
5 changed files with 22 additions and 21 deletions

View File

@ -7,7 +7,7 @@
"username": "Username",
"current_user": "Current User",
"password": "Password",
"login_failed": "Login Failed",
"login_error": "Login Error",
"run": "Run",
"debug": "Debug",
"help": "Help",
@ -86,16 +86,16 @@
"focus_notification": "Focus to Notification",
"start-build": "START [go build]",
"build-succ": "[go build] SUCCESS",
"build-failed": "[go build] ERROR",
"build-error": "[go build] ERROR",
"start-test": "START [go test]",
"test-succ": "[go test] SUCCESS",
"test-failed": "[go test] ERROR",
"test-error": "[go test] ERROR",
"start-install": "START [go install]",
"install-succ": "[go install] SUCCESS",
"install-failed": "[go install] ERROR",
"install-error": "[go install] ERROR",
"start-get": "START [go get]",
"get-succ": "[go get] SUCCESS",
"get-failed": "[go get] ERROR",
"get-error": "[go get] ERROR",
"check_version": "Checking update",
"new_version_available": "new version available",
"go_env": "Go",

View File

@ -7,7 +7,7 @@
"username": "用户名",
"current_user": "当前用户",
"password": "密码",
"login_failed": "登录失败",
"login_error": "登录失败",
"run": "运行",
"debug": "调试",
"help": "帮助",
@ -86,16 +86,16 @@
"focus_notification": "焦点切换到通知窗口",
"start-build": "开始 [go build]",
"build-succ": "[go build] 成功",
"build-failed": "[go build] 失败",
"build-error": "[go build] 失败",
"start-test": "开始 [go test]",
"test-succ": "[go test] 成功",
"test-failed": "[go test] 失败",
"test-error": "[go test] 失败",
"start-install": "开始 [go install]",
"install-succ": "[go install] 成功",
"install-failed": "[go install] 失败",
"install-error": "[go install] 失败",
"start-get": "开始 [go get]",
"get-succ": "[go get] 成功",
"get-failed": "[go get] 失败",
"get-error": "[go get] 失败",
"check_version": "正在检查更新",
"new_version_available": "新版本可用",
"go_env": "Go 环境",

View File

@ -326,7 +326,7 @@ func BuildHandler(w http.ResponseWriter, r *http.Request) {
} else { // 构建失败
// 解析错误信息,返回给编辑器 gutter lint
errOut := string(buf)
channelRet["output"] = "<span class='build-failed'>" + i18n.Get(locale, "build-failed").(string) + "</span>\n" + errOut
channelRet["output"] = "<span class='build-error'>" + i18n.Get(locale, "build-error").(string) + "</span>\n" + errOut
lines := strings.Split(errOut, "\n")
@ -480,7 +480,7 @@ func GoTestHandler(w http.ResponseWriter, r *http.Request) {
if !cmd.ProcessState.Success() {
glog.V(3).Infof("Session [%s] 's running [go test] [runningId=%d] has done (with error)", sid, runningId)
channelRet["output"] = "<span class='test-failed'>" + i18n.Get(locale, "test-failed").(string) + "</span>\n" + string(buf)
channelRet["output"] = "<span class='test-error'>" + i18n.Get(locale, "test-error").(string) + "</span>\n" + string(buf)
} else {
glog.V(3).Infof("Session [%s] 's running [go test] [runningId=%d] has done", sid, runningId)
@ -636,7 +636,7 @@ func GoInstallHandler(w http.ResponseWriter, r *http.Request) {
channelRet["lints"] = lints
channelRet["output"] = "<span class='install-failed'>" + i18n.Get(locale, "install-failed").(string) + "</span>\n" + errOut
channelRet["output"] = "<span class='install-error'>" + i18n.Get(locale, "install-error").(string) + "</span>\n" + errOut
} else {
channelRet["output"] = "<span class='install-succ'>" + i18n.Get(locale, "install-succ").(string) + "</span>\n"
}
@ -749,7 +749,7 @@ func GoGetHandler(w http.ResponseWriter, r *http.Request) {
if 0 != len(buf) {
glog.V(3).Infof("Session [%s] 's running [go get] [runningId=%d] has done (with error)", sid, runningId)
channelRet["output"] = "<span class='get-failed'>" + i18n.Get(locale, "get-failed").(string) + "</span>\n" + string(buf)
channelRet["output"] = "<span class='get-error'>" + i18n.Get(locale, "get-error").(string) + "</span>\n" + string(buf)
} else {
glog.V(3).Infof("Session [%s] 's running [go get] [runningId=%d] has done", sid, runningId)

View File

@ -271,6 +271,7 @@
}
.bottom-window-group .output {
font-family: Consolas, Courier New, monospace;
padding: 0 5px;
line-height: 16px;
font-size: 12px;
@ -294,10 +295,10 @@
color: rgb(0,153,0);
}
.bottom-window-group .output .build-failed,
.bottom-window-group .output .test-failed,
.bottom-window-group .output .install-failed,
.bottom-window-group .output .get-failed {
.bottom-window-group .output .build-error,
.bottom-window-group .output .test-error,
.bottom-window-group .output .install-error,
.bottom-window-group .output .get-error {
color: red;
}

View File

@ -58,7 +58,7 @@
dataType: "json",
success: function (data) {
if (!data.succ) {
$("#msg").text('{{.i18n.login_failed}}').show();
$("#msg").text('{{.i18n.login_error}}').show();
return;
}
@ -70,7 +70,7 @@
$("#username").keydown(function (event) {
if (event.which === 13) {
if ($.trim($(this).val()) === "") {
$("#msg").text("{{.i18n.login_failed}}").show();
$("#msg").text("{{.i18n.login_error}}").show();
} else {
$("#password").focus();
}
@ -83,7 +83,7 @@
$("#password").keydown(function (event) {
if (event.which === 13) {
if ($.trim($(this).val()) === "") {
$("#msg").text("{{.i18n.login_failed}}").show();
$("#msg").text("{{.i18n.login_error}}").show();
} else {
login();
}