-
Notifications
You must be signed in to change notification settings - Fork 8
Closes #90: Implement branch archiving #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2b16bca
Closes #90: Implement branch archiving
jeremystretch e567ec7
Exclude archived branch from nav dropdown
jeremystretch 6d02f8d
Exclude archived branch from nav dropdown
jeremystretch 67f5036
Fix translation support for branch action messages
jeremystretch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
43 changes: 43 additions & 0 deletions
43
netbox_branching/templates/netbox_branching/branch_archive.html
This file contains hidden or 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,43 @@ | ||
{% extends 'generic/_base.html' %} | ||
{% load form_helpers %} | ||
{% load i18n %} | ||
|
||
{% block title %}{% trans "Archive" %} {{ branch }}{% endblock %} | ||
|
||
{% block tabs %} | ||
<ul class="nav nav-tabs"> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link active" id="action-form-tab" data-bs-toggle="tab" data-bs-target="#action-form" type="button" role="tab" aria-controls="merge-form" aria-selected="true"> | ||
{% trans "Archive" %} | ||
</button> | ||
</li> | ||
</ul> | ||
{% endblock tabs %} | ||
|
||
{% block content %} | ||
{# Form tab #} | ||
<div class="tab-pane show active" id="action-form" role="tabpanel" aria-labelledby="action-form-tab"> | ||
<form action="" method="post" enctype="multipart/form-data"> | ||
{% csrf_token %} | ||
<div class="row"> | ||
<div class="col col-6 offset-3"> | ||
<div class="alert alert-danger"> | ||
<i class="mdi mdi-alert-circle"></i> | ||
{% blocktrans %} | ||
Are you sure you want to archive the branch {{ branch }}? This will permanently deprovision | ||
its database schema, and it will no longer be possible to automatically rever the branch. | ||
{% endblocktrans %} | ||
</div> | ||
{% render_field form.confirm %} | ||
<div class="col offset-3 my-3"> | ||
<a href="{{ branch.get_absolute_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a> | ||
<button type="submit" name="_update" class="btn btn-primary"> | ||
{% trans "Archive" %} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{# /Form tab #} | ||
{% endblock content %} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.