Skip to content

fix(vermeer): add Web UI build pipeline#348

Open
lokidundun wants to merge 3 commits into
apache:masterfrom
lokidundun:docdocker
Open

fix(vermeer): add Web UI build pipeline#348
lokidundun wants to merge 3 commits into
apache:masterfrom
lokidundun:docdocker

Conversation

@lokidundun
Copy link
Copy Markdown

@lokidundun lokidundun commented May 25, 2026

Purpose of the PR

Main Changes

Build System

  • Add scripts/download_ui_assets.sh to download jQuery, Bootstrap, and Glyphicons at build time
  • Add ui/package.json for frontend dependency management
  • Update Makefile with download-ui-assets target and integrate it into init and generate-assets workflows
  • Update build.sh to automatically download UI assets before building
  • Update Dockerfile to install npm/bash/curl and download UI assets during image build

Asset Path Restructure

  • Change asset path from ui/ to ui/ui/ in asset.go and asset_dev_ui.go to match the new directory layout

Git/Docker Ignore Rules

  • Replace wildcard .dockerignore patterns with explicit file/directory exclusions
  • Add UI dependency patterns to .gitignore (node_modules, lib/* except functions.js and vermeer.css)

Configuration

  • Add auth and auth_token_factor fields to worker.ini
  • Add docker-compose.yml for local development with auth enabled

Documentation

  • Update README.md with:
    • Expanded directory structure showing UI files
    • Node.js/npm as a prerequisite
    • Authentication configuration and token generation guide
    • Web UI access notes requiring auth=token
    • Updated monitoring section URL (/ui/master.html)

Result
img_v3_02121_4371f1c2-2f5f-4020-ab25-a62630c6a0fg

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows.

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation labels May 25, 2026
@lokidundun lokidundun changed the title Docdocker fix(vermeer): add Web UI build pipeline May 25, 2026
@imbajin imbajin requested a review from Copilot May 25, 2026 07:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a build pipeline for Vermeer’s Web UI that downloads frontend dependencies at build time (to avoid vendoring third-party assets), updates asset paths to match the new UI directory layout, and refreshes Docker/Makefile/docs to support the new workflow and authentication-enabled UI.

Changes:

  • Add an npm-based UI dependency setup plus a shell script to download/copy UI assets into ui/ui/lib/, integrating it into make, build.sh, and the Docker build.
  • Restructure Web UI asset root from ui/ to ui/ui/ for both dev and generated asset builds.
  • Update ignore rules and documentation (including auth/token usage) to match the new UI build/runtime behavior.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
vermeer/ui/ui/lib/vermeer.css Adds Vermeer-specific CSS for the Web UI.
vermeer/ui/ui/lib/functions.js Introduces UI JS helper functions for login, graph/task listing, and AJAX utilities.
vermeer/ui/package.json Defines UI npm dependencies used for build-time asset downloading.
vermeer/scripts/download_ui_assets.sh New script to install npm deps and fetch/copy UI assets into ui/ui/lib/.
vermeer/README.md Documents new UI layout, prerequisites, auth/token usage, and updated UI URL.
vermeer/Makefile Integrates UI asset download into init/generate-assets and adds clean-up for UI artifacts.
vermeer/Dockerfile Installs node tooling and downloads UI assets during image build before go generate.
vermeer/config/worker.ini Updates worker config defaults and adds auth-related fields.
vermeer/build.sh Runs UI asset download during build before asset generation.
vermeer/asset/asset.go Updates dev asset root to ../ui/ui.
vermeer/asset/asset_dev_ui.go Updates dev UI asset root to /ui/ui/.
vermeer/.gitignore Ignores downloaded UI deps/assets while keeping Vermeer-owned UI files tracked.
vermeer/.dockerignore Replaces broad patterns with explicit exclusions, including UI build artifacts.
README.md Adjusts top-level quickstart wording to reference the compose filename.
Comments suppressed due to low confidence (1)

README.md:155

  • This section references docker-compose.yaml, but the snippet does not specify where that file lives (it appears to be under vermeer/), and docker-compose up -d will only work if the user runs it from the directory containing the compose file or passes -f. Consider updating the instructions to either cd vermeer before running compose, or use docker-compose -f vermeer/docker-compose.yaml up -d so the steps are unambiguous.
```bash
# Pull the image
docker pull hugegraph/vermeer:latest

# Change config path in docker-compose.yaml
volumes:
      - ~/:/go/bin/config # Change here to your actual config path, e.g., vermeer/config

# Run with docker-compose
docker-compose up -d
</details>



---

💡 <a href="/apache/hugegraph-computer/new/master?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

Comment thread vermeer/ui/ui/lib/functions.js Outdated
Comment on lines +35 to +36
qeuryGraphs: function () {
const $t = $('#graphs_table');
Comment thread vermeer/ui/ui/lib/functions.js Outdated
const fields = ['space_name', 'name', 'status', 'state', 'create_time',
'update_time', 'use_out_edges', 'use_out_degree'];
$t.append('<thead><tr/></thead>');
$tr = $t.find('thead tr');
Comment on lines +46 to +51
const ok = function (data) {
const $tb = $t.append('<tbody/>');
const rows = data.graphs;
$.each(rows, function (index, row) {
$tb.append(toTableRow(fields, row));
});
Comment thread vermeer/ui/ui/lib/functions.js Outdated
Comment on lines +68 to +69
const $tb = $t.append('<tbody/>');
rows = data.tasks;
Comment thread vermeer/ui/ui/lib/functions.js Outdated
Comment on lines +90 to +106
$span = $('<span/>').text(value);

switch (value) {
case 'error':
$span.addClass('badge badge-lg badge-danger');
break;
case 'incomplete':
$span.addClass('badge badge-lg badge-warning');
break;
case 'complete':
case 'loaded':
case 'disk':
$span.addClass('badge badge-lg badge-success');
}

$td = $('<td>').append($span);
$row.append($td);
Comment thread vermeer/scripts/download_ui_assets.sh Outdated
Comment on lines +26 to +29
# Glyphicons source (GitHub raw)
GLYPHICONS_BASE="https://raw.githubusercontent.com/Darkseal/bootstrap4-glyphicons/master/bootstrap4-glyphicons"
GLYPHICONS_COMMIT="master"

Comment thread vermeer/Makefile Outdated
@echo " make init - First time setup (download binaries + go mod download)"
@echo " make init - First time setup (download binaries + UI assets + go mod download)"
@echo " make download-binaries - Download supervisord and protoc binaries for your platform"
@echo " make download-ui-assets- Download jQuery, Bootstrap, Glyphicons to ui/ui/lib/"
Comment thread vermeer/build.sh Outdated

# Download UI assets if not exist
echo "Checking UI assets..."
./scripts/download_ui_assets.sh
Comment thread vermeer/config/worker.ini Outdated
master_peer=127.0.0.1:6689
run_mode=worker
worker_group=default No newline at end of file
worker_group=$
Comment thread vermeer/ui/package.json Outdated
"description": "Frontend dependencies for Vermeer UI (downloaded at build time for ASF compliance)",
"dependencies": {
"jquery": "3.5.1",
"bootstrap": "4.3.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upload the docker image to Dockerhub & Write a good README to help newcomers using Vermeer. (High Priority)

2 participants