60

oui/README_ZH.md at master · zhaojh329/oui · GitHub

 4 years ago
source link: https://github.com/zhaojh329/oui/blob/master/README_ZH.md?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

oui/README_ZH.md at master · zhaojh329/oui · GitHubPermalink

Join GitHub today

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Sign up
master

oui/README_ZH.md

Go to file

117 lines (95 sloc) 3.52 KB

demo-zh.gif

diagram.png

OpenWrt后台管理界面,使用vue.jsAnt Design of Vue实现。

Oui使用json-rpc和OpenWrt子系统通信, 支持 ACL。

Oui特别适合用于企业定制开发。

添加 feeds

echo "src-git oui https://github.com/zhaojh329/oui.git" >> feeds.conf.default
./scripts/feeds update oui
./scripts/feeds install -a -p oui
Oui  --->
	Applications  --->
		<*> oui-app-admin............................................. Administration
		<*> oui-app-diagnostics.......................................... Diagnostics
		<*> oui-app-firewall................................................ Firewall
		<*> oui-app-home.......................................... Built-in home page
		<*> oui-app-interfaces.................................... Network Interfaces
		<*> oui-app-login........................................ Built-in login page
		<*> oui-app-system............................................ System Setting
		<*> oui-app-upgrade......................................... Backup / Upgrade
		<*> oui-app-wireless................................................ Wireless
	-*- oui-bwm........................................ Bandwidth Monitor for oui
	-*- oui-httpd................................................ Oui rpc backend
	-*- oui-ui-core.................................................. Oui ui core
make V=s

Jsonrpc 示例

{
	"jsonrpc": "2.0",
	"id": 27,
	"method": "call",
	"params": ["sid", "network", "dhcp_leases", {}]
}
{
	"jsonrpc": "2.0",
	"id": 7,
	"method": "call",
	"params": ["sid", "ubus", "call", { "object": "system", "method": "board" }]
}

如何修改 Vue

oui-ui-core

  1. 进入目录 'oui/oui-ui-core/vue' 然后执行如下命令
	npm install
	npm run build
	../../scripts/clean-dist.sh dist

Application

  1. 进入你的Application目录(例如 oui-app-example)然后执行如下命令
	cp vue/app.vue ../../build-app/src/
  1. 进入目录 oui/build-app 然后执行如下命令
	npm install
	npm run build
	cp dist/app.common.js.gz ../applications/oui-app-example/vue/dist/app.js

如何调试 Application(例如 oui-app-example)

  1. 拷贝 oui-app-example/vue/app.vue 到 oui-ui-core/vue/src/views/oui-app-example.vue
  2. 进入目录 'oui/oui-ui-core/vue' 然后执行如下命令
	npm install
	npm run serve

如果你想帮助oui 变得更好,请参考 CONTRIBUTING_ZH.md


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK