# -*- coding: utf-8 -*-
# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
# (only), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see
%s.' % (update_info_msg)
), ''),
# RhodeCode specific
(_('RhodeCode Version'), val('rhodecode_app')['text'], state('rhodecode_app')),
(_('RhodeCode Server IP'), val('server')['server_ip'], state('server')),
(_('RhodeCode Server ID'), val('server')['server_id'], state('server')),
(_('RhodeCode Configuration'), val('rhodecode_config')['path'], state('rhodecode_config')),
('', '', ''), # spacer
# Database
(_('Database'), val('database')['url'], state('database')),
(_('Database version'), val('database')['version'], state('database')),
('', '', ''), # spacer
# Platform/Python
(_('Platform'), val('platform')['name'], state('platform')),
(_('Platform UUID'), val('platform')['uuid'], state('platform')),
(_('Python version'), val('python')['version'], state('python')),
(_('Python path'), val('python')['executable'], state('python')),
('', '', ''), # spacer
# Systems stats
(_('CPU'), val('cpu'), state('cpu')),
(_('Load'), val('load')['text'], state('load')),
(_('Memory'), val('memory')['text'], state('memory')),
(_('Uptime'), val('uptime')['text'], state('uptime')),
('', '', ''), # spacer
# Repo storage
(_('Storage location'), val('storage')['path'], state('storage')),
(_('Storage info'), val('storage')['text'], state('storage')),
(_('Storage inodes'), val('storage_inodes')['text'], state('storage_inodes')),
(_('Gist storage location'), val('storage_gist')['path'], state('storage_gist')),
(_('Gist storage info'), val('storage_gist')['text'], state('storage_gist')),
(_('Archive cache storage location'), val('storage_archive')['path'], state('storage_archive')),
(_('Archive cache info'), val('storage_archive')['text'], state('storage_archive')),
(_('Temp storage location'), val('storage_temp')['path'], state('storage_temp')),
(_('Temp storage info'), val('storage_temp')['text'], state('storage_temp')),
(_('Search info'), val('search')['text'], state('search')),
(_('Search location'), val('search')['location'], state('search')),
('', '', ''), # spacer
# VCS specific
(_('VCS Backends'), val('vcs_backends'), state('vcs_backends')),
(_('VCS Server'), val('vcs_server')['text'], state('vcs_server')),
(_('GIT'), val('git'), state('git')),
(_('HG'), val('hg'), state('hg')),
(_('SVN'), val('svn'), state('svn')),
]
if snapshot:
if c.allowed_to_snapshot:
c.data_items.pop(0) # remove server info
self.request.override_renderer = 'admin/settings/settings_system_snapshot.mako'
else:
self.request.session.flash(
'You are not allowed to do this', queue='warning')
return {}
@LoginRequired()
@HasPermissionAllDecorator('hg.admin')
@view_config(
route_name='admin_settings_system_update', request_method='GET',
renderer='rhodecode:templates/admin/settings/settings_system_update.mako')
def settings_system_info_check_update(self):
_ = self.request.translate
update_url = self.get_update_url()
_err = lambda s: '