#!/usr/bin/env python
"""
Copyright European Organization for Nuclear Research (CERN)
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Authors:
- Thomas Beermann, <thomas.beermann@cern.ch>, 2014-2017
- Mario Lassnig, <mario.lassnig@cern.ch>, 2014-2015
- Martin Barisits, <martin.barisits@cern.ch>, 2014
- Ralph Vigne <ralph.vigne@cern.ch>, 2015
- Cedric Serfon <cedric.serfon@cern.ch>, 2015-2017
"""
from os.path import dirname, join
from web import application, header, input as param_input, seeother, template
from rucio.common.config import config_get
from rucio.common.utils import generate_http_error
from rucio.web.ui.common.utils import check_token, get_token
COMMON_URLS = (
'/account_rse_usage', 'AccountRSEUsage',
'/account', 'Account',
'/auth', 'Auth',
'/bad_replicas', 'BadReplicas',
'/suspicious_replicas', 'SuspiciousReplicas',
'/bad_replicas/summary', 'BadReplicasSummary',
'/did', 'DID',
'/heartbeats', 'Heartbeats',
'/lifetime_exception', 'LifetimeException',
'/list_accounts', 'ListAccounts',
'/list_rules', 'ListRulesRedirect',
'/r2d2/approve', 'ApproveRules',
'/r2d2/request', 'RequestRule',
'/r2d2/manage_quota', 'RSEAccountUsage',
'/r2d2', 'ListRules',
'/rse_usage', 'RSEUsage',
'/rse_locks', 'RSELocks',
'/rule', 'Rule',
'/rules', 'Rules',
'/request_rule', 'RequestRuleRedirect',
'/search', 'Search',
'/subscriptions/rules', 'SubscriptionRules',
'/subscription', 'Subscription',
'/subscriptions', 'Subscriptions',
'/subscriptions_editor', 'SubscriptionsEditor'
)
POLICY = config_get('permission', 'policy')
ATLAS_URLS = ()
OTHER_URLS = ()
if POLICY == 'atlas':
ATLAS_URLS = (
'/', 'AtlasIndex',
'/account_usage', 'AccountUsage',
'/dumps', 'Dumps',
'/accounting', 'Accounting',
'/conditions_summary', 'Cond',
'/dbrelease_summary', 'DBRelease',
'/infrastructure', 'Infrastructure',
'/rule_backlog_monitor', 'BacklogMon'
)
else:
OTHER_URLS = (
'/', 'Index'
)
class Account(object):
""" Account info page """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.account())
class AccountUsage(object):
""" Group Account Usage overview """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.account_usage())
class AccountRSEUsage(object):
""" RSE usage per account """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.account_rse_usage())
class ApproveRules(object):
""" R2D2 rule approval overview """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.approve_rules())
class AtlasIndex(object):
""" Main page """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.atlas_index())
class Auth(object):
""" Local Auth Proxy """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
token = get_token()
if token:
header('X-Rucio-Auth-Token', token)
return str()
else:
raise generate_http_error(401, 'CannotAuthenticate', 'Cannot get token')
class Accounting(object):
""" Accounting """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.accounting())
class BadReplicas(object):
""" Bad replica monitoring """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.bad_replicas())
class SuspiciousReplicas(object):
""" AccountUsage """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.suspicious_replicas())
class BadReplicasSummary(object):
""" Bad replica overview """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.bad_replicas_summary())
class BacklogMon(object):
""" Rule Backlog Monitor """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.backlog_mon())
class Cond(object):
""" Condition DB overview """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.cond())
class DID(object):
""" DID detail page """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.did())
class DBRelease(object):
""" DB release overview """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.dbrelease())
class Dumps(object):
""" Description page for dumps """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.dumps())
class Heartbeats(object):
""" Heartbeat monitoring """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.heartbeats())
class LifetimeException():
""" For to request lifetime exception """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.lifetime_exception())
class ListAccounts(object):
""" Account list """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.accounts())
class ListRules(object):
""" R2D2 rules list """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.list_rules())
class ListRulesRedirect(object):
""" R2D2 redirect from old url """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
params = param_input()
url = '/r2d2?'
for key, value in params.items():
url += key + '=' + value + '&'
seeother(url[:-1])
class Rule(object):
""" Rule details page """
def GET(self): # pylint:disable=no-self-use,invalid-name
""" GET """
render = template.render(join(dirname(__file__), 'templates/'))
return check_token(render.rule())
class RequestRule(object):
""" R2D2 request page """
def GET(self): #
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | rucio-webui-1.14.7.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 10 浏览量
2022-01-16
00:07:19
上传
评论
收藏 431KB GZ 举报
温馨提示
共131个文件
js:51个
html:42个
py:9个
资源来自pypi官网。 资源全名:rucio-webui-1.14.7.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | rucio-webui-1.14.7.tar.gz (131个子文件)
AUTHORS 2KB
setup.cfg 1014B
ChangeLog 273B
foundation-icons.css 19KB
chosen.css 13KB
chosen.min.css 11KB
multiple-select.css 4KB
multiple-select2.css 2KB
rucio.css 2KB
http_monitoring.css 859B
foundation-icons.eot 53KB
spinner.gif 31KB
request_rule.html 16KB
http_monitoring_account_details.html 11KB
base.html 8KB
http_monitoring_scriptid_details.html 7KB
list_rules.html 6KB
http_api_usage.html 6KB
subscriptions_editor.html 5KB
http_monitoring_index.html 5KB
dumps.html 5KB
http_monitoring_apiclass_details.html 4KB
http_monitoring_accounts.html 4KB
account.html 4KB
http_monitoring_apiclasses.html 3KB
http_monitoring_resources.html 3KB
http_monitoring_scriptids.html 3KB
approve_rules.html 3KB
lifetime_exception.html 3KB
backlog_mon.html 3KB
dbrelease.html 3KB
cond.html 2KB
rse_account_usage.html 2KB
bad_replicas_summary.html 2KB
search.html 2KB
rules.html 2KB
account_usage.html 2KB
infrastructure.html 2KB
subscriptions.html 1KB
rse_locks.html 1KB
rse_usage.html 1KB
rule.html 1KB
did.html 1KB
heartbeats.html 1KB
suspicious_replicas.html 1KB
bad_replicas.html 1KB
subscription.html 953B
accounts.html 886B
account_rse_usage.html 885B
subscriptionrules.html 863B
problem.html 756B
accounting.html 749B
atlas_index.html 519B
index.html 471B
favicon.ico 1KB
MANIFEST.in 432B
error.jpg 83KB
rucio.js 51KB
request_rule.js 49KB
chosen.proto.js 44KB
chosen.jquery.js 44KB
chosen.proto.min.js 28KB
chosen.jquery.min.js 28KB
jquery.multiple.select.js 23KB
rse_account_usage.js 21KB
rule.js 21KB
jquery.multiple.select2.js 20KB
did.js 19KB
backlog_mon.js 15KB
subscriptions_editor.js 14KB
list_rules.js 13KB
http_monitoring_account_details.js 12KB
lifetime_exception.js 12KB
approve_rules.js 11KB
account_usage.js 11KB
rse_usage.js 11KB
bad_replicas_summary.js 10KB
http_monitoring_utils.js 10KB
http_monitoring_scriptid_details.js 9KB
subscription.js 7KB
jquery.storageapi.min.js 7KB
account.js 7KB
rse_locks.js 6KB
search.js 6KB
base.js 6KB
dbrelease.js 6KB
cond.js 6KB
http_monitoring_apiclass_details.js 5KB
subscriptions.js 5KB
accounting.js 5KB
jquery.quicksearch.js 4KB
http_monitoring_apiclasses.js 4KB
account_rse_usage.js 4KB
http_monitoring_index.js 3KB
http_monitoring_accounts.js 3KB
http_monitoring_scriptids.js 3KB
http_monitoring_resources.js 3KB
subscriptionrules.js 3KB
atlas_index.js 2KB
filesize.min.js 1KB
共 131 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功