Skip to content

Commit

Permalink
add readme & fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang-RoseChild committed Mar 12, 2017
1 parent 525b437 commit 74d5b85
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 16 deletions.
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
# redis-admin
redis-admin
golang + vue + elementui 实现简单的redis后台管理
* 支持自定义分隔符
* 可修改field和值
* 可直接运行redis命令

# 使用方法
clone下来后,直接运行目录中的可执行文件。
也可源代码安装(但不太推荐,目前对前端不熟练,尤其是nmp,webpace之类的,碰到坑的话,那就下去看看吧):

via curl
> sh -c "$(curl -fsSL https://raw.githubusercontent.com/Tang-RoseChild/redis-admin/master/install.sh)"
via wget
> sh -c "$(wget https://raw.githubusercontent.com/Tang-RoseChild/redis-admin/master/install.sh -O -)"
## TODO

* refactor
* add tutorial
默认端口号9092.再浏览器中输入localhost:9092即可

#目录结构
backend:golang代码
front:前端界面代码
install.sh源代码安装脚本
static:front编译后的dist文件夹

## TODO
* 添加类似kibana的控制台
7 changes: 4 additions & 3 deletions front/src/components/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default {
})
},
modify (idx, ope, newVal) {
if (!this.detailDialogVisible) {
if (!this.detailDialogVisible || !newVal) {
return
}
const RENAME_FIELD = 1
Expand All @@ -198,6 +198,7 @@ export default {
if (ope === RENAME_FIELD) {
req.oldField = redisKey.values[idx].field
req.field = newVal
req.value = redisKey.values[idx].score
} else if (ope === MODIFY_VALUE) {
if (redisKey.values[idx].field) {
req.field = redisKey.values[idx].field
Expand All @@ -207,14 +208,14 @@ export default {
} else {
return
}
// console.log('modify req > ', req)
let _this = this
_this.$http.post('/modify', req).then(resp => {
if (resp.error) {
console.log('err', resp.error)
_this.$message({message: resp.error, type: 'error'})
} else {
_this.$message({message: 'updated', type: 'info'})
// _this.$message({message: 'updated', type: 'info'})
if (ope === RENAME_FIELD) {
redisKey.values[idx].field = newVal
} else if (ope === MODIFY_VALUE) {
Expand Down
Binary file added images/cmd.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/peizhi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/xiugai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion static/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><title>redis</title><link href=/static/css/app.3efa06abbb352a4ccd58024c605f5c01.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.1f128e9a3d2d57488380.js></script><script type=text/javascript src=/static/js/vendor.50fdd451637ce6b61ebb.js></script><script type=text/javascript src=/static/js/app.1afdcc2729fd4cfa0ffe.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><title>redis</title><link href=/static/css/app.3efa06abbb352a4ccd58024c605f5c01.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.cacf1978870d6daa348e.js></script><script type=text/javascript src=/static/js/vendor.50fdd451637ce6b61ebb.js></script><script type=text/javascript src=/static/js/app.ec3933c49eb3bf3d6f86.js></script></body></html>
1 change: 0 additions & 1 deletion static/static/js/app.1afdcc2729fd4cfa0ffe.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions static/static/js/app.ec3933c49eb3bf3d6f86.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 74d5b85

Please sign in to comment.