Advertise TFS support in Power Pack
Review Request #7758 — Created Nov. 6, 2015 and submitted
Add support for fake SCMTools entries that Review Board does not
provide, but Power Pack does. These tools are not implemented; they
simply appear in the Tool dropdown in the "Add Repository" form when
Power Pack is not enabled.When a fake tool is selected in the form, an advertisement for Power
Pack is shown and the form becomes unsubmittable. This is to ensure
that users don't end up getting an error when trying to use a tool that
is not actually registered in the database.This patch also moves all of the tool information serialization into
theRepositoryForm
instead of the JS template.
Ran unit tests.
Manually verified the following:
- The form cannot be submitted when a fake tool is selected.
- The Power Pack advertisement shows when a fake tool is selected.
- The fake SCM Tool entries do not appear when Power Pack is installed.
Description | From | Last Updated |
---|---|---|
We usually use "scmtool" all as one piece. |
david | |
This doesn't seem like a useful comparison. |
david | |
Can we set the text before showing? $powerPackToolAdvert .find('.power-pack-advert-missing') .text($tool.find(':selected').text()) .end() .show(); |
david | |
This seems silly and inefficient. These selectors shouldn't match more than one element, right? Let's just do: $repoPathRow.hide(); $repoMirrorPathRow.hide(); $bugTrackerTypeRow.hide(); |
david | |
Same here. |
david | |
Missing period. All comments should be complete sentences. |
chipx86 | |
Can we call this last_tool_pk? |
david | |
Missing trailing comma. |
chipx86 | |
I don't understand the purpose of this variable? Maybe it needs a better name. |
chipx86 | |
We should probably have some sanity checking now that we have things that don't exist in the db. |
david | |
Let's move this to one var statement. |
chipx86 |
-
Tool: Pyflakes Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/static/rb/js/repositoryform.js reviewboard/templates/admin/repository_fields.js Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/static/rb/js/repositoryform.js reviewboard/templates/admin/repository_fields.js
-
Tool: Pyflakes Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/static/rb/js/repositoryform.js reviewboard/templates/admin/repository_fields.js Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/static/rb/js/repositoryform.js reviewboard/templates/admin/repository_fields.js
-
Tool: Pyflakes Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/static/rb/js/repositoryform.js reviewboard/templates/admin/repository_fields.js Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/static/rb/js/repositoryform.js reviewboard/templates/admin/repository_fields.js
-
-
-
-
Can we set the text before showing?
$powerPackToolAdvert .find('.power-pack-advert-missing') .text($tool.find(':selected').text()) .end() .show();
-
This seems silly and inefficient. These selectors shouldn't match more than one element, right? Let's just do:
$repoPathRow.hide(); $repoMirrorPathRow.hide(); $bugTrackerTypeRow.hide();
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/templates/admin/repository_fields.js Tool: Pyflakes Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/templates/admin/repository_fields.js
-
Tool: Pyflakes Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/templates/admin/repository_fields.js Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/fake.py reviewboard/scmtools/forms.py Ignored Files: reviewboard/templates/admin/repository_fields.js