This repository has been archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
263 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/AppContext/Infrastructure/Symfony/Bundle/AppBundle/Resources/config/twig.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
regis.twig_extension.date: | ||
class: Regis\AppContext\Infrastructure\Symfony\Twig\DurationExtension | ||
public: false | ||
tags: | ||
- { name: twig.extension } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...Symfony/Bundle/AppBundle/Resources/views/Repositories/_flight_mode_notification.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="alert alert-warning" role="alert"> | ||
<p> | ||
<b>This repository is in flight mode.</b> | ||
</p> | ||
|
||
<p> | ||
Pull requests will still be inspected and the results will be available | ||
using this interface but Regis will not send any comment to {{ repository.type }}.<br /> | ||
Usually, this mode is useful during the set-up phase and can be dismissed | ||
after: it allows to configure Regis without bothering your teammates | ||
with CI failures caused by a misconfiguration. | ||
</p> | ||
|
||
{% if is_granted('COMMAND_REPOSITORY::DISABLE_FLIGHT_MODE', repository) %} | ||
<p> | ||
<form method="POST" action="{{ path('repositories_disable_flight_mode', {'id': repository.id}) }}" class="force-inline"> | ||
<input type="submit" class="btn btn-warning btn-sm" value="Disable flight mode" /> | ||
</form> | ||
</p> | ||
{% endif %} | ||
</div> |
65 changes: 65 additions & 0 deletions
65
...rastructure/Symfony/Bundle/AppBundle/Resources/views/Repositories/configuration.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% extends '::layout.html.twig' %} | ||
|
||
{% import '::utils.html.twig' as utils %} | ||
|
||
{% block content %} | ||
<h1 class="page-header">« {{ repository.name }} »</h1> | ||
|
||
{% if repository.flightModeEnabled %} | ||
{% include 'RegisAppBundle:Repositories:_flight_mode_notification.html.twig' %} | ||
{% endif %} | ||
|
||
<h2>Configuration</h2> | ||
|
||
<div class="table-responsive"> | ||
<table class="table table-striped table-hover"> | ||
<tr> | ||
<th>Type</th> | ||
<td><span class="label label-primary">{{ utils.repository_type(repository) }}</span></td> | ||
</tr> | ||
<tr> | ||
<th>Remote identifier</th> | ||
<td><code>{{ repository.identifier }}</code></td> | ||
</tr> | ||
<tr> | ||
<th>Shared secret</th> | ||
<td><code>{{ repository.sharedSecret }}</code></td> | ||
</tr> | ||
<tr> | ||
<th>Webhook URL</th> | ||
<td><code>{{ url(repository.type~'_webhook') }}</code></td> | ||
</tr> | ||
<tr> | ||
<th>Actions</th> | ||
<td> | ||
<form method="POST" action="{{ path('repositories_setup_webhook', {'id': repository.id}) }}" class="force-inline"> | ||
<input type="submit" class="btn btn-warning btn-sm" value="Setup webhook" /> | ||
</form> | ||
{% if is_granted('COMMAND_REPOSITORY::ENABLE_INSPECTIONS', repository) or is_granted('COMMAND_REPOSITORY::DISABLE_INSPECTIONS', repository) %} | ||
{% if repository.inspectionEnabled %} | ||
<form method="POST" action="{{ path('repositories_disable_inspections', {'id': repository.id}) }}" class="force-inline"> | ||
<input type="submit" class="btn btn-warning btn-sm" value="Disable inspections" /> | ||
</form> | ||
{% else %} | ||
<form method="POST" action="{{ path('repositories_enable_inspections', {'id': repository.id}) }}" class="force-inline"> | ||
<input type="submit" class="btn btn-primary btn-sm" value="Enable inspections" /> | ||
</form> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if is_granted('COMMAND_REPOSITORY::ENABLE_FLIGHT_MODE', repository) or is_granted('COMMAND_REPOSITORY::DISABLE_FLIGHT_MODE', repository) %} | ||
{% if repository.flightModeEnabled %} | ||
<form method="POST" action="{{ path('repositories_disable_flight_mode', {'id': repository.id}) }}" class="force-inline"> | ||
<input type="submit" class="btn btn-warning btn-sm" value="Disable flight mode" /> | ||
</form> | ||
{% else %} | ||
<form method="POST" action="{{ path('repositories_enable_flight_mode', {'id': repository.id}) }}" class="force-inline"> | ||
<input type="submit" class="btn btn-primary btn-sm" value="Enable flight mode" /> | ||
</form> | ||
{% endif %} | ||
{% endif %} | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.