Skip to content

Commit

Permalink
Merge pull request #7287 from mokibit/remove-angularJS
Browse files Browse the repository at this point in the history
www: Remove AngularJS web frontend
  • Loading branch information
p12tic committed Dec 20, 2023
2 parents 0f96401 + 28fe9e1 commit f780111
Show file tree
Hide file tree
Showing 378 changed files with 15 additions and 87,161 deletions.
19 changes: 2 additions & 17 deletions .bbtravis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ matrix:
# add js tests in separate job. Start it early because it is quite long
- env: PYTHON=3.9 TWISTED=latest SQLALCHEMY=latest TESTS=js_build NUM_CPU=2 MEMORY_SIZE=1G
- env: PYTHON=3.9 TWISTED=latest SQLALCHEMY=latest TESTS=js_unit NUM_CPU=2 MEMORY_SIZE=1G
- env: PYTHON=3.9 TWISTED=latest SQLALCHEMY=latest TESTS=smokes NUM_CPU=4 MEMORY_SIZE=2G
- env: PYTHON=3.9 TWISTED=latest SQLALCHEMY=latest TESTS=e2e_react_whl NUM_CPU=2 MEMORY_SIZE=2G
- env: PYTHON=3.9 TWISTED=latest SQLALCHEMY=latest TESTS=e2e_react_tgz NUM_CPU=2 MEMORY_SIZE=2G

Expand Down Expand Up @@ -144,7 +143,7 @@ script:
cmd: |
export NODE_OPTIONS=--openssl-legacy-provider
export PATH=/tmp/bbvenv/bin/:$PATH
make frontend_tests_headless
make frontend_tests
- title: master and worker tests
condition: TESTS in ("dev_virtualenv", "trial")
Expand Down Expand Up @@ -200,26 +199,12 @@ script:
make docs-release-spelling
- title: maketarballs
condition: TESTS in ("smokes", "e2e_react_whl", "e2e_react_tgz")
condition: TESTS in ("e2e_react_whl", "e2e_react_tgz")
cmd: |
export NODE_OPTIONS=--openssl-legacy-provider
export PATH=/tmp/bbvenv/bin/:$PATH
make tarballs
- title: protractor tests
condition: TESTS == "smokes"
cmd: |
export NODE_OPTIONS=--openssl-legacy-provider
export PATH=/tmp/bbvenv/bin/:$PATH
./common/smokedist.sh whl
- title: tarballs protractor tests
condition: TESTS == "smokes" and not TRAVIS_PULL_REQUEST
cmd: |
export NODE_OPTIONS=--openssl-legacy-provider
export PATH=/tmp/bbvenv/bin/:$PATH
./common/smokedist.sh tar.gz
- title: end to end tests
condition: TESTS == "e2e_react_whl"
cmd: ./common/smokedist-react.sh whl
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
. .venv/bin/activate
make docs-release
NODE_OPTIONS=--openssl-legacy-provider make tarballs
# Note that installing www/base depends on frontend_deps target being built, which is
# Note that installing www/react-base depends on frontend_deps target being built, which is
# a dependency of the tarballs target.
NODE_OPTIONS=--openssl-legacy-provider pip install -e www/base
NODE_OPTIONS=--openssl-legacy-provider pip install -e www/react-base
pyinstaller pyinstaller/buildbot-worker.spec
# we test the new generated binary with the global virtualenv
SANDBOXED_WORKER_PATH=`pwd`/dist/buildbot-worker trial --reporter=text --rterrors buildbot.test.integration.interop
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ PYTHON ?= $(ROOT_DIR)/$(VENV_NAME)/bin/python
VENV_PY_VERSION ?= python3
YARN := $(shell which yarnpkg || which yarn)

WWW_PKGS := www/base www/react-base www/console_view www/react-console_view www/grid_view www/react-grid_view www/waterfall_view www/react-waterfall_view www/wsgi_dashboards www/badges
WWW_PKGS := www/react-base www/react-console_view www/react-grid_view www/react-waterfall_view www/badges
WWW_EX_PKGS := www/nestedexample www/codeparameter
WWW_DEP_PKGS := www/guanlecoja-ui www/data_module www/plugin_support www/react-data-module www/react-ui
WWW_DEP_PKGS := www/plugin_support www/react-data-module www/react-ui
ALL_PKGS := master worker pkg $(WWW_PKGS)

WWW_PKGS_FOR_UNIT_TESTS := $(filter-out www/badges www/plugin_support www/react-ui www/react-grid_view, $(WWW_DEP_PKGS) $(WWW_PKGS))
Expand Down Expand Up @@ -71,12 +71,6 @@ frontend_tests: frontend_deps
for i in $(WWW_PKGS_FOR_UNIT_TESTS); \
do (cd $$i; $(YARN) run build-dev || exit 1; $(YARN) run test || exit 1) || exit 1; done

frontend_tests_headless: frontend_deps
for i in $(WWW_PKGS); \
do (cd $$i; $(YARN) install --pure-lockfile); done
for i in $(WWW_PKGS_FOR_UNIT_TESTS); \
do (cd $$i; $(YARN) run build-dev || exit 1; $(YARN) run test $$(if [ $$i != "www/react-base" -a $$i != "www/react-data-module" -a $$i != "www/react-ui" -a $$i != "www/react-grid_view" -a $$i != "www/react-console_view" -a $$i != "www/react-waterfall_view" ]; then echo --browsers BBChromeHeadless; fi) || exit 1) || exit 1; done

# rebuild front-end from source
frontend: frontend_deps
for i in pkg $(WWW_PKGS); do $(PIP) install -e $$i || exit 1; done
Expand Down
92 changes: 0 additions & 92 deletions common/smokedist-download-compatible-chromedriver.py

This file was deleted.

97 changes: 0 additions & 97 deletions common/smokedist-www-backwards-compat.py

This file was deleted.

25 changes: 0 additions & 25 deletions common/smokedist.sh

This file was deleted.

4 changes: 2 additions & 2 deletions master/buildbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def getVersionFromArchiveId(git_archive_id='$Format:%ct %d$'):
def getVersion(init_file):
"""
Return BUILDBOT_VERSION environment variable, content of VERSION file, git
tag or 'latest'
tag or '0.0.0' meaning we could not find the version, but the output still has to be valid
"""

try:
Expand Down Expand Up @@ -125,7 +125,7 @@ def getVersion(init_file):
return mTimeVersion(init_file)
except Exception:
# bummer. lets report something
return "latest"
return "0.0.0"


version = getVersion(__file__)
Expand Down
2 changes: 1 addition & 1 deletion master/docs/developer/pull-request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ To run locally, install a Chrome-compatible browser and execute the following:
pip install -r requirements-ci.txt
make tarballs
./common/smokedist.sh whl
./common/smokedist-react.sh whl
16 changes: 0 additions & 16 deletions master/docs/manual/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,6 @@ Writing Dashboards with Flask_ or Bottle_

Buildbot Nine UI is written in Javascript.
This allows it to be reactive and real time, but comes at a price of a fair complexity.
Sometimes, you need a dashboard displaying your build results in your own manner but learning AngularJS for that is just too much.

There is a Buildbot plugin which allows to write a server side generated dashboard, and integrate it in the UI.

Expand Down Expand Up @@ -1303,21 +1302,6 @@ There is a Buildbot plugin which allows to write a server side generated dashboa
- It can use some of the AngularJS directives defined by Buildbot UI (currently only buildsummary is usable).
- It has full access to the application JS context.

Here is an example of code that you can use in your ``master.cfg`` to create a simple dashboard:



.. literalinclude:: mydashboard.py
:language: python


Then you need a ``templates/mydashboard.html`` file near your ``master.cfg``.

This template is a standard Jinja_ template which is the default templating engine of Flask_.

.. literalinclude:: mydashboard.html
:language: html+django


.. _Flask: http://flask.pocoo.org/
.. _Bottle: https://bottlepy.org/docs/dev/
Expand Down
1 change: 0 additions & 1 deletion master/docs/manual/mydashboard.py

This file was deleted.

1 change: 1 addition & 0 deletions newsfragments/remove-angularjs.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Now React web frontend is being used, so there is no need to maintain AngularJS frontend past v4.0.
4 changes: 2 additions & 2 deletions pkg/buildbot_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def getVersionFromArchiveId(git_archive_id='$Format:%ct %d$'):
def getVersion(init_file):
"""
Return BUILDBOT_VERSION environment variable, content of VERSION file, git
tag or 'latest'
tag or '0.0.0' meaning we could not find the version, but the output still has to be valid
"""

try:
Expand Down Expand Up @@ -152,7 +152,7 @@ def getVersion(init_file):
return mTimeVersion(init_file)
except Exception:
# bummer. lets report something
return "latest"
return "0.0.0"


# JS build strategy:
Expand Down
2 changes: 0 additions & 2 deletions smokes-react/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,3 @@ auth=util.UserPasswordAuth({'my@email.com': b'mypass'})
c['www']['auth'] = auth
c['www']['authz'] = authz

# in order to share this snippet in the doc, we load mydashboard.py using exec
exec(open("mydashboard.py").read())

0 comments on commit f780111

Please sign in to comment.