Skip to content
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

Improvements to the React GUI for builders and workers #7458

Open
wants to merge 10 commits into
base: 3.11.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 20 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

.PHONY: docs pylint flake8 virtualenv

ifeq ($(OS),Windows_NT)
VENV_BIN_DIR := Scripts
VENV_PY_VERSION ?= python
VENV_CREATE := python -m venv
else
VENV_BIN_DIR := bin
VENV_PY_VERSION ?= python3
VENV_CREATE := virtualenv -p $(VENV_PY_VERSION)
endif

VENV_NAME := .venv$(VENV_PY_VERSION)
PIP ?= $(ROOT_DIR)/$(VENV_NAME)/bin/pip
PYTHON ?= $(ROOT_DIR)/$(VENV_NAME)/bin/python
VENV_PY_VERSION ?= python3
PIP ?= $(ROOT_DIR)/$(VENV_NAME)/$(VENV_BIN_DIR)/pip
PYTHON ?= $(ROOT_DIR)/$(VENV_NAME)/$(VENV_BIN_DIR)/python
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/react-wsgi_dashboards 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
Expand All @@ -26,7 +35,7 @@ docs:
$(MAKE) -C master/docs dev
@echo "You can now open master/docs/_build/html/index.html"

docs-towncrier:
docs-towncrier:
if command -v towncrier >/dev/null 2>&1 ;\
then \
towncrier --draft | grep 'No significant changes.' || yes n | towncrier ;\
Expand Down Expand Up @@ -115,8 +124,9 @@ docker-buildbot-master:
$(DOCKERBUILD) -t buildbot/buildbot-master:master master

$(VENV_NAME):
virtualenv -p $(VENV_PY_VERSION) $(VENV_NAME)
$(PIP) install -U pip setuptools wheel
$(VENV_CREATE) $(VENV_NAME)
$(PYTHON) -m pip install --upgrade pip
$(PIP) install -U setuptools wheel

# helper for virtualenv creation
virtualenv: $(VENV_NAME) # usage: make virtualenv VENV_PY_VERSION=python3.4
Expand All @@ -125,21 +135,21 @@ virtualenv: $(VENV_NAME) # usage: make virtualenv VENV_PY_VERSION=python3.4
-r requirements-cidocs.txt \
packaging towncrier
@echo now you can type following command to activate your virtualenv
@echo . $(VENV_NAME)/bin/activate
@echo . $(VENV_NAME)/$(VENV_BIN_DIR)/activate

TRIALOPTS?=buildbot

.PHONY: trial
trial: virtualenv
. $(VENV_NAME)/bin/activate && trial $(TRIALOPTS)
. $(VENV_NAME)/$(VENV_BIN_DIR)/activate && trial $(TRIALOPTS)

release_notes: $(VENV_NAME)
test ! -z "$(VERSION)" # usage: make release_notes VERSION=0.9.2
towncrier build --yes --version $(VERSION) --date `date -u +%F`
git commit -m "Release notes for $(VERSION)"

$(ALL_PKGS_TARGETS): cleanup_for_tarballs frontend_deps
. $(VENV_NAME)/bin/activate && ./common/maketarball.sh $(patsubst %_pkg,%,$@)
. $(VENV_NAME)/$(VENV_BIN_DIR)/activate && ./common/maketarball.sh $(patsubst %_pkg,%,$@)

cleanup_for_tarballs:
find master pkg worker www -name VERSION -exec rm {} \;
Expand Down Expand Up @@ -171,4 +181,4 @@ finishrelease:

pyinstaller: virtualenv
$(PIP) install pyinstaller
$(VENV_NAME)/bin/pyinstaller pyinstaller/buildbot-worker.spec
$(VENV_NAME)/$(VENV_BIN_DIR)/pyinstaller pyinstaller/buildbot-worker.spec
1 change: 1 addition & 0 deletions newsfragments/build-time-info.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Display Information about when build completed, instead of just when it started
1 change: 1 addition & 0 deletions newsfragments/makefile-for-windows.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update Makefile to handle Windows paths and Python. Also modified the webpack config file to handle Windows paths.
3 changes: 2 additions & 1 deletion www/base/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const common = require('buildbot-build-common');
const env = require('yargs').argv.env;
const path = require("path");
const pkg = require('./package.json');
const WebpackShellPlugin = require('webpack-shell-plugin');
const WebpackCopyPlugin = require('copy-webpack-plugin');
Expand Down Expand Up @@ -40,7 +41,7 @@ module.exports = function() {
}],
extraPlugins: [
new WebpackShellPlugin({
onBuildEnd:['./node_modules/.bin/pug src/app/index.jade -o buildbot_www/static/']
onBuildEnd:[path.join('.', 'node_modules', '.bin', 'pug') + ' src/app/index.jade -o buildbot_www/static/']
}),
new WebpackCopyPlugin([
{ from: './node_modules/outdated-browser-rework/dist/outdated-browser-rework.min.js',
Expand Down
18 changes: 14 additions & 4 deletions www/react-base/src/components/BuildsTable/BuildsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,26 @@ export const BuildsTable = observer(({builds, builders}: BuildsTableProps) => {
)
: <></>;

const buildStartedCompletedElement = build.complete
? (
<span title={dateFormat(build.complete_at!)}>
{durationFormat(build.complete_at! - build.started_at)}
YngveNPettersen marked this conversation as resolved.
Show resolved Hide resolved
</span>
)
: (
<span title={dateFormat(build.started_at)}>
{durationFromNowFormat(build.started_at, now)}
YngveNPettersen marked this conversation as resolved.
Show resolved Hide resolved
</span>
);

return (
<tr key={build.id}>
{builderNameElement}
<td>
<BuildLinkWithSummaryTooltip build={build}/>
</td>
<td>
<span title={dateFormat(build.started_at)}>
{durationFromNowFormat(build.started_at, now)}
</span>
{buildStartedCompletedElement}
</td>
<td>
{buildCompleteInfoElement}
Expand Down Expand Up @@ -98,7 +108,7 @@ export const BuildsTable = observer(({builds, builders}: BuildsTableProps) => {
<tr>
{ builders !== null ? <td width="200px">Builder</td> : <></> }
<td width="100px">#</td>
<td width="150px">Started At</td>
<td width="150px">Completed At</td>
<td width="150px">Duration</td>
<td width="200px">Owners</td>
<td width="150px">Worker</td>
Expand Down