Skip to content

Commit

Permalink
add static files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang-RoseChild committed Mar 12, 2017
1 parent 0cf6a77 commit 525b437
Show file tree
Hide file tree
Showing 15 changed files with 1,079 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/impl/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (s *impl) ExecCmd(req *domain.RedisCmd) (root *domain.Node, info interface{
domain.DomainStore.UpdateConfig(&domain.RedisConfig{DB: utils.PInt(db)})
root = getRootNode("*")
case "keys":
getRootNode(req.Key)
root = getRootNode(req.Key)
default:
// just return simple info
cmd := redis.NewCmd(formatRedisCmdAsArgs(req)...)
Expand Down
2 changes: 1 addition & 1 deletion front/src/components/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default {
if (node.parent.children[i].displayName === displayName) {
node.parent.children.splice(i, 1)
if (node.parent.children.length === 0) {
if (node.parent.children.length === 0 && node.parent.parent) {
removeNode(node.parent, node.parent.displayName)
}
}
Expand Down
38 changes: 38 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

export cnpm="npm --registry=https://registry.npm.taobao.org \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npm.taobao.org/dist \
--userconfig=$HOME/.cnpmrc"

export GOPATH=`pwd`
export WORKDIR=$GOPATH/src/github.com/Tang-RoseChild/redis-admin
export FRONT_DIR=$GOPATH/src/github.com/Tang-RoseChild/redis-admin/front

go get github.com/Tang-RoseChild/redis-admin/backend
if [[ $? != 0 ]]; then
echo "go get github.com/Tang-RoseChild/redis-admin/backend failed"
exit 1
fi

cd $FRONT_DIR
$cnpm install
if [[ $? != 0 ]]; then
echo "cnpm install failed..."
echo "will use npm for installing,this will cost a lot of time...."
npm install
fi

if [[ $? != 0 ]]; then
echo "install failed, please fixed it, than re-run"
exit 1
fi

npm run build

mv static ../static
cd $WORKDIR

$GOPATH/bin/backend


Binary file added main_linux
Binary file not shown.
Binary file added main_mac
Binary file not shown.
1 change: 1 addition & 0 deletions static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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>
57 changes: 57 additions & 0 deletions static/static/css/app.3efa06abbb352a4ccd58024c605f5c01.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file added static/static/fonts/element-icons.b02bdc1.ttf
Binary file not shown.
Loading

0 comments on commit 525b437

Please sign in to comment.