Commit 5cdd0397 authored by abbycin's avatar abbycin

add readme

parent 8ebfa65c
# 编译
```
npm install archiver
node build.js
```
如果一切正常会生成目录`mo`和压缩包`mo.zip`
# 安装
解压`mo.zip`到合适的目录,并进入到这个目录
### Windows
Windows 10 需要管理员运行cmd
```
.\backend.exe -run install
```
即可安装为服务
### Linux
可能需要给`backend`可执行权限,切换到root
```
chmod +x backend
./backend -run install
```
即可安装为服务
----
其他命令行参数(backend -run arg), arg可选值如下
```
start
stop
restart
install
uninstall
```
\ No newline at end of file
...@@ -145,6 +145,10 @@ export default { ...@@ -145,6 +145,10 @@ export default {
this.form.getFieldDecorator(v, { initialValue: "" }); this.form.getFieldDecorator(v, { initialValue: "" });
}); });
this.refresh();
},
methods: {
refresh() {
request( request(
"GET", "GET",
"/api/db", "/api/db",
...@@ -164,7 +168,6 @@ export default { ...@@ -164,7 +168,6 @@ export default {
} }
); );
}, },
methods: {
removeOne(index) { removeOne(index) {
this.modified.push(this.data[index].title); this.modified.push(this.data[index].title);
this.data.splice(index, 1); this.data.splice(index, 1);
...@@ -264,9 +267,10 @@ export default { ...@@ -264,9 +267,10 @@ export default {
if (ok.code !== 0) { if (ok.code !== 0) {
throw ok.msg; throw ok.msg;
} }
for(let [_, v] of oldData) { for (let [_, v] of oldData) {
this.orgData.push(v); this.orgData.push(v);
} }
this.refresh();
this.$message.info("所以更改提交成功"); this.$message.info("所以更改提交成功");
}, },
err => { err => {
...@@ -275,7 +279,7 @@ export default { ...@@ -275,7 +279,7 @@ export default {
); );
}, },
resetChange() { resetChange() {
this.data = _.cloneDeep(this.orgData); this.refresh();
this.searchText = ""; this.searchText = "";
this.$message.info("所以更改已回退"); this.$message.info("所以更改已回退");
}, },
...@@ -288,7 +292,7 @@ export default { ...@@ -288,7 +292,7 @@ export default {
}, },
partition(dbname) { partition(dbname) {
if(dbname === null || dbname.length === 0) { if (dbname === null || dbname.length === 0) {
this.$message.error(`数据库不能为空`); this.$message.error(`数据库不能为空`);
return; return;
} }
...@@ -319,14 +323,22 @@ export default { ...@@ -319,14 +323,22 @@ export default {
}; };
this.partitionIsRunning = true; this.partitionIsRunning = true;
url = `${getu(url)}/api/${dbname}/ikm6/system/runCreatePartitionTableTask`; url = `${getu(
request("GET", url, null, ok => { url
)}/api/${dbname}/ikm6/system/runCreatePartitionTableTask`;
request(
"GET",
url,
null,
ok => {
this.partitionIsRunning = false; this.partitionIsRunning = false;
this.$message.info(`分表请求已提交,结果为: ${ok}`); this.$message.info(`分表请求已提交,结果为: ${ok}`);
}, err => { },
err => {
this.partitionIsRunning = false; this.partitionIsRunning = false;
this.$message.error(`分表创建出错,结果为:${err}`); this.$message.error(`分表创建出错,结果为:${err}`);
}); }
);
} }
} }
}; };
......
<template> <template>
<a-form :form="form" @submit="handleUpdate"> <a-form :form="form" @submit="handleUpdate">
<a-form-item <a-form-item
v-bind="formItemLayout"
label="Server Root" label="Server Root"
extra="绝对路径,例如 /opt/tophttpserver/1.1.9" extra="绝对路径,例如 /opt/tophttpserver/1.1.9"
> >
...@@ -19,7 +18,7 @@ ...@@ -19,7 +18,7 @@
]" ]"
/> />
</a-form-item> </a-form-item>
<a-form-item v-bind="formItemLayout" label="Service URL" extra="检查tophttpserver是否可用,仅支持GET"> <a-form-item label="Service URL" extra="检查tophttpserver是否可用,仅支持GET">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="22"> <a-col :span="22">
<a-input <a-input
...@@ -34,7 +33,7 @@ ...@@ -34,7 +33,7 @@
</a-col> </a-col>
</a-row> </a-row>
</a-form-item> </a-form-item>
<a-form-item v-bind="tailFormItemLayout"> <a-form-item >
<a-button :disabled="restart" type="danger" @click="handleRestart">重启 httpserver</a-button> <a-button :disabled="restart" type="danger" @click="handleRestart">重启 httpserver</a-button>
<a-button type="primary" html-type="submit" style="float: right">更新配置</a-button> <a-button type="primary" html-type="submit" style="float: right">更新配置</a-button>
</a-form-item> </a-form-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment