Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
511876b
WBSTACK MODIFICATIONS
addshore Dec 4, 2020
60dd0e9
Github actions for docker build
addshore Dec 4, 2020
83321f6
Standardize docker workflows
addshore Dec 5, 2020
c8191b1
ADD CHANGELOG.md
addshore Dec 5, 2020
9e1c7c7
CHANGELOG for 1.1 image
addshore Dec 8, 2020
64c6733
CHANGELOG for 1.2
addshore Jan 31, 2021
1f1c98e
Bump luke142367/Docker-Lint-Action from v1.0.0 to v1.1.1
dependabot[bot] May 2, 2021
2382940
Bump crazy-max/ghaction-docker-meta from v1 to v2.4.0
dependabot[bot] May 2, 2021
61b2f42
Bump actions/cache from 2 to 2.1.5 (#18)
dependabot[bot] May 14, 2021
e2829dc
Bump docker/setup-qemu-action from 1 to 1.1.0 (#17)
dependabot[bot] May 14, 2021
66eeabb
Bump docker/build-push-action from 2 to 2.4.0 (#15)
dependabot[bot] May 14, 2021
e660fa6
Bump crazy-max/ghaction-docker-meta from 2.4.0 to 3.1.0 (#14)
dependabot[bot] May 14, 2021
ff6e0aa
Bump docker/login-action from 1 to 1.9.0 (#13)
dependabot[bot] May 14, 2021
1ad0723
Bump actions/checkout from 2 to 2.3.4 (#12)
dependabot[bot] May 14, 2021
8fd1aae
Don't require GITHUB_TOKEN in docker related flows (#19)
addshore May 14, 2021
42dc570
CHANGELOG 1.3
addshore Jun 23, 2021
51c34ee
Bump crazy-max/ghaction-docker-meta from 3.1.0 to 3.3.0 (#21)
dependabot[bot] Jun 23, 2021
3bec0f6
Bump docker/build-push-action from 2.4.0 to 2.5.0 (#22)
dependabot[bot] Jun 23, 2021
a62e144
Bump docker/setup-qemu-action from 1.1.0 to 1.2.0 (#23)
dependabot[bot] Jun 23, 2021
92a9ece
Bump actions/cache from 2.1.5 to 2.1.6 (#24)
dependabot[bot] Jun 23, 2021
6feebb0
Dependapile Github Actions June 30th (#28)
addshore Jun 30, 2021
0404422
Add .github/workflows/github.prs.combine.yml
addshore Sep 1, 2021
d3935eb
Combined PR for prefix: dependabot/github_actions (#37)
addshore Sep 1, 2021
648afdf
Bump actions/github-script from 4.1 to 5 (#39)
dependabot[bot] Oct 13, 2021
056ef97
Blanket ${{ secrets.GITHUB_TOKEN }}
addshore Oct 13, 2021
0fcbba7
CHANGELOG: 1.4
tarrow Feb 10, 2022
00161f9
fix: do not try to clean prefixes at all
m90 Jan 29, 2024
a5c2a7f
docs: add CHANGELOG
m90 Jan 30, 2024
f32c244
Update README.md
deer-wmde Feb 9, 2024
75df67b
Improve TinyURL shortener
AndrewKostka Oct 30, 2024
4f3c3ca
Release 1.6 (#293)
AndrewKostka Nov 4, 2024
601a60c
Hide graph builder (#294)
AndrewKostka Nov 21, 2024
a875bdc
Release 1.7 (#295)
AndrewKostka Nov 21, 2024
a95bfe3
Bump actions/cache to v4 (#300)
dati18 Jun 20, 2025
c14af5c
Use node:18 as docker builder
outdooracorn Jun 30, 2025
e5a3e32
Update CHANGELOG for 1.8
dati18 Jul 2, 2025
45594fa
Bump @wdio/cli from 7.36.0 to 9.17.1
dependabot[bot] Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# We only want to ignore these for the docker build
# I hope they are included in docker-compose...
/src/node_modules
/src/build
57 changes: 57 additions & 0 deletions .github/workflows/docker.build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Docker build

on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:

jobs:
docker-build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Docker meta
id: docker_meta
uses: crazy-max/[email protected]
with:
images: ghcr.io/${{ github.repository }}
-
name: Set up QEMU
uses: docker/[email protected]
-
name: Set up Docker Buildx
uses: docker/[email protected]
-
name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Login to GitHub Container Registry
uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
18 changes: 18 additions & 0 deletions .github/workflows/docker.lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker lint

on:
push:
branches:
- 'main'
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: lint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
136 changes: 136 additions & 0 deletions .github/workflows/github.prs.combine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# From https://github.com/testcontainers/testcontainers-java/blob/master/.github/workflows/combine-prs.yml
name: 'Combine PRs'

# Controls when the action will run - in this case triggered manually
on:
workflow_dispatch:
inputs:
branchPrefix:
description: 'Branch prefix to find combinable PRs based on'
required: true
default: 'dependabot'
mustBeGreen:
description: 'Only combine PRs that are green (status is success)'
required: true
default: 'true'
combineBranchName:
description: 'Name of the branch to combine PRs into'
required: true
default: 'combine-prs-branch'
ignoreLabel:
description: 'Exclude PRs with this label'
required: true
default: 'nocombine'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "combine-prs"
combine-prs:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/github-script@v5
id: fetch-branch-names
name: Fetch branch names
with:
github-token: ${{secrets.GH_TOKEN_PLUSW}}
script: |
const pulls = await github.paginate('GET /repos/:owner/:repo/pulls', {
owner: context.repo.owner,
repo: context.repo.repo
});
branches = [];
prs = [];
base_branch = null;
for (const pull of pulls) {
const branch = pull['head']['ref'];
console.log('Pull for branch: ' + branch);
if (branch.startsWith('${{ github.event.inputs.branchPrefix }}')) {
console.log('Branch matched: ' + branch);
statusOK = true;
if(${{ github.event.inputs.mustBeGreen }}) {
console.log('Checking green status: ' + branch);
const checkRuns = await github.request('GET /repos/{owner}/{repo}/commits/{ref}/check-runs', {
owner: context.repo.owner,
repo: context.repo.repo,
ref: branch
});
for await (const cr of checkRuns.data.check_runs) {
console.log('Validating check conclusion: ' + cr.conclusion);
if(cr.conclusion != 'success') {
console.log('Discarding ' + branch + ' with check conclusion ' + cr.conclusion);
statusOK = false;
}
}
}
console.log('Checking labels: ' + branch);
const labels = pull['labels'];
for(const label of labels) {
const labelName = label['name'];
console.log('Checking label: ' + labelName);
if(labelName == '${{ github.event.inputs.ignoreLabel }}') {
console.log('Discarding ' + branch + ' with label ' + labelName);
statusOK = false;
}
}
if (statusOK) {
console.log('Adding branch to array: ' + branch);
branches.push(branch);
prs.push('#' + pull['number'] + ' ' + pull['title']);
base_branch = pull['base']['ref'];
}
}
}
if (branches.length == 0) {
core.setFailed('No PRs/branches matched criteria');
return;
}
core.setOutput('base-branch', base_branch);
core.setOutput('prs-string', prs.join('\n'));
combined = branches.join(' ')
console.log('Combined: ' + combined);
return combined
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_PLUSW }}
# Creates a branch with other PR branches merged together
- name: Created combined branch
env:
BASE_BRANCH: ${{ steps.fetch-branch-names.outputs.base-branch }}
BRANCHES_TO_COMBINE: ${{ steps.fetch-branch-names.outputs.result }}
COMBINE_BRANCH_NAME: ${{ github.event.inputs.combineBranchName }}
run: |
echo "$BRANCHES_TO_COMBINE"
sourcebranches="${BRANCHES_TO_COMBINE%\"}"
sourcebranches="${sourcebranches#\"}"
basebranch="${BASE_BRANCH%\"}"
basebranch="${basebranch#\"}"
git config pull.rebase false
git config user.name github-actions
git config user.email [email protected]
git branch $COMBINE_BRANCH_NAME $basebranch
git checkout $COMBINE_BRANCH_NAME
git pull origin $sourcebranches --no-edit
git push origin $COMBINE_BRANCH_NAME --force-with-lease
# Creates a PR with the new combined branch
- uses: actions/github-script@v5
name: Create Combined Pull Request
env:
PRS_STRING: ${{ steps.fetch-branch-names.outputs.prs-string }}
with:
github-token: ${{secrets.GH_TOKEN_PLUSW}}
script: |
const prString = process.env.PRS_STRING;
const body = 'This PR was created by the Combine PRs action by combining the following PRs:\n' + prString;
await github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Combined PR for prefix: ${{ github.event.inputs.branchPrefix }}',
head: '${{ github.event.inputs.combineBranchName }}',
base: '${{ steps.fetch-branch-names.outputs.base-branch }}',
body: body
});
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# WBStack queryservice-ui

## 1.8

July 2025 updates from upstream (https://phabricator.wikimedia.org/T395426)

## 1.7

Hide graph builder (https://phabricator.wikimedia.org/T357115)

## 1.6

Improve TinyURL shortener (https://phabricator.wikimedia.org/T347022)

## 1.5

Remove custom cleaning of prefixes on Query Formatting (https://phabricator.wikimedia.org/T347023)

## 1.4

February 2022 updates from upstream.
Security patches.
Includes hotfix until upstream [bug](https://phabricator.wikimedia.org/T301255) is resolved

## 1.3

June 2021 updates from upstream.

## 1.2

January 2021 updates from upstream.

## 1.1

December 2020 updates from upstream. [PR](https://github.com/wbstack/queryservice-ui/pull/1)

## 1.0

Github Build (first)

## May 2020

- 0.26 - Build: remove more non modified files from wbstack git (pt2)
- 0.25 - git pull, (2 may 2020)
- 0.21 - Build: without having all code files in wbstack git

## April 2029

- 0.20 - git pull, (17 April 2020)
- 0.19 - git pull, (5 April 2020)

## December 2019

- 0.18 - git pull, should fix https://github.com/addshore/wbstack/issues/32 ([edit] in examples)

## November 2019

- 0.17 - 2x XSS fixes
- 0.16 - Help examples link fix / rewrite on load
- 0.15 - Examples button
- 0.14 - Tidy up after security fix
- 0.13 - SECURITY fix - https://phabricator.wikimedia.org/T233213 (XSS in math)

## October 2019

- 0.12 - THURSDAY, tiny fix to title
- 0.11 - THURSDAY, fix config generation (missing first /)
- 0.10 - Wednesday before Wikidatacon
- 0.6 - Better dev localhost stuff
- 0.5 - Don't try to get last updated time (it wont work)
- 0.4 - Also allow sparql and wikibase config for localhost development
- 0.3 - CSS hacks to make the UI smaller and remove wikidata things
- 0.2 - sparql and wikibase API based on request host
- 0.1 - Initial version.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:18 AS builder

WORKDIR /src/app

COPY package.json package-lock.json ./

# TODO remove the --force from the install...
RUN npm install --force && npm cache clean --force

COPY . .

RUN npm run-script build


FROM nginx:1-alpine
LABEL org.opencontainers.image.source="https://github.com/wbstack/queryservice-ui"


COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder --chown=nginx:nginx /src/app/build /usr/share/nginx/html
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
> ℹ️ Issues for this repository are tracked on [Phabricator](https://phabricator.wikimedia.org/project/board/5563/) - ([Click here to open a new one](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?tags=wikibase_cloud
))

# Wikibase Query Service GUI

This repository contains the GUI for the [Wikidata Query Service](https://query.wikidata.org/).
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.7"
services:
debug:
image: node:12-alpine
working_dir: /home/node/app
command: npm start
volumes:
- ./src:/home/node/app
expose:
- "8080"
35 changes: 35 additions & 0 deletions docker/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name localhost;
charset utf-8;

# files transfer
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 1026g;
sendfile on;
send_timeout 300s;

# redirect server error pages / and set response status to 200 / ok
#error_page 404 =200 /;

root /usr/share/nginx/html;
index index.html index.html;

# Always serve index.html for any request
# location / {
# root /usr/share/nginx/html;
# try_files $uri /index.html;
# }

# deny access to .htaccess files, if Apache's document root concurs with nginx's one
location ~ /\.ht {
deny all;
}

# deny access to hidden files (beginning with a period)
location ~ /\. {
access_log off; log_not_found off; deny all;
}
}
Loading
Loading