Skip to content

Commit d0daefe

Browse files
committed
Modernize for PastureStack compatibility
1 parent 60188e2 commit d0daefe

890 files changed

Lines changed: 266945 additions & 6294 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.drone.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* text=auto
2+
3+
# Shell gates must stay LF even when maintainers work from Windows with
4+
# core.autocrlf=true; CRLF makes WSL/Linux bash fail before validation starts.
5+
scripts/* text eol=lf
6+
*.sh text eol=lf
7+
8+
# Security smoke tests pin these vendored browser assets by SHA-256. Keep their
9+
# checked-out bytes stable on Windows and Linux.
10+
vendor/ember/*.js text eol=lf
11+
vendor/jquery/jquery.js text eol=lf
12+
vendor/ansi-up/ansi-up-global.js text eol=lf
13+
vendor/semver/semver-global.js text eol=lf
14+
vendor/shell-quote/shell-quote-global.js text eol=lf
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Report a reproducible Web Console problem
4+
title: "[Bug] "
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
## What happened?
10+
11+
Describe the problem and the result you expected.
12+
13+
## How can it be reproduced?
14+
15+
List the smallest reliable sequence of steps.
16+
17+
## Environment
18+
19+
- PastureStack Server version:
20+
- Web Console version:
21+
- Browser and version:
22+
- Selected language:
23+
- Current route:
24+
25+
## Additional evidence
26+
27+
Attach screenshots or redacted logs when they help. Remove credentials, tokens,
28+
private addresses, hostnames, account names, email addresses, and local paths
29+
before submitting.
30+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Documentation
4+
url: https://github.com/PastureStack/server/tree/main/docs
5+
about: Read the operation and compatibility documentation before filing an issue.
6+

.github/workflows/validate.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Validate Web Console
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-24.04
12+
timeout-minutes: 45
13+
steps:
14+
- name: Check out immutable Web Console source
15+
env:
16+
SOURCE_SHA: ${{ github.sha }}
17+
run: |
18+
set -euo pipefail
19+
git init .
20+
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
21+
git fetch --depth=1 origin "$SOURCE_SHA"
22+
git -c advice.detachedHead=false checkout --detach FETCH_HEAD
23+
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
24+
test -z "$(git status --short)"
25+
26+
- name: Install pinned Node.js
27+
env:
28+
NODE_VERSION: 24.18.0
29+
NODE_ARCHIVE_SHA256: 55aa7153f9d88f28d765fcdad5ae6945b5c0f98a36881703817e4c450fa76742
30+
run: |
31+
set -euo pipefail
32+
archive="$RUNNER_TEMP/node.tar.xz"
33+
curl \
34+
--proto '=https' \
35+
--tlsv1.2 \
36+
--fail \
37+
--silent \
38+
--show-error \
39+
--location \
40+
--retry 5 \
41+
--retry-all-errors \
42+
--retry-delay 2 \
43+
-o "$archive" \
44+
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
45+
printf '%s %s\n' "$NODE_ARCHIVE_SHA256" "$archive" |
46+
sha256sum --check
47+
mkdir -p "$RUNNER_TEMP/node"
48+
tar -xJf "$archive" --strip-components=1 -C "$RUNNER_TEMP/node"
49+
echo "$RUNNER_TEMP/node/bin" >>"$GITHUB_PATH"
50+
51+
- name: Test and build twice
52+
id: build
53+
env:
54+
PASTURESTACK_NODE24_IMAGE: node:24.18.0-bookworm@sha256:5711a0d445a1af54af9589066c646df387d1831a608226f4cd694fc59e745059
55+
UI_COMPATIBILITY_VERSION: 1.6.56
56+
run: |
57+
set -euo pipefail
58+
test "$(node --version)" = v24.18.0
59+
npm ci --ignore-scripts --no-audit --no-fund
60+
bash scripts/ci
61+
62+
source_date_epoch=$(git show -s --format=%ct "$GITHUB_SHA")
63+
export SOURCE_DATE_EPOCH="$source_date_epoch"
64+
work_root=$(mktemp -d)
65+
cleanup() {
66+
rm -rf "$work_root"
67+
}
68+
trap cleanup EXIT
69+
70+
build_candidate() {
71+
output=$1
72+
rm -rf dist
73+
./node_modules/.bin/ember build --environment production
74+
bash scripts/package-static-candidate \
75+
"$UI_COMPATIBILITY_VERSION" \
76+
dist \
77+
"$output"
78+
}
79+
80+
build_candidate "$work_root/web-console-a.tar.gz"
81+
build_candidate "$work_root/web-console-b.tar.gz"
82+
cmp "$work_root/web-console-a.tar.gz" "$work_root/web-console-b.tar.gz"
83+
artifact_sha=$(sha256sum "$work_root/web-console-a.tar.gz" | awk '{print $1}')
84+
test "$(tar -tzf "$work_root/web-console-a.tar.gz" |
85+
grep -Ec "^${UI_COMPATIBILITY_VERSION}/translations/zh-tw\\.json$")" -eq 1
86+
if tar -tzf "$work_root/web-console-a.tar.gz" | grep -Eq '\.map$'; then
87+
echo WEB_CONSOLE_SOURCE_MAP_PRESENT >&2
88+
exit 1
89+
fi
90+
printf 'WEB_CONSOLE_VALIDATION_OK source=%s package=%s compatibility=%s sha256=%s\n' \
91+
"$GITHUB_SHA" \
92+
"$(node -p 'require("./package.json").version')" \
93+
"$UI_COMPATIBILITY_VERSION" \
94+
"$artifact_sha"
95+
package_version=$(node -p 'require("./package.json").version')
96+
release_asset="$RUNNER_TEMP/web-console-${package_version}.tar.gz"
97+
cp "$work_root/web-console-a.tar.gz" "$release_asset"
98+
sha256sum "$release_asset" >"${release_asset}.sha256"
99+
printf 'package_version=%s\nrelease_asset=%s\n' \
100+
"$package_version" "$release_asset" >>"$GITHUB_OUTPUT"
101+
102+
- name: Retain reviewed candidate for release
103+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
104+
with:
105+
name: web-console-${{ steps.build.outputs.package_version }}
106+
path: |
107+
${{ steps.build.outputs.release_asset }}
108+
${{ steps.build.outputs.release_asset }}.sha256
109+
if-no-files-found: error
110+
retention-days: 30
111+
compression-level: 0

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/coverage/*
1515
/libpeerconnection.log
1616
npm-debug.log
17-
package-lock.json
1817
testem.log
1918
.DS_Store
2019
.tern-port
@@ -35,3 +34,6 @@ testem.log
3534
.\#*
3635

3736
*.org
37+
38+
# Local development private keys must be generated locally.
39+
/ssl/server.key

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 47 deletions
This file was deleted.

COMPATIBILITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Compatibility Contract
2+
3+
Web Console preserves compatible API paths, schema and resource names, action names, setting keys, authentication routes, catalog fields, orchestration framework identifiers, generated model properties, and server-provided links.
4+
5+
Visible branding, product-owned assets, icon identifiers, package metadata, and operator documentation use PastureStack. Historical identifiers remain only where they are server data or protocol contracts and must not be mechanically replaced.
6+
7+
The published package identity is `@pasturestack/web-console`, while the Ember 2 runtime keeps the neutral internal `ui/` module prefix used by existing imports. The static server artifact must contain a fingerprinted `/assets/ui*.js` entry and matching `index.html` reference; changing either side requires a coordinated Server packaging test.
8+
9+
Before release, validate login and logout, environment selection, hosts, stacks, services, containers, shell, logs, console, catalog, storage, networking, access control, settings, API errors, browser navigation, `en-US`, and `zh-TW` against an isolated compatible server.
10+
11+
Catalog localization is additive. The canonical `name` and `description`
12+
fields remain unchanged, while optional
13+
`io.pasturestack.catalog.name.<locale>` and
14+
`io.pasturestack.catalog.description.<locale>` labels provide exact-locale
15+
display text. Missing or blank labels must fall back to the canonical fields.

COPYRIGHT_DETAILS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright and License Notes
2+
3+
This repository preserves upstream Web Console source originally published under Apache License 2.0.
4+
5+
- Original work and inherited notices remain attributed to their original authors and copyright holders.
6+
- PastureStack contributors claim authorship only for their subsequent changes.
7+
- License: Apache License 2.0. See [LICENSE](LICENSE).
8+
9+
Apache-2.0 obligations include retaining the license, preserving applicable notices, marking substantial modifications, and avoiding any implication that this independent fork is an official upstream product.
10+
11+
Vendored components retain their own legal files and provenance notes. In particular, compatibility packages under `vendor/` must be audited independently before any release. Nothing in PastureStack documentation removes or replaces third-party rights.

0 commit comments

Comments
 (0)