Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tars-go 服务添加平滑发布功能 #67

Merged
merged 2 commits into from
Jul 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/service/logview/LogviewService.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ LogviewService.getQueryParam = function(paramStr) {
} else {
cmd += "|head -" + showLine;
}
cmd += " | cat -v "
cmd += " | cat "
console.log("=============>getQueryParam cmd:" + cmd);
return cmd;
}
Expand Down
2 changes: 1 addition & 1 deletion client/dist/dcache.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>DCache</title><link href=/css/chunk-common.f52b94f0.css rel=preload as=style><link href=/css/chunk-vendors.4fa751bd.css rel=preload as=style><link href=/css/dcache.5a9fded0.css rel=preload as=style><link href=/js/chunk-common.e2cf1ad4.js rel=preload as=script><link href=/js/chunk-vendors.33ce2382.js rel=preload as=script><link href=/js/dcache.47dffc88.js rel=preload as=script><link href=/css/chunk-vendors.4fa751bd.css rel=stylesheet><link href=/css/chunk-common.f52b94f0.css rel=stylesheet><link href=/css/dcache.5a9fded0.css rel=stylesheet></head><body><noscript><strong>We're sorry but DCache doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.33ce2382.js></script><script src=/js/chunk-common.e2cf1ad4.js></script><script src=/js/dcache.47dffc88.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>DCache</title><link href=/css/chunk-common.f52b94f0.css rel=preload as=style><link href=/css/chunk-vendors.4fa751bd.css rel=preload as=style><link href=/css/dcache.5a9fded0.css rel=preload as=style><link href=/js/chunk-common.d56b3878.js rel=preload as=script><link href=/js/chunk-vendors.33ce2382.js rel=preload as=script><link href=/js/dcache.25228c34.js rel=preload as=script><link href=/css/chunk-vendors.4fa751bd.css rel=stylesheet><link href=/css/chunk-common.f52b94f0.css rel=stylesheet><link href=/css/dcache.5a9fded0.css rel=stylesheet></head><body><noscript><strong>We're sorry but DCache doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.33ce2382.js></script><script src=/js/chunk-common.d56b3878.js></script><script src=/js/dcache.25228c34.js></script></body></html>
2 changes: 1 addition & 1 deletion client/dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>TarsNodeWeb</title><link href=/css/chunk-common.f52b94f0.css rel=preload as=style><link href=/css/chunk-vendors.4fa751bd.css rel=preload as=style><link href=/css/index.8e1a142f.css rel=preload as=style><link href=/js/chunk-common.e2cf1ad4.js rel=preload as=script><link href=/js/chunk-vendors.33ce2382.js rel=preload as=script><link href=/js/index.e31e2bc9.js rel=preload as=script><link href=/css/chunk-vendors.4fa751bd.css rel=stylesheet><link href=/css/chunk-common.f52b94f0.css rel=stylesheet><link href=/css/index.8e1a142f.css rel=stylesheet></head><body><noscript><strong>We're sorry but TarsNodeWeb doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.33ce2382.js></script><script src=/js/chunk-common.e2cf1ad4.js></script><script src=/js/index.e31e2bc9.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>TarsNodeWeb</title><link href=/css/chunk-common.f52b94f0.css rel=preload as=style><link href=/css/chunk-vendors.4fa751bd.css rel=preload as=style><link href=/css/index.8e1a142f.css rel=preload as=style><link href=/js/chunk-common.d56b3878.js rel=preload as=script><link href=/js/chunk-vendors.33ce2382.js rel=preload as=script><link href=/js/index.ddca25a1.js rel=preload as=script><link href=/css/chunk-vendors.4fa751bd.css rel=stylesheet><link href=/css/chunk-common.f52b94f0.css rel=stylesheet><link href=/css/index.8e1a142f.css rel=stylesheet></head><body><noscript><strong>We're sorry but TarsNodeWeb doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.33ce2382.js></script><script src=/js/chunk-common.d56b3878.js></script><script src=/js/index.ddca25a1.js></script></body></html>
File renamed without changes.
1 change: 1 addition & 0 deletions client/dist/js/index.ddca25a1.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion client/dist/js/index.e31e2bc9.js

This file was deleted.

4 changes: 2 additions & 2 deletions client/src/pages/publish/status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
publishModal.model.serverList.forEach((item) => {
items.push({
server_id: item.id.toString(),
command: 'patch_tars',
command: publishModal.command || 'patch_tars',
parameters: {
patch_id: publishModal.model.patch_id.toString(),
bak_flag: item.bak_flag || false,
Expand Down Expand Up @@ -115,7 +115,7 @@ export default {
}

if(item.percent) {
item.desc = "(" + item.percent + "%)"
item.desc = "(" + item.percent + "%)"
} else {
item.desc = "...";
}
Expand Down
6 changes: 5 additions & 1 deletion client/src/pages/server/publish.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
</div>
<br/>
<let-button theme="primary" size="small" class="mt10" @click="savePublishServer">{{$t('common.patch')}}</let-button>
<let-button theme="sub-primary" v-if="serverList.length > 0 && serverList[0].server_type === 'tars_go' " size="small" style="{margin-left: 5px}" class="mt10" @click="savePublishServer($event, 1)">
{{$t('common.gracePatch')}}
</let-button>
</let-form-item>

<let-form-item :label="$t('serverList.table.th.version')" v-else>
Expand Down Expand Up @@ -431,9 +434,10 @@ export default {
this.patchType = 'patch';
this.$refs.publishForm.resetValid();
},
savePublishServer() {
savePublishServer(event, isGrace) {
// 发布
if (this.$refs.publishForm.validate()) {
this.publishModal.command = isGrace ? 'grace_patch_tars':"patch_tars"
this.$refs.publishStatus.savePublishServer(this.publishModal, this.closePublishModal);
}
},
Expand Down
5 changes: 3 additions & 2 deletions locale/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
"serial": "序号",
"config": "配置",
"patch": "发布",
"gracePatch": "平滑发布",
"service": "服务",
"time": "时间",
"name": "名",
Expand Down Expand Up @@ -808,7 +809,7 @@
"step4": "window命令行运行: busybox.exe install_tarsnode.sh",
"step5": "windows计划任务中增加监控: c:\\tars-install\\tars\\tarsnode\\util\\monitor.bat",
"step6": "完成安装, 缺省目录: c:\\tars-install\\tars"
}
}
},
"add": {
"nodeNameTips": "节点名不能为空",
Expand Down Expand Up @@ -854,7 +855,7 @@
"invalid": "无法安装",
"installing": "正在安装"
}
},
},
"checkTable": {
"table": {
"th": {
Expand Down
1 change: 1 addition & 0 deletions locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
"serial": "serial",
"config": "configuration",
"patch": "publish",
"gracePatch": "grace publish",
"service": "service",
"time": "Time",
"name": "name",
Expand Down