实现机房列表

This commit is contained in:
jysperm
2014-07-30 15:05:09 +08:00
parent fc8aa2c5c7
commit 833abdb8c1
5 changed files with 35 additions and 33 deletions

View File

@@ -26,6 +26,19 @@ module.exports =
transfer: 39
memory: 27
nodes:
us1:
domain: 'us1.rpvhost.net'
location: 'Linode Fremont, CA, USA'
jp1:
domain: 'jp1.rpvhost.net'
location: 'Linode Tokyo, JP'
rp3:
domain: 'rp3.rpvhost.net'
location: 'Linode Fremont, CA, USA'
mongodb:
user: 'rpadmin'
password: 'password'

View File

@@ -38,7 +38,8 @@ exports.get '/pay', requireAuthenticate, renderAccount, (req, res) ->
.toArray callback
, (err, result) ->
res.render 'panel/pay', result
res.render 'panel/pay', _.extend result,
nodes: _.values(config.nodes)
exports.get '/', requireAuthenticate, (req, res) ->
billing.checkBilling req.account, (account) ->

View File

@@ -72,3 +72,14 @@ body {
}
}
}
.progress {
position: relative;
}
.progress span {
position: absolute;
display: block;
width: 100%;
color: black;
}

View File

@@ -27,27 +27,15 @@ block main
th 位置
th.for-sale 用户量
tbody
tr
td
a(href='//jp1.rpvhost.net') jp1.rpvhost.net
td Linode Tokyo, JP
td
.progress
.progress-bar(role='progressbar', aria-valuenow='50', aria-valuemin='0', aria-valuemax='100', style='width: 50%;') 50%
tr
td
a(href='//us1.rpvhost.net') us1.rpvhost.net
td Linode Fremont, CA, USA
td
.progress
.progress-bar(role='progressbar', aria-valuenow='85', aria-valuemin='0', aria-valuemax='100', style='width: 85%;') 85%
tr.warning
td
a(href='//rp3.rpvhost.net') rp3.rpvhost.net (当前)
td Linode Fremont, CA, USA
td
.progress
.progress-bar(role='progressbar', aria-valuenow='10', aria-valuemin='0', aria-valuemax='100', style='width: 10%;') 10%
for node in nodes
tr
td
a(href='//#{node.domain}')= node.domain
td= node.location
td
.progress
.progress-bar(role='progressbar', aria-valuenow='0', aria-valuemin='0', aria-valuemax='100', style='width: 0%;')
span 0%
.row
header 充值记录

View File

@@ -3,14 +3,3 @@ td {
margin-bottom: 0;
}
}
.progress {
position: relative;
}
.progress span {
position: absolute;
display: block;
width: 100%;
color: black;
}