[WIP] Create Javascript extension resource

Review Request #9547 — Created Jan. 28, 2018 and discarded

Information

Review Board
master

Reviewers

Code drop for Jan 28th meeting:
* Notes and commented out code to allow users to manage Javascript extensions.

Code drop for Feb 4th meeting:
* Added account page for JavaScript extensions with place holder form
* Added stubs for JavaScript extensions resource

Code drop for Feb 11th meeting:
* JS extension form accepts URL and adds to user profile
* JS extension page lists user's extensions

Code drop for Feb 18th meeting:
* First take implementation for JS extension API resource

Code drop for Feb 25th meeting:
* Clean up of JS extension resource
* Created template for testing

Code drop for Mar 4th meeting:
* Finish implementation of GET and POST methods for JS extension list resource

Code drop for Mar 11th meeting:
* Finish implementation of JS extension view
* Attempt to implement GET and DELETE js extension

Code drop for Mar 18th meeting:
* Finish implementing GET and DELETE js extension item resource

Code drop for Mar 25th meeting:
* Testing for js extension list & item resource
* Adding permission checks

Code drop for April 1st:
* Passed all tests for js extension list & item resource
* Attempt to load JS extension information in front-end

Existing tests still working.

Tests for user JavaScript extension list & item resource passing.
- List: GET, POST
- Item: GET, PUT, DELETE

Description From Last Updated

E303 too many blank lines (3)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

F401 'djblets.extensions.manager.ExtensionManager as DjbletsExtensionManager' imported but unused

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E305 expected 2 blank lines after class or function definition, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

F401 'json' imported but unused

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

F401 'reviewboard.extensions.base.ExtensionManager' imported but unused

reviewbotreviewbot

F401 'djblets.extensions.manager.ExtensionManager as DjbletsExtensionManager' imported but unused

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

F401 'djblets.extensions.resources.ExtensionResource as DjbletsExtensionResource' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.decorators.webapi_request_fields' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.base.RBResourceMixin' imported but unused

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

F401 'djblets.extensions.resources.ExtensionResource as DjbletsExtensionResource' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.base.RBResourceMixin' imported but unused

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

F401 'djblets.extensions.resources.ExtensionResource as DjbletsExtensionResource' imported but unused

reviewbotreviewbot

F401 'djblets.util.decorators.augment_method_from' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'reviewboard.webapi.base.RBResourceMixin' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'reviewboard.site.models.LocalSite' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.tests.urls.get_user_js_extension_item_url' imported but unused

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

F401 'djblets.extensions.resources.ExtensionResource as DjbletsExtensionResource' imported but unused

reviewbotreviewbot

F401 'djblets.util.decorators.augment_method_from' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'djblets.webapi.errors.DUPLICATE_ITEM' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.errors.INVALID_FORM_DATA' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'reviewboard.webapi.base.RBResourceMixin' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'reviewboard.site.models.LocalSite' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.tests.urls.get_user_js_extension_item_url' imported but unused

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

F401 'djblets.extensions.resources.ExtensionResource as DjbletsExtensionResource' imported but unused

reviewbotreviewbot

F401 'djblets.util.decorators.augment_method_from' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'djblets.webapi.errors.DUPLICATE_ITEM' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.errors.INVALID_FORM_DATA' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'djblets.webapi.responses.WebAPIResponseError' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'reviewboard.webapi.base.RBResourceMixin' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E201 whitespace after '{'

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

E305 expected 2 blank lines after class or function definition, found 1

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'reviewboard.site.models.LocalSite' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.tests.urls.get_user_js_extension_item_url' imported but unused

reviewbotreviewbot

E303 too many blank lines (4)

reviewbotreviewbot

F841 local variable 'application' is assigned to but never used

reviewbotreviewbot

F401 'reviewboard.webapi.resources.js_extension.JSExtensionResource' imported but unused

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

F401 'djblets.extensions.resources.ExtensionResource as DjbletsExtensionResource' imported but unused

reviewbotreviewbot

F401 'djblets.util.decorators.augment_method_from' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.errors.DUPLICATE_ITEM' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.responses.WebAPIResponseError' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.responses.WebAPIResponsePaginated' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.base.RBResourceMixin' imported but unused

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (92 > 79 characters)

reviewbotreviewbot

E201 whitespace after '{'

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (92 > 79 characters)

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'reviewboard.site.models.LocalSite' imported but unused

reviewbotreviewbot

F401 'djblets.testing.decorators.add_fixtures' imported but unused

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
~  

Code drop for Jan 28th meeting (sorry for the delay).

  ~

Code drop for Jan 28th meeting:

   
~  

Notes and commented out code to allow users to manage Javascript extensions.

  ~
  • Notes and commented out code to allow users to manage Javascript extensions.
  +
  +

Code drop for Feb 3rd meeting:

  +
  +
  • Added account page for JavaScript extensions with place holder form
  +
  • Added stubs for JavaScript extensions resource
Commit:
15dcc7071e72233e78f1a50eab6a851a5364c2e4
7bdc6d9b2804709b6290f5acb1fccb025466b42b

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
~  

Code drop for Jan 28th meeting:

  ~

Code drop for Jan 28th meeting:

  + * Notes and commented out code to allow users to manage Javascript extensions.

   
~  
  • Notes and commented out code to allow users to manage Javascript extensions.
  ~

Code drop for Feb 4th meeting:

  + * Added account page for JavaScript extensions with place holder form
  + * Added stubs for JavaScript extensions resource

   
~  

Code drop for Feb 3rd meeting:

~  
~  
  • Added account page for JavaScript extensions with place holder form
  ~

Code drop for Feb 11th meeting:

  ~ * JS extension form accepts URL and adds to user profile
  ~ * JS extension page lists user's extensions

-  
  • Added stubs for JavaScript extensions resource
Testing Done:
~  

None.

  ~

None. Manual testing

Commit:
7bdc6d9b2804709b6290f5acb1fccb025466b42b
f1bb67e5b940a15558032d97b5bd4382d4b01ecd

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
   

Code drop for Jan 28th meeting:

    * Notes and commented out code to allow users to manage Javascript extensions.

   
   

Code drop for Feb 4th meeting:

    * Added account page for JavaScript extensions with place holder form
    * Added stubs for JavaScript extensions resource

   
   

Code drop for Feb 11th meeting:

    * JS extension form accepts URL and adds to user profile
    * JS extension page lists user's extensions

  +
  +

Code drop for Feb 18th meeting:

  + * First take implementation for JS extension API resource

Commit:
f1bb67e5b940a15558032d97b5bd4382d4b01ecd
389982bb051ea01f6500f9fe5dba936055eadad1

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
   

Code drop for Jan 28th meeting:

    * Notes and commented out code to allow users to manage Javascript extensions.

   
   

Code drop for Feb 4th meeting:

    * Added account page for JavaScript extensions with place holder form
    * Added stubs for JavaScript extensions resource

   
   

Code drop for Feb 11th meeting:

    * JS extension form accepts URL and adds to user profile
    * JS extension page lists user's extensions

   
   

Code drop for Feb 18th meeting:

    * First take implementation for JS extension API resource

  +
  +

Code drop for Feb 25th meeting:

  + * Clean up of JS extension resource
  + * Created template for testing

Testing Done:
~  

None. Manual testing

  ~

Existing tests still working.

  +
  +

Tests for user JavaScript extensions not implemented or do not pass.

Commit:
389982bb051ea01f6500f9fe5dba936055eadad1
6e8c9876da5144f20dde900df410c3e047121a1d

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
~  

Code drop for Jan 28th meeting:

  ~

Code drop for Jan 28th meeting:

    * Notes and commented out code to allow users to manage Javascript extensions.

   
~  

Code drop for Feb 4th meeting:

~   * Added account page for JavaScript extensions with place holder form
  ~

Code drop for Feb 4th meeting:

  ~ * Added account page for JavaScript extensions with place holder form
    * Added stubs for JavaScript extensions resource

   
~  

Code drop for Feb 11th meeting:

~   * JS extension form accepts URL and adds to user profile
  ~

Code drop for Feb 11th meeting:

  ~ * JS extension form accepts URL and adds to user profile
    * JS extension page lists user's extensions

   
~  

Code drop for Feb 18th meeting:

  ~

Code drop for Feb 18th meeting:

    * First take implementation for JS extension API resource

   
~  

Code drop for Feb 25th meeting:

~   * Clean up of JS extension resource
  ~

Code drop for Feb 25th meeting:

  ~ * Clean up of JS extension resource
    * Created template for testing

  +
  +

Code drop for Feb 25th meeting:

  + * Finish implementation of GET and POST methods for JS extension list resource

Commit:
6e8c9876da5144f20dde900df410c3e047121a1d
e08cc0745fd8ea0807d68719d511025aa92f7e96

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
   

Code drop for Jan 28th meeting:

    * Notes and commented out code to allow users to manage Javascript extensions.

   
   

Code drop for Feb 4th meeting:

    * Added account page for JavaScript extensions with place holder form
    * Added stubs for JavaScript extensions resource

   
   

Code drop for Feb 11th meeting:

    * JS extension form accepts URL and adds to user profile
    * JS extension page lists user's extensions

   
   

Code drop for Feb 18th meeting:

    * First take implementation for JS extension API resource

   
   

Code drop for Feb 25th meeting:

    * Clean up of JS extension resource
    * Created template for testing

   
~  

Code drop for Feb 25th meeting:

  ~

Code drop for Mar 4th meeting:

    * Finish implementation of GET and POST methods for JS extension list resource

  +
  +

Code drop for Mar 11th meeting:

  + * Finish implementation of JS extension view
  + * Attempt to implement GET and DELETE js extension

Commit:
e08cc0745fd8ea0807d68719d511025aa92f7e96
07fffb81a73b769d7f9885456769f4cd217bcea3

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
   

Code drop for Jan 28th meeting:

    * Notes and commented out code to allow users to manage Javascript extensions.

   
   

Code drop for Feb 4th meeting:

    * Added account page for JavaScript extensions with place holder form
    * Added stubs for JavaScript extensions resource

   
   

Code drop for Feb 11th meeting:

    * JS extension form accepts URL and adds to user profile
    * JS extension page lists user's extensions

   
   

Code drop for Feb 18th meeting:

    * First take implementation for JS extension API resource

   
   

Code drop for Feb 25th meeting:

    * Clean up of JS extension resource
    * Created template for testing

   
   

Code drop for Mar 4th meeting:

    * Finish implementation of GET and POST methods for JS extension list resource

   
   

Code drop for Mar 11th meeting:

    * Finish implementation of JS extension view
    * Attempt to implement GET and DELETE js extension

  +
  +

Code drop for Mar 18th meeting:

  + * Finish implementing GET and DELETE js extension item resource

Commit:
07fffb81a73b769d7f9885456769f4cd217bcea3
2f267ef1bfabd6df16096ba57e89597af44cd50c

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
Review request changed
Description:
   

Code drop for Jan 28th meeting:

    * Notes and commented out code to allow users to manage Javascript extensions.

   
   

Code drop for Feb 4th meeting:

    * Added account page for JavaScript extensions with place holder form
    * Added stubs for JavaScript extensions resource

   
   

Code drop for Feb 11th meeting:

    * JS extension form accepts URL and adds to user profile
    * JS extension page lists user's extensions

   
   

Code drop for Feb 18th meeting:

    * First take implementation for JS extension API resource

   
   

Code drop for Feb 25th meeting:

    * Clean up of JS extension resource
    * Created template for testing

   
   

Code drop for Mar 4th meeting:

    * Finish implementation of GET and POST methods for JS extension list resource

   
   

Code drop for Mar 11th meeting:

    * Finish implementation of JS extension view
    * Attempt to implement GET and DELETE js extension

   
   

Code drop for Mar 18th meeting:

    * Finish implementing GET and DELETE js extension item resource

  +
  +

Code drop for Mar 25th meeting:

  + * Testing for js extension list & item resource
  + * Adding permission checks

Testing Done:
   

Existing tests still working.

   
~  

Tests for user JavaScript extensions not implemented or do not pass.

  ~

Tests for user JavaScript extension list resource passing

  + Tests for user JavaScript extension item resource not all passing yet

Commit:
2f267ef1bfabd6df16096ba57e89597af44cd50c
aecefe52da92d8a5df3ce8996ba7c4c70cb363e5

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JQ
david
Review request changed
Status:
Discarded