-
Notifications
You must be signed in to change notification settings - Fork 12
Bulk interface update #433
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
Open
church29
wants to merge
51
commits into
OSU-Net:master
Choose a base branch
from
church29:Batch_Update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
506808b
Initial js for batch update
church29 55bffaf
Setup js to sent post data to batch_update
church29 f3c072b
Implemented updating range for dynamic interfaces
church29 cd50ea2
Fixed comment in js, added make
church29 7dc4d62
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 b5a4315
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 79f10c2
Dont display bulk update form if not objects in ctnr
church29 475b0c8
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 138be46
Added range type selector for batch update form
church29 971c0db
range_type now submits along with the form through ajax
church29 18e329a
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 3009ab1
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 c4a6ca4
Update batch_update to handle range_type not being selected
church29 8f95e46
Merge branch 'Batch_Update' of https://github.com/church29/cyder into…
church29 1366a6c
Can now filter ranges by type
church29 0d4928d
Added url for get_ranges
church29 7781b05
Refactor interface/views
church29 99c34de
Can now migrate static interfaces between static ranges
church29 ee42993
Added site to batch update form
church29 1416495
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 79aca71
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 17ecf4d
A little refactoring to make batch update more robust
church29 a3b2c69
Fixed batch update not working if site is not selected
church29 fc05351
Can now migrate static interfaces to dynamic interfaces
church29 30dfdcd
can now migrate from dynamic interfaces to static interfaces
church29 96f9a4a
Fixed issue with interfaces being assigned the same ip and not valida…
church29 36ed24f
Slight adjustment to batch update form logic
church29 eff5007
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 46bf81e
Updates after merge
church29 005da6b
More fixes after merge
church29 937a73e
refactored batch_update
church29 6031a13
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 7ac59f0
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 21286c1
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 95d9011
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 a28ec9c
Fix issue with enable batch update mode not showing up on interface l…
church29 580099a
Fix issue with retrieving model
church29 4dc808b
Handle issues with get_model
church29 3c48c91
Merge branch 'master' of https://github.com/OSU-Net/cyder into Batch_…
church29 f7e16ee
Fix error due to missing endif tag
church29 2e609e6
Minor bug fixes
church29 7fdeb9f
Light formatting
church29 8832fad
Remove accidentally added imgs
church29 bbe4840
Use already created get_ranges
church29 53144e5
Progress on refactoring batch_update
church29 fc43158
Fix args for batch_update sub functions
church29 696f7cc
Switch from .post to .ajax
church29 225ec4f
Dont manually call full clean
church29 2564b20
Styling for select all checkbox
church29 b0a7fda
Add exit batch update mode link and remove enable checkbox
church29 25ec99d
Increase size of checkboxes in batch-update table
church29 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| from django import forms | ||
|
|
||
| from cyder.cydhcp.range.models import Range | ||
| from cyder.base.mixins import UsabilityFormMixin | ||
|
|
||
|
|
||
| class BatchInterfaceForm(forms.Form, UsabilityFormMixin): | ||
| range_type = forms.ChoiceField( | ||
| widget=forms.RadioSelect, | ||
| choices=(('static', 'Static'), ('dynamic', 'Dynamic'))) | ||
| range = forms.ModelChoiceField(queryset=Range.objects.all()) |
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 |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| from django.conf.urls.defaults import patterns, url | ||
|
|
||
| from cyder.cydhcp.interface.views import is_last_interface | ||
| from cyder.cydhcp.interface.views import batch_update, batch_update_get_ranges | ||
|
|
||
| urlpatterns = patterns( | ||
| '', | ||
| url(r'^last_interface/', is_last_interface, name='is_last_interface'), | ||
| url(r'^batch_update/', batch_update, name='batch_update'), | ||
| url(r'^batch_update_get_ranges/', batch_update_get_ranges, | ||
| name='batch_update_get_ranges'), | ||
| ) |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might consider rolling back the transaction here instead of manually deleting things. If not, you need to at least handle
ValidationErrors, although I'm not sure how that would work.