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 {
this.form.getFieldDecorator(v, { initialValue: "" });
});
this.refresh();
},
methods: {
refresh() {
request(
"GET",
"/api/db",
......@@ -164,7 +168,6 @@ export default {
}
);
},
methods: {
removeOne(index) {
this.modified.push(this.data[index].title);
this.data.splice(index, 1);
......@@ -264,9 +267,10 @@ export default {
if (ok.code !== 0) {
throw ok.msg;
}
for(let [_, v] of oldData) {
for (let [_, v] of oldData) {
this.orgData.push(v);
}
this.refresh();
this.$message.info("所以更改提交成功");
},
err => {
......@@ -275,7 +279,7 @@ export default {
);
},
resetChange() {
this.data = _.cloneDeep(this.orgData);
this.refresh();
this.searchText = "";
this.$message.info("所以更改已回退");
},
......@@ -288,7 +292,7 @@ export default {
},
partition(dbname) {
if(dbname === null || dbname.length === 0) {
if (dbname === null || dbname.length === 0) {
this.$message.error(`数据库不能为空`);
return;
}
......@@ -319,14 +323,22 @@ export default {
};
this.partitionIsRunning = true;
url = `${getu(url)}/api/${dbname}/ikm6/system/runCreatePartitionTableTask`;
request("GET", url, null, ok => {
url = `${getu(
url
)}/api/${dbname}/ikm6/system/runCreatePartitionTableTask`;
request(
"GET",
url,
null,
ok => {
this.partitionIsRunning = false;
this.$message.info(`分表请求已提交,结果为: ${ok}`);
}, err => {
},
err => {
this.partitionIsRunning = false;
this.$message.error(`分表创建出错,结果为:${err}`);
});
}
);
}
}
};
......
<template>
<a-form :form="form" @submit="handleUpdate">
<a-form-item
v-bind="formItemLayout"
label="Server Root"
extra="绝对路径,例如 /opt/tophttpserver/1.1.9"
>
......@@ -19,7 +18,7 @@
]"
/>
</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-col :span="22">
<a-input
......@@ -34,7 +33,7 @@
</a-col>
</a-row>
</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 type="primary" html-type="submit" style="float: right">更新配置</a-button>
</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