repo-automation: added placeholder for EE feature.
This commit is contained in:
parent
af03d78bbf
commit
94b11ccc20
6 changed files with 64 additions and 0 deletions
|
|
@ -421,6 +421,11 @@ def includeme(config):
|
|||
name='repo_default_reviewers_data',
|
||||
pattern='/{repo_name:.*?[^/]}/settings/review/default-reviewers', repo_route=True)
|
||||
|
||||
# Repo Automation (EE feature)
|
||||
config.add_route(
|
||||
name='repo_automation',
|
||||
pattern='/{repo_name:.*?[^/]}/settings/automation', repo_route=True)
|
||||
|
||||
# Strip
|
||||
config.add_route(
|
||||
name='edit_repo_strip',
|
||||
|
|
|
|||
46
rhodecode/apps/repository/views/repo_automation.py
Normal file
46
rhodecode/apps/repository/views/repo_automation.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2016-2018 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This program is dual-licensed. If you wish to learn more about the
|
||||
# RhodeCode Enterprise Edition, including its added features, Support services,
|
||||
# and proprietary license terms, please see https://rhodecode.com/licenses/
|
||||
|
||||
import logging
|
||||
|
||||
from pyramid.view import view_config
|
||||
|
||||
from rhodecode.apps._base import RepoAppView
|
||||
from rhodecode.apps.repository.utils import get_default_reviewers_data
|
||||
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RepoAutomationView(RepoAppView):
|
||||
def load_default_context(self):
|
||||
c = self._get_local_tmpl_context()
|
||||
return c
|
||||
|
||||
@LoginRequired()
|
||||
@HasRepoPermissionAnyDecorator('repository.admin')
|
||||
@view_config(
|
||||
route_name='repo_automation', request_method='GET',
|
||||
renderer='rhodecode:templates/admin/repos/repo_edit.mako')
|
||||
def repo_automation(self):
|
||||
c = self.load_default_context()
|
||||
c.active = 'automation'
|
||||
|
||||
return self._get_template_context(c)
|
||||
BIN
rhodecode/public/images/ee_features/repo_automation.png
Normal file
BIN
rhodecode/public/images/ee_features/repo_automation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
|
|
@ -244,6 +244,7 @@ function registerRCRoutes() {
|
|||
pyroutes.register('edit_repo_vcs_svn_pattern_delete', '/%(repo_name)s/settings/vcs/svn_pattern/delete', ['repo_name']);
|
||||
pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']);
|
||||
pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']);
|
||||
pyroutes.register('repo_automation', '/%(repo_name)s/settings/automation', ['repo_name']);
|
||||
pyroutes.register('edit_repo_strip', '/%(repo_name)s/settings/strip', ['repo_name']);
|
||||
pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']);
|
||||
pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']);
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@
|
|||
<a href="${h.route_path('repo_reviewers', repo_name=c.repo_name)}">${_('Reviewer Rules')}</a>
|
||||
</li>
|
||||
%endif
|
||||
<li class="${'active' if c.active=='automation' else ''}">
|
||||
<a href="${h.route_path('repo_automation', repo_name=c.repo_name)}">${_('Automation')}</a>
|
||||
</li>
|
||||
<li class="${'active' if c.active=='maintenance' else ''}">
|
||||
<a href="${h.route_path('edit_repo_maintenance', repo_name=c.repo_name)}">${_('Maintenance')}</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">${_('Repo Automation')}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h4>${_('This feature is available in RhodeCode EE edition only. Contact {sales_email} to obtain a trial license.').format(sales_email='<a href="mailto:sales@rhodecode.com">sales@rhodecode.com</a>')|n}</h4>
|
||||
<img style="width: 100%; height: 100%" src="${h.asset('images/ee_features/repo_automation.png')}"/>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue