From 31ab4ade0c8dbb0e6c86985a99a8d531ff8858a5 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Tue, 25 Aug 2026 10:52:40 +0100 Subject: [PATCH 1/3] Upgrade to bootstrap 4 --- package-lock.json | 521 ++++++++++++++++++++++++++++++++++++++ package.json | 11 +- partials/column-links.hbs | 2 +- partials/field.hbs | 6 +- scripts/build | 19 +- scripts/docker-patch | 4 +- src/HTMLApi.js | 8 +- styles/main.scss | 29 ++- templates/body.hbs | 55 ++-- templates/edit.hbs | 2 +- templates/explorer.hbs | 2 - templates/filter.hbs | 33 ++- templates/filters.hbs | 6 +- templates/modal.hbs | 4 +- vendor/JSONFormatter.js | 8 +- yarn.lock | 149 ++++++----- 16 files changed, 698 insertions(+), 161 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f3390e6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,521 @@ +{ + "name": "api-ui", + "version": "1.2.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "api-ui", + "version": "1.2.0", + "license": "Apache-2.0", + "dependencies": { + "@rancher/icons": "2.0.63", + "bootstrap": "4.6.2", + "handlebars": "4.7.9", + "jquery": "3.7.1" + }, + "devDependencies": { + "clean-css-cli": "5.6.3", + "sass": "1.58.3", + "uglify-js": "3.19.3" + } + }, + "node_modules/@rancher/icons": { + "version": "2.0.63", + "resolved": "https://registry.npmjs.org/@rancher/icons/-/icons-2.0.63.tgz", + "integrity": "sha512-aIWrLgw4wmuQkSxYaHNgZQAw3LBjLPS6jnVzcSGLImWyLrdo5SZJUApCasVRn1nxmId+CPjpimIdxYqczn1ELw==", + "license": "Apache-2.0" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/bootstrap": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", + "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", + "deprecated": "This version of Bootstrap is no longer supported. Please upgrade to the latest version.", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "license": "MIT", + "peerDependencies": { + "jquery": "1.9.1 - 3", + "popper.js": "^1.16.1" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clean-css-cli": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/clean-css-cli/-/clean-css-cli-5.6.3.tgz", + "integrity": "sha512-MUAta8pEqA/d2DKQwtZU5nm0Og8TCyAglOx3GlWwjhGdKBwY4kVF6E5M6LU/jmmuswv+HbYqG/dKKkq5p1dD0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "clean-css": "^5.3.3", + "commander": "7.x", + "glob": "^7.1.6" + }, + "bin": { + "cleancss": "bin/cleancss" + }, + "engines": { + "node": ">= 10.12.0" + } + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/handlebars": { + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/immutable": { + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.9.tgz", + "integrity": "sha512-ObHy4YN7ycwZOUCLI1/6svfyAFu7vL8RhAvVu/bh/RZW9EPlOyDaQ9jDQWCtdqzaXUjgXZCW1migtHE7YI7UGQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/sass": { + "version": "1.58.3", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.58.3.tgz", + "integrity": "sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "devOptional": true, + "license": "BSD-2-Clause", + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/package.json b/package.json index 25ec311..6473f4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "api-ui", - "version": "1.1.11", + "version": "1.2.0", "description": "Embedded UI for any service that implements the Rancher API spec", "author": "SUSE", "license": "Apache-2.0", @@ -19,13 +19,14 @@ "upload": "./scripts/upload" }, "devDependencies": { - "clean-css-cli": "^5.6.2", + "clean-css-cli": "5.6.3", "sass": "1.58.3", - "uglify-js": "3.17.4" + "uglify-js": "3.19.3" }, "dependencies": { - "bootstrap": "3.4.1", + "@rancher/icons": "2.0.63", + "bootstrap": "4.6.2", "handlebars": "4.7.9", - "jquery": "3.6.3" + "jquery": "3.7.1" } } diff --git a/partials/column-links.hbs b/partials/column-links.hbs index 061b532..8f13be9 100644 --- a/partials/column-links.hbs +++ b/partials/column-links.hbs @@ -1,7 +1,7 @@ {{/ifInList}} {{/unless}} diff --git a/scripts/build b/scripts/build index 4c6cda9..ec41ea7 100755 --- a/scripts/build +++ b/scripts/build @@ -15,7 +15,7 @@ echo "Version: ${VERSION}" echo "" echo "Installing NPM dependencies" -npm install +npm install --no-fund DIST=./dist/${VERSION} mkdir -p ${DIST} @@ -40,7 +40,7 @@ echo "Building ..." JS_FILES=(node_modules/jquery/dist/jquery.js \ vendor/jquery.scrollintoview.js \ - node_modules/bootstrap/dist/js/bootstrap.js \ + node_modules/bootstrap/dist/js/bootstrap.bundle.js \ vendor/async.js \ vendor/json2.js \ vendor/polyfill.js \ @@ -68,8 +68,23 @@ cp -R node_modules/bootstrap/dist/** ${DIST} sed -i.bak -e "s@/\*# sourceMappingURL=bootstrap\.css\.map.*@@g" ${DIST}/css/bootstrap.css rm -f ${DIST}/css/bootstrap.css.bak +# Copy @rancher/icons font files. Its style.css references `fonts/icons.*` +# (no leading `./`), which resolves next to ui.css in the dist output. +mkdir -p ${DIST}/fonts +cp node_modules/@rancher/icons/fonts/icons.ttf \ + node_modules/@rancher/icons/fonts/icons.woff \ + node_modules/@rancher/icons/fonts/icons.svg \ + ${DIST}/fonts/ + +# Patch @rancher/icons style.css: drop `font-display: block` so that if the +# font file fails to load we get a visible fallback glyph (rectangle) instead +# of the block-period hiding the pseudo-element entirely. +sed -e 's@font-display:[[:space:]]*block;@@g' \ + node_modules/@rancher/icons/style.css > ./tmp/rancher-icons.css + # Generate css cat ./node_modules/bootstrap/dist/css/bootstrap.css \ + ./tmp/rancher-icons.css \ styles/main.scss \ styles/explorer.scss \ > ./tmp/ui.scss diff --git a/scripts/docker-patch b/scripts/docker-patch index 0774f82..3fb1009 100755 --- a/scripts/docker-patch +++ b/scripts/docker-patch @@ -16,7 +16,7 @@ fi echo "Patching running container with latest api-ui" -docker exec -it ${CONTAINER} bash -c "rm -rf /usr/share/rancher/ui/api-ui/*" +docker exec -it ${CONTAINER} bash -c "rm -rf /usr/share/rancher/ui-dashboard/api-ui/*" # Copy in the built code @@ -24,5 +24,5 @@ VERSION=$(node -e "(function () { console.log(require('./package.json').version) docker cp ./dist/${VERSION}/ ${CONTAINER}:/usr/share/rancher -docker exec -it ${CONTAINER} bash -c "cp -R /usr/share/rancher/${VERSION}/* /usr/share/rancher/ui/api-ui/" +docker exec -it ${CONTAINER} bash -c "cp -R /usr/share/rancher/${VERSION}/* /usr/share/rancher/ui-dashboard/api-ui/" docker exec -it ${CONTAINER} bash -c "rm -rf /usr/share/rancher/${VERSION}" diff --git a/src/HTMLApi.js b/src/HTMLApi.js index afc8973..e3013e0 100644 --- a/src/HTMLApi.js +++ b/src/HTMLApi.js @@ -128,7 +128,7 @@ HTMLApi.prototype.showModal = function(body,opt,cb) var modalHtml = Handlebars.templates['modal.hbs'](opt); var modal = $(modalHtml); this._reqModal = modal; - $('.modal-dialog',modal).css('width',opt.width||'750px'); + $('.modal-dialog',modal).css({width: opt.width||'750px', maxWidth: opt.width||'750px'}); this.setModalActions(opt.actions); modal.bind('keydown', this.onKeys); modal.modal({backdrop: 'static', keyboard: false}); @@ -185,7 +185,7 @@ HTMLApi.prototype.setModalActions = function(actions) var html = ''; actions.forEach(function(action) { - var color = 'btn-default'; + var color = 'btn-secondary'; var btnType = 'button' if ( action.primary ) { color = 'btn-primary'; @@ -194,7 +194,7 @@ HTMLApi.prototype.setModalActions = function(actions) color = 'btn-link'; } - html += ''; + html += ''; }); $('.modal-footer', this._reqModal).html(html); @@ -431,7 +431,7 @@ HTMLApi.prototype._addCollapser = function(item) return; var collapser = $('', { - "class": "glyphicon glyphicon-minus", + "class": "icon icon-minus", click: JSONFormatter.prototype.collapse }); diff --git a/styles/main.scss b/styles/main.scss index 563e502..6e1af7b 100644 --- a/styles/main.scss +++ b/styles/main.scss @@ -1,18 +1,19 @@ -@font-face { - font-family: 'Glyphicons Halflings'; - src: url("fonts/glyphicons-halflings-regular.eot"); - src: url("fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), - url("fonts/glyphicons-halflings-regular.woff2") format("woff2"), - url("fonts/glyphicons-halflings-regular.woff") format("woff"), - url("fonts/glyphicons-halflings-regular.ttf") format("truetype"), - url("fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); -} - .modal { overflow: auto; position: absolute; } +// Bootstrap 3 → 4 compatibility shim for .well (removed in v4) +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + SELECT { width: auto; } @@ -195,7 +196,13 @@ LI { padding: 0; } -.json LI .glyphicon { +.icon { + display: inline-block; + line-height: 1; + vertical-align: -0.125em; +} + +.json LI .icon { position: relative; left: -15px; margin-right: -15px; diff --git a/templates/body.hbs b/templates/body.hbs index bfc790e..5d88097 100644 --- a/templates/body.hbs +++ b/templates/body.hbs @@ -3,16 +3,16 @@
- - + + {{#if operations.post}} - + {{/if}} {{#if operations.put}} - + {{/if}} {{#if operations.delete}} - + {{/if}}

@@ -36,7 +36,7 @@ {{#if data.sortLinks }}
-
+
-
+
{{#if data.sort.name }}
{{#ifEqual data.sort.order "desc"}} - - + + {{else}} - - + + {{/ifEqual}}
{{/if}} @@ -73,40 +73,42 @@ {{#if data.pagination.partial}} {{#if data.pagination.first}} {{#ifEqual data.links.self data.pagination.first}} - + {{else}} - + {{/ifEqual}} {{else}} - + {{/if}} {{#if data.pagination.prev}} - + {{else}} - + {{/if}} {{#if data.pagination.next}} - + {{else}} - + {{/if}} {{#if data.pagination.last}} - + {{else}} - + {{/if}} {{else}}

Full result

{{/if}}
- +
- Limit: +
+ Limit: +
- - - +
+ +
@@ -123,9 +125,6 @@ {{#if docsPage}} Documentation
{{/if}} - {{#if logout}} - Log Out - {{/if}}
diff --git a/templates/edit.hbs b/templates/edit.hbs index 83260af..751ea18 100644 --- a/templates/edit.hbs +++ b/templates/edit.hbs @@ -32,7 +32,7 @@ {{#if required}}*{{/if}} {{name}} {{#if description}} - + {{/if}} diff --git a/templates/explorer.hbs b/templates/explorer.hbs index 820c2c5..f79ade7 100644 --- a/templates/explorer.hbs +++ b/templates/explorer.hbs @@ -9,8 +9,6 @@ --> - Log Out
- JSON View
{{#if docs}} Documentation diff --git a/templates/filter.hbs b/templates/filter.hbs index f475cd0..ffbea93 100644 --- a/templates/filter.hbs +++ b/templates/filter.hbs @@ -1,44 +1,41 @@
-
- - - +
+
+ +
- +
{{#if thisFilterSchema.modifiers}} - - +
{{else}} - = + = {{/if}} -
+
{{#if options}} - {{#eachProperty options}} {{/eachProperty}} {{else}} - + {{/if}}
diff --git a/templates/filters.hbs b/templates/filters.hbs index 4a75000..808c298 100644 --- a/templates/filters.hbs +++ b/templates/filters.hbs @@ -3,8 +3,8 @@
None
{{#if canFilter}}
- - - + + +
{{/if}} diff --git a/templates/modal.hbs b/templates/modal.hbs index 35c9b4a..eaf8e99 100644 --- a/templates/modal.hbs +++ b/templates/modal.hbs @@ -2,13 +2,13 @@