hackplan / rootpanel Goto Github PK
View Code? Open in Web Editor NEWA pluggable PaaS service development framework.
Home Page: http://rootpanel.io/docs/
License: GNU Affero General Public License v3.0
A pluggable PaaS service development framework.
Home Page: http://rootpanel.io/docs/
License: GNU Affero General Public License v3.0
目录在 /WIKI, 里面就是 .md 文件,以后会被显示在官网上。
不爱写代码了,可以来写写面向用户的使用手册。
页面(3 个):
登录后是一个主面板,类似 RP2 现在的面板。
左面是导航条,右面是主体区域,具体有什么内容要取决于插件,这部分我们在插件系统中再讨论。
登录后,顶部导航条会显示用户名,和提醒(其实就是工单)数量,这个和 RP2 现在的情况也是差不多的。
数据库中的每条用户数据大致是这样的。
首先基本信息:
验证相关的信息:
插件化相关的信息:
groups 即用户所属的组,这个组可以是管理员,或者付费用户,或者试用用户等等。
settings 主要是由用户输入的一些个性化信息,如联系方式,默认语言等。
attribute 是用户的一些其他属性,如是否启用了某个服务。
密码散列算法会使用一个和 RP2 不兼容的算法:
sha256(sha256(passwd) + passwd_salt)
其中 passwd_salt 是一个 256 bit 的 Hex 随机数,这个算法是我前两天调研的,最简单也最安全的用户密码储存方案。
tokens.token 也是一个 256 bit 的Hex 随机数,tokens.available 记录了这个 Token 是否可用,tokens.attribute 里会储存一些额外信息,例如 IP 和 UA.
总结一下剩余的工作:
i18next 连多个资源文件都不支持
update ticket
{
"id": "525284cc2cebb6d0008b4567",
// optional
"type": "linux",
// optional
"status": "closed",
// only for admin group user
"attribute": {
"public": true
},
"members": {
// add a user
"525284cc2cebb6d0008b4567": true,
// remove a user
"4cc2cebb6d5254567280008b": false
}
}
添加删除成员是不是这样好点
members: {
add: ['525284cc2cebb6d0008b4567', '525284cc2cebb6d0008b4567'],
remove: ['525284cc2cebb6d0008b4567','525284cc2cebb6d0008b4567']
}
包括:
例如:
user.attributes.name = 'foo'
user.save() //无效
user.set('name','foo')
user.save() //有效
完成的工作:
正在进行的工作:
下一步工作:
考虑到表单在提交前需要检查,提交后需要错误处理。而且很多表单项目会是 JSON 格式的,所以打算所有表单都用 JS 重新处理再用 XHR 发给后端。请求和响应都使用 application/json
格式。
已完成的工作:
正在进行:
下一步工作:
以后每周都会有进度总结。
已完成的工作:
正在进行:
下一步工作:
完成的工作:
下一步:
/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:245
throw message;
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:691:11)
at ServerResponse.res.setHeader (/Users/Yudong/github/RootPanel/node_modules/connect/lib/patch.js:63:22)
at ServerResponse.res.set.res.header (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:524:10)
at ServerResponse.res.location (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:636:8)
at ServerResponse.res.redirect (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:677:8)
at /Users/Yudong/github/RootPanel/core/api/panel.js:13:22
at /Users/Yudong/github/RootPanel/core/model/account.js:99:14
at /Users/Yudong/github/RootPanel/core/db.js:55:14
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/collection/query.js:156:5
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:744:35
/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:245
throw message;
^
Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/Users/Yudong/github/RootPanel/node_modules/mongodb/node_modules/bson/lib/bson/objectid.js:35:11)
at Object.exports.ObjectID (/Users/Yudong/github/RootPanel/core/db.js:33:10)
at Object.that.findId (/Users/Yudong/github/RootPanel/core/db.js:60:20)
at /Users/Yudong/github/RootPanel/core/api/ticket.js:138:24
at /Users/Yudong/github/RootPanel/core/db.js:55:14
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/collection/query.js:156:5
at Cursor.nextObject (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:739:5)
at commandHandler (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:713:14)
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/db.js:1843:9
at Server.Base._callHandler (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:445:41)
已完成的工作:
正在进行:
下一步工作:
用 gulp 还是直接用 make?
准备最近一周搞一台 VPS, 专用于测试。
/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:245
throw message;
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:691:11)
at ServerResponse.res.setHeader (/Users/Yudong/github/RootPanel/node_modules/connect/lib/patch.js:63:22)
at ServerResponse.res.set.res.header (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:524:10)
at ServerResponse.res.location (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:636:8)
at ServerResponse.res.redirect (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:677:8)
at /Users/Yudong/github/RootPanel/core/api/panel.js:13:22
at /Users/Yudong/github/RootPanel/core/model/account.js:99:14
at /Users/Yudong/github/RootPanel/core/db.js:55:14
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/collection/query.js:156:5
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:744:35
刚装个issue客户端。。
其他工作:
@jysperm RP2 作者,RP 主机维护者,RP3 牵头人。对前端 JS 了解较少,审美观畸形,除此之外可以完成其他所有工作。预定负责和 Linux 系统服务联系较为紧密的部分,即各『服务插件』。
@lyd600lty 主动参加,前后端 JS 都能写。不情愿写 UI 以及设计 UI.
@sxd1140 主动参加,可以写 Node, 对 Linux 系统服务不太了解。
@oranzhang 著名设计师,擅长前端,时间不多,被强拉来的。
@RicterZ Python 独立开发者,Web 安全牛,写过前端,初学 Node。被强拉来的,时间不多。
描述不准确大家可以补充。
TypeError: /Users/Yudong/github/RootPanel/core/view/panel.jade:31
29| table.table.table-hover
30| tbody
> 31| for plan in plans
32| tr
33| td= plan.t_name
34| td= plan.t_service
Cannot read property 'length' of undefined
at jade_debug.unshift.lineno (eval at <anonymous> (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:172:8), <anonymous>:310:31)
at eval (eval at <anonymous> (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:172:8), <anonymous>:449:4)
at eval (eval at <anonymous> (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:172:8), <anonymous>:512:21)
at res (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:173:38)
at Object.exports.render (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:269:10)
at Object.exports.renderFile (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:305:18)
at View.exports.renderFile [as engine] (/Users/Yudong/github/RootPanel/node_modules/jade/lib/jade.js:290:21)
at View.render (/Users/Yudong/github/RootPanel/node_modules/express/lib/view.js:76:8)
at Function.app.render (/Users/Yudong/github/RootPanel/node_modules/express/lib/application.js:502:10)
at ServerResponse.res.render (/Users/Yudong/github/RootPanel/node_modules/express/lib/response.js:779:7)
GET /panel/ 500 310ms - 1.43kb
而不仅限那几个目录
数据库驱动打算用 mongous, 然后第一步是调研怎么写 Model...
还有 mongoose 这东西似乎是用来写 Model 的,总之和 mongous 的关系很乱套。
UI 上,你不想写我可以写,反正就是 bootstrap 嘛,色调继续蓝色调,知乎蓝。
工单就是用户和管理员沟通的主要途径,相比于 RP2, RP3 计划实现这些功能:
RP2 的工单类型一直都是个摆设,我本来打算根据工单类型,会在工单页面上显示最常见的问题 FAQ 的。
和之前一样,在 RP3 里所有通知都体现为工单,顶部导航条的右边会显示当前开放中的工单数量。和之前一样,工单是有邮件提醒的。
工单的类型,也算是处理流程,和之前也差不多:
根据我使用 RP2 的体验,应该增加一个 15 天后自动关闭工单的功能。
那前端就还是不用框架了,就jquery+少量插件了
填写内容并且创建回复后
Cannot POST /ticket/view/?id=IDIDIDIDIDIDIDDIDIDIDID
目前工单的排序顺序是创建时间晚的在下面,建议反过来。
完成的工作:
正在进行:
下一步工作:
完成的工作:
正在进行的工作:
下一步工作:
[app.coffee-0 (err) 2014-03-17T12:54:16] ReferenceError: callback is not defined
[app.coffee-0 (err) 2014-03-17T12:54:16] at /root/RootPanel/core/model/Account.coffee:94:16
[app.coffee-0 (err) 2014-03-17T12:54:16] at /root/RootPanel/core/model/Account.coffee:83:7
[app.coffee-0 (err) 2014-03-17T12:54:16] at /root/RootPanel/core/model/Model.coffee:53:9
[app.coffee-0 (err) 2014-03-17T12:54:16] at args.(anonymous function) (/root/RootPanel/core/model/Model.coffee:13:5)
[app.coffee-0 (err) 2014-03-17T12:54:16] at /root/RootPanel/node_modules/mongodb/lib/mongodb/collection/query.js:147:5
[app.coffee-0 (err) 2014-03-17T12:54:16] at Cursor.nextObject (/root/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:733:5)
[app.coffee-0 (err) 2014-03-17T12:54:16] at commandHandler (/root/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:713:14)
[app.coffee-0 (err) 2014-03-17T12:54:16] at /root/RootPanel/node_modules/mongodb/lib/mongodb/db.js:1806:9
[app.coffee-0 (err) 2014-03-17T12:54:16] at Server.Base._callHandler (/root/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:442:41)
[app.coffee-0 (err) 2014-03-17T12:54:16] at /root/RootPanel/node_modules/mongodb/lib/mongodb/connection/server.js:485:18
[app.coffee-0 (err) 2014-03-17T12:54:16] at [object Object].MongoReply.parseBody (/root/RootPanel/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
[app.coffee-0 (err) 2014-03-17T12:54:16] at [object Object].<anonymous> (/root/RootPanel/node_modules/mongodb/lib/mongodb/connection/server.js:443:20)
[app.coffee-0 (err) 2014-03-17T12:54:16] at [object Object].EventEmitter.emit (events.js:95:17)
[app.coffee-0 (err) 2014-03-17T12:54:16] at [object Object].<anonymous> (/root/RootPanel/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
[app.coffee-0 (err) 2014-03-17T12:54:16] at [object Object].EventEmitter.emit (events.js:98:17)
[app.coffee-0 (err) 2014-03-17T12:54:16] at Socket.<anonymous> (/root/RootPanel/node_modules/mongodb/lib/mongodb/connection/connection.js:418:22)
[app.coffee-0 (err) 2014-03-17T12:54:16] at Socket.EventEmitter.emit (events.js:95:17)
[app.coffee-0 (err) 2014-03-17T12:54:16] at Socket.<anonymous> (_stream_readable.js:746:14)
[app.coffee-0 (err) 2014-03-17T12:54:16] at Socket.EventEmitter.emit (events.js:92:17)
[app.coffee-0 (err) 2014-03-17T12:54:16] at emitReadable_ (_stream_readable.js:408:10)
[app.coffee-0 (err) 2014-03-17T12:54:16] at emitReadable (_stream_readable.js:404:5)
[app.coffee-0 (err) 2014-03-17T12:54:16] at readableAddChunk (_stream_readable.js:165:9)
[app.coffee-0 (err) 2014-03-17T12:54:16] at Socket.Readable.push (_stream_readable.js:127:10)
[app.coffee-0 (err) 2014-03-17T12:54:16] at TCP.onread (net.js:528:21)
这个是 POST /account/login/ 的时候的。
现在的工单页面怎么看怎么丑呢。
已完成的工作:
正在进行:
下一步工作:
/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:245
throw message;
^
TypeError: Cannot read property 'map' of undefined
at _map (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:54:16)
at _asyncMap (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:237:15)
at Object.map (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:219:23)
at async.map.widgets (/Users/Yudong/github/RootPanel/core/api/panel.js:42:26)
at /Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:249:17
at /Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:125:13
at Array.forEach (native)
at _each (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:46:24)
at async.each (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:124:9)
at _asyncMap (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:248:13)
at Object.map (/Users/Yudong/github/RootPanel/node_modules/async/lib/async.js:219:23)
at /Users/Yudong/github/RootPanel/core/api/panel.js:39:24
at Object.exports.checkBilling (/Users/Yudong/github/RootPanel/core/billing.js:13:14)
at module.exports.get./panel/ (/Users/Yudong/github/RootPanel/core/api/panel.js:26:24)
at /Users/Yudong/github/RootPanel/core/api/index.js:69:14
at /Users/Yudong/github/RootPanel/core/api/index.js:59:16
at /Users/Yudong/github/RootPanel/core/db.js:63:16
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/collection/query.js:159:5
at Cursor.nextObject (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:742:5)
at commandHandler (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/cursor.js:716:14)
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/db.js:1846:9
at Server.Base._callHandler (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/base.js:445:41)
at /Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/server.js:468:18
at [object Object].MongoReply.parseBody (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at [object Object].<anonymous> (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/server.js:426:20)
at [object Object].EventEmitter.emit (events.js:95:17)
at [object Object].<anonymous> (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:201:13)
at [object Object].EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/Users/Yudong/github/RootPanel/node_modules/mongodb/lib/mongodb/connection/connection.js:422:22)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:526:21)
make: *** [run] Error 8
RootPanel 支持在配置文件里设置多套餐,每个套餐可以选择要开放的服务,以及每个服务的资源限额,以及价格。
每个用户同时只能属于一个套餐。
充值到账户里,数据库里储存的是金额,但显示的是按照当前套餐,可以维持的剩余天数。
充值每次可以充任意金额,单次达到 19 元(以前的季付价格), 给予 20% 的折扣(原季付折扣).
完成的工作:
正在进行的工作:
下一步工作:
完成的工作:
下一步工作:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.