Skip to content

Commit

Permalink
www: Rename IndexResourceReact to IndexResource
Browse files Browse the repository at this point in the history
  • Loading branch information
p12tic committed Jul 7, 2024
1 parent 976bf48 commit 512cafb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions master/buildbot/test/unit/www/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_render(self):
self.assertEqual(res, exp)


class IndexResourceReactTest(TestReactorMixin, www.WwwTestMixin, unittest.TestCase):
class IndexResourceTest(TestReactorMixin, www.WwwTestMixin, unittest.TestCase):
def setUp(self):
self.setup_test_reactor()

Expand Down Expand Up @@ -135,10 +135,10 @@ def test_render(self, name, user_info, expected_user):
if user_info is not None:
master.session.user_info = user_info

# IndexResourceReact only uses static path to get index.html. In the source checkout
# IndexResource only uses static path to get index.html. In the source checkout
# index.html resides not in www/base/public but in www/base. Thus
# base path is sent to IndexResourceReact.
rsrc = config.IndexResourceReact(master, self.get_react_base_path())
# base path is sent to IndexResource.
rsrc = config.IndexResource(master, self.get_react_base_path())
rsrc.reconfigResource(master.config)

vjson = [list(v) for v in config.get_environment_versions()] + custom_versions
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/www/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def do_render(self, request):
)


class IndexResourceReact(resource.Resource):
class IndexResource(resource.Resource):
# enable reconfigResource calls
needsReconfig = True

Expand Down
4 changes: 1 addition & 3 deletions master/buildbot/www/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,7 @@ def setupSite(self, new_config):
# /
root.putChild(
b'',
wwwconfig.IndexResourceReact(
self.master, self.apps.get(self.base_plugin_name).static_dir
),
wwwconfig.IndexResource(self.master, self.apps.get(self.base_plugin_name).static_dir),
)

# /auth
Expand Down

0 comments on commit 512cafb

Please sign in to comment.