fix(vermeer): add Web UI build pipeline#348
Open
lokidundun wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
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 intomake,build.sh, and the Docker build. - Restructure Web UI asset root from
ui/toui/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 undervermeer/), anddocker-compose up -dwill only work if the user runs it from the directory containing the compose file or passes-f. Consider updating the instructions to eithercd vermeerbefore running compose, or usedocker-compose -f vermeer/docker-compose.yaml up -dso 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 on lines
+35
to
+36
| qeuryGraphs: function () { | ||
| const $t = $('#graphs_table'); |
| 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 on lines
+68
to
+69
| const $tb = $t.append('<tbody/>'); | ||
| rows = data.tasks; |
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 on lines
+26
to
+29
| # Glyphicons source (GitHub raw) | ||
| GLYPHICONS_BASE="https://raw.githubusercontent.com/Darkseal/bootstrap4-glyphicons/master/bootstrap4-glyphicons" | ||
| GLYPHICONS_COMMIT="master" | ||
|
|
| @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/" |
|
|
||
| # Download UI assets if not exist | ||
| echo "Checking UI assets..." | ||
| ./scripts/download_ui_assets.sh |
| master_peer=127.0.0.1:6689 | ||
| run_mode=worker | ||
| worker_group=default No newline at end of file | ||
| worker_group=$ |
| "description": "Frontend dependencies for Vermeer UI (downloaded at build time for ASF compliance)", | ||
| "dependencies": { | ||
| "jquery": "3.5.1", | ||
| "bootstrap": "4.3.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the PR
Main Changes
Build System
Asset Path Restructure
Git/Docker Ignore Rules
Configuration
Documentation
Result

Verifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODODoc - DoneDoc - No Need