Merge pull request #409 from ylei-tsubame/issues/405-peer-db-conn

Web UI: simplify peer striker database test
main
Digimer 1 year ago committed by GitHub
commit 6b1c2491d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      striker-ui-api/out/index.js
  2. 255
      striker-ui-api/package-lock.json
  3. 6
      striker-ui-api/src/lib/buildJobData.ts
  4. 69
      striker-ui-api/src/lib/request_handlers/host/createHostConnection.ts
  5. 27
      striker-ui-api/src/lib/request_handlers/host/prepareHost.ts
  6. 37
      striker-ui-api/src/lib/request_handlers/server/createServer.ts
  7. 2
      striker-ui-api/src/lib/shell.ts
  8. 2
      striker-ui/components/StrikerConfig/AddPeerDialog.tsx
  9. 2
      striker-ui/out/_next/static/7XDPxYo6bqsS6Slu5OONN/_buildManifest.js
  10. 0
      striker-ui/out/_next/static/7XDPxYo6bqsS6Slu5OONN/_middlewareManifest.js
  11. 0
      striker-ui/out/_next/static/7XDPxYo6bqsS6Slu5OONN/_ssgManifest.js
  12. 1
      striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js
  13. 1
      striker-ui/out/_next/static/chunks/pages/config-9d47390f2a09a755.js
  14. 2
      striker-ui/out/anvil.html
  15. 2
      striker-ui/out/config.html
  16. 2
      striker-ui/out/file-manager.html
  17. 2
      striker-ui/out/index.html
  18. 2
      striker-ui/out/init.html
  19. 2
      striker-ui/out/login.html
  20. 2
      striker-ui/out/manage-element.html
  21. 2
      striker-ui/out/server.html
  22. 925
      striker-ui/package-lock.json
  23. 2
      striker-ui/package.json

File diff suppressed because one or more lines are too long

@ -154,9 +154,9 @@
"dev": true
},
"node_modules/@babel/core/node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@ -268,9 +268,9 @@
}
},
"node_modules/@babel/helper-compilation-targets/node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@ -356,9 +356,9 @@
"dev": true
},
"node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@ -1971,9 +1971,9 @@
}
},
"node_modules/@babel/preset-env/node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@ -3206,9 +3206,9 @@
}
},
"node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@ -3299,9 +3299,9 @@
}
},
"node_modules/browserslist": {
"version": "4.20.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
"integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==",
"version": "4.21.10",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz",
"integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==",
"dev": true,
"funding": [
{
@ -3311,14 +3311,17 @@
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"caniuse-lite": "^1.0.30001317",
"electron-to-chromium": "^1.4.84",
"escalade": "^3.1.1",
"node-releases": "^2.0.2",
"picocolors": "^1.0.0"
"caniuse-lite": "^1.0.30001517",
"electron-to-chromium": "^1.4.477",
"node-releases": "^2.0.13",
"update-browserslist-db": "^1.0.11"
},
"bin": {
"browserslist": "cli.js"
@ -3335,7 +3338,7 @@
"node_modules/busboy": {
"version": "0.2.14",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz",
"integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=",
"integrity": "sha512-InWFDomvlkEj+xWLBfU3AvnbVYqeTWmQopiW0tWWEy5yehYm2YkGEc59sUmw/4ty5Zj/b0WHGs1LgecuBSBGrg==",
"dependencies": {
"dicer": "0.2.5",
"readable-stream": "1.1.x"
@ -3395,14 +3398,24 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001317",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz",
"integrity": "sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ==",
"version": "1.0.30001519",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz",
"integrity": "sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==",
"dev": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
}
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
},
"node_modules/chalk": {
"version": "4.1.2",
@ -3570,28 +3583,18 @@
}
},
"node_modules/core-js-compat": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz",
"integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==",
"version": "3.32.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.32.0.tgz",
"integrity": "sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==",
"dev": true,
"dependencies": {
"browserslist": "^4.19.1",
"semver": "7.0.0"
"browserslist": "^4.21.9"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/core-js"
}
},
"node_modules/core-js-compat/node_modules/semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
@ -3669,7 +3672,7 @@
"node_modules/dicer": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
"integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=",
"integrity": "sha512-FDvbtnq7dzlPz0wyYlOExifDEZcu8h+rErEXgfxqmLfRfC/kJidEFh4+effJRO3P0xmfqyPbSMG0LveNRfTKVg==",
"dependencies": {
"readable-stream": "1.1.x",
"streamsearch": "0.1.2"
@ -3729,9 +3732,9 @@
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"node_modules/electron-to-chromium": {
"version": "1.4.88",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.88.tgz",
"integrity": "sha512-oA7mzccefkvTNi9u7DXmT0LqvhnOiN2BhSrKerta7HeUC1cLoIwtbf2wL+Ah2ozh5KQd3/1njrGrwDBXx6d14Q==",
"version": "1.4.488",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.488.tgz",
"integrity": "sha512-Dv4sTjiW7t/UWGL+H8ZkgIjtUAVZDgb/PwGWvMsCT7jipzUV/u5skbLXPFKb6iV0tiddVi/bcS2/kUrczeWgIQ==",
"dev": true
},
"node_modules/emojis-list": {
@ -5428,9 +5431,9 @@
}
},
"node_modules/make-dir/node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@ -5595,9 +5598,9 @@
"dev": true
},
"node_modules/node-releases": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz",
"integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==",
"version": "2.0.13",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
"integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",
"dev": true
},
"node_modules/npm-run-path": {
@ -6255,9 +6258,9 @@
}
},
"node_modules/semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
@ -6777,6 +6780,36 @@
"node": ">= 0.8"
}
},
"node_modules/update-browserslist-db": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz",
"integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"escalade": "^3.1.1",
"picocolors": "^1.0.0"
},
"bin": {
"update-browserslist-db": "cli.js"
},
"peerDependencies": {
"browserslist": ">= 4.21.0"
}
},
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@ -7094,9 +7127,9 @@
"dev": true
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true
}
}
@ -7186,9 +7219,9 @@
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true
}
}
@ -7250,9 +7283,9 @@
"dev": true
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true
}
}
@ -8413,9 +8446,9 @@
}
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true
}
}
@ -9375,9 +9408,9 @@
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true
}
}
@ -9451,16 +9484,15 @@
}
},
"browserslist": {
"version": "4.20.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
"integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==",
"version": "4.21.10",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz",
"integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30001317",
"electron-to-chromium": "^1.4.84",
"escalade": "^3.1.1",
"node-releases": "^2.0.2",
"picocolors": "^1.0.0"
"caniuse-lite": "^1.0.30001517",
"electron-to-chromium": "^1.4.477",
"node-releases": "^2.0.13",
"update-browserslist-db": "^1.0.11"
}
},
"buffer-from": {
@ -9471,7 +9503,7 @@
"busboy": {
"version": "0.2.14",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz",
"integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=",
"integrity": "sha512-InWFDomvlkEj+xWLBfU3AvnbVYqeTWmQopiW0tWWEy5yehYm2YkGEc59sUmw/4ty5Zj/b0WHGs1LgecuBSBGrg==",
"requires": {
"dicer": "0.2.5",
"readable-stream": "1.1.x"
@ -9521,9 +9553,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001317",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz",
"integrity": "sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ==",
"version": "1.0.30001519",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz",
"integrity": "sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==",
"dev": true
},
"chalk": {
@ -9648,21 +9680,12 @@
"integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ=="
},
"core-js-compat": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz",
"integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==",
"version": "3.32.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.32.0.tgz",
"integrity": "sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==",
"dev": true,
"requires": {
"browserslist": "^4.19.1",
"semver": "7.0.0"
},
"dependencies": {
"semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true
}
"browserslist": "^4.21.9"
}
},
"core-util-is": {
@ -9726,7 +9749,7 @@
"dicer": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
"integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=",
"integrity": "sha512-FDvbtnq7dzlPz0wyYlOExifDEZcu8h+rErEXgfxqmLfRfC/kJidEFh4+effJRO3P0xmfqyPbSMG0LveNRfTKVg==",
"requires": {
"readable-stream": "1.1.x",
"streamsearch": "0.1.2"
@ -9779,9 +9802,9 @@
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"electron-to-chromium": {
"version": "1.4.88",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.88.tgz",
"integrity": "sha512-oA7mzccefkvTNi9u7DXmT0LqvhnOiN2BhSrKerta7HeUC1cLoIwtbf2wL+Ah2ozh5KQd3/1njrGrwDBXx6d14Q==",
"version": "1.4.488",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.488.tgz",
"integrity": "sha512-Dv4sTjiW7t/UWGL+H8ZkgIjtUAVZDgb/PwGWvMsCT7jipzUV/u5skbLXPFKb6iV0tiddVi/bcS2/kUrczeWgIQ==",
"dev": true
},
"emojis-list": {
@ -11018,9 +11041,9 @@
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true
}
}
@ -11145,9 +11168,9 @@
"dev": true
},
"node-releases": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz",
"integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==",
"version": "2.0.13",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
"integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",
"dev": true
},
"npm-run-path": {
@ -11611,9 +11634,9 @@
}
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
@ -11989,6 +12012,16 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
},
"update-browserslist-db": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz",
"integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==",
"dev": true,
"requires": {
"escalade": "^3.1.1",
"picocolors": "^1.0.0"
}
},
"uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",

@ -12,3 +12,9 @@ export const buildJobData = <T extends [string, unknown][]>({
return previous;
}, '')
.trim();
export const buildJobDataFromObject = <T extends Record<string, unknown>>({
obj,
...rest
}: Omit<Parameters<typeof buildJobData>[0], 'entries'> & { obj: T }) =>
buildJobData({ entries: Object.entries(obj), ...rest });

@ -1,4 +1,5 @@
import { RequestHandler } from 'express';
import { writeFileSync } from 'fs';
import SERVER_PATHS from '../../consts/SERVER_PATHS';
@ -9,8 +10,9 @@ import {
job,
sub,
} from '../../accessModule';
import { buildJobDataFromObject } from '../../buildJobData';
import { sanitize } from '../../sanitize';
import { rm, stderr, stdoutVar } from '../../shell';
import { rm, stderr, stdoutVar, systemCall, uuid } from '../../shell';
export const createHostConnection: RequestHandler<
unknown,
@ -25,7 +27,7 @@ export const createHostConnection: RequestHandler<
const commonIsPing = sanitize(isPing, 'boolean');
const commonPassword = sanitize(password, 'string');
const commonDBPort = sanitize(port, 'number', { fallback: 5432 });
const commonDBUser = sanitize(user, 'string', { fallback: 'root' });
const commonDBUser = sanitize(user, 'string', { fallback: 'admin' });
const peerIPAddress = sanitize(ipAddress, 'string');
const peerSSHPort = sanitize(sshPort, 'number', { fallback: 22 });
@ -72,7 +74,7 @@ export const createHostConnection: RequestHandler<
stdoutVar({ localIPAddress });
const pgpassFilePath = '/tmp/.pgpass';
const pgpassFilePath = `/tmp/.pgpass-${uuid()}`;
const pgpassFileBody = `${peerIPAddress}:${commonDBPort}:${commonDBName}:${commonDBUser}:${commonPassword.replace(
/:/g,
'\\:',
@ -81,17 +83,9 @@ export const createHostConnection: RequestHandler<
stdoutVar({ pgpassFilePath, pgpassFileBody });
try {
await sub('write_file', {
params: [
{
body: pgpassFileBody,
file: pgpassFilePath,
mode: '0600',
overwrite: 1,
secure: 1,
},
],
pre: ['Storage'],
writeFileSync(pgpassFilePath, pgpassFileBody, {
encoding: 'utf-8',
mode: 0o600,
});
} catch (subError) {
stderr(`Failed to write ${pgpassFilePath}; CAUSE: ${subError}`);
@ -100,17 +94,34 @@ export const createHostConnection: RequestHandler<
}
try {
const [rawIsPeerDBReachable]: [output: string, returnCode: number] =
await sub('call', {
params: [
{
shell_call: `PGPASSFILE="${pgpassFilePath}" ${SERVER_PATHS.usr.bin.psql.self} --host ${peerIPAddress} --port ${commonDBPort} --dbname ${commonDBName} --username ${commonDBUser} --no-password --tuples-only --no-align --command "SELECT 1"`,
},
],
pre: ['System'],
});
isPeerDBReachable = rawIsPeerDBReachable === '1';
const timestamp = String(Date.now());
const echo = systemCall(
SERVER_PATHS.usr.bin.psql.self,
[
'--no-align',
'--no-password',
'--tuples-only',
'--command',
`SELECT ${timestamp};`,
'--dbname',
commonDBName,
'--host',
peerIPAddress,
'--port',
String(commonDBPort),
'--username',
commonDBUser,
],
{ env: { PGPASSFILE: pgpassFilePath } },
).trim();
stdoutVar(
{ timestamp, echo },
'Ask the peer database to echo the current timestamp: ',
);
isPeerDBReachable = echo === timestamp;
} catch (subError) {
stderr(`Failed to test connection to peer database; CAUSE: ${subError}`);
}
@ -154,8 +165,12 @@ export const createHostConnection: RequestHandler<
await job({
file: __filename,
job_command: jobCommand,
job_data: `password=${commonPassword}
peer_job_command=${peerJobCommand}`,
job_data: buildJobDataFromObject({
obj: {
password: commonPassword,
peer_job_command: peerJobCommand,
},
}),
job_description: 'job_0012',
job_name: 'striker-peer::add',
job_title: 'job_0011',

@ -10,6 +10,7 @@ import {
} from '../../consts';
import { job, variable } from '../../accessModule';
import { buildJobDataFromObject } from '../../buildJobData';
import { sanitize } from '../../sanitize';
import { stderr } from '../../shell';
@ -26,7 +27,7 @@ export const prepareHost: RequestHandler<
hostPassword,
hostSSHPort,
hostType,
hostUser = 'root',
hostUser,
hostUUID,
redhatPassword,
redhatUser,
@ -42,10 +43,10 @@ export const prepareHost: RequestHandler<
const dataHostIPAddress = sanitize(hostIPAddress, 'string');
const dataHostName = sanitize(hostName, 'string');
const dataHostPassword = sanitize(hostPassword, 'string');
const dataHostSSHPort = sanitize(hostSSHPort, 'number') || 22;
const dataHostSSHPort = sanitize(hostSSHPort, 'number', { fallback: 22 });
const dataHostType = sanitize(hostType, 'string');
// Host user is unused at the moment.
const dataHostUser = sanitize(hostUser, 'string');
const dataHostUser = sanitize(hostUser, 'string', { fallback: 'root' });
const dataHostUUID = sanitize(hostUUID, 'string');
const dataRedhatPassword = sanitize(redhatPassword, 'string');
const dataRedhatUser = sanitize(redhatUser, 'string');
@ -124,14 +125,18 @@ export const prepareHost: RequestHandler<
await job({
file: __filename,
job_command: SERVER_PATHS.usr.sbin['striker-initialize-host'].self,
job_data: `enterprise_uuid=${dataEnterpriseUUID}
host_ip_address=${dataHostIPAddress}
host_name=${dataHostName}
password=${dataHostPassword}
rh_password=${dataRedhatPassword}
rh_user=${dataRedhatUser}
ssh_port=${dataHostSSHPort}
type=${dataHostType}`,
job_data: buildJobDataFromObject({
obj: {
enterprise_uuid: dataEnterpriseUUID,
host_ip_address: dataHostIPAddress,
host_name: dataHostName,
password: dataHostPassword,
rh_password: dataRedhatPassword,
rh_user: dataRedhatUser,
ssh_port: dataHostSSHPort,
type: dataHostType,
},
}),
job_description: 'job_0022',
job_name: `initialize::${dataHostType}::${dataHostIPAddress}`,
job_title: `job_002${dataHostType === 'dr' ? '1' : '0'}`,

@ -5,6 +5,7 @@ import { REP_UUID, SERVER_PATHS } from '../../consts';
import { OS_LIST_MAP } from '../../consts/OS_LIST';
import { job, query } from '../../accessModule';
import { buildJobDataFromObject } from '../../buildJobData';
import { sanitize } from '../../sanitize';
import { stderr, stdout, stdoutVar } from '../../shell';
@ -33,7 +34,7 @@ export const createServer: RequestHandler = async (request, response) => {
const os = sanitize(rOptimizeForOs, 'string');
const cpuCores = sanitize(rCpuCores, 'number');
const memory = sanitize(rMemory, 'number');
const storageGroupUUID = sanitize(rStorageGroupUuid, 'string');
const storageGroupUuid = sanitize(rStorageGroupUuid, 'string');
const storageSize = sanitize(rStorageSize, 'number');
const installIsoUuid = sanitize(rInstallIsoUuid, 'string');
const driverIsoUuid = sanitize(rDriverIsoUuid, 'string', {
@ -72,8 +73,8 @@ export const createServer: RequestHandler = async (request, response) => {
);
assert(
REP_UUID.test(storageGroupUUID),
`Data storage group UUID must be a valid UUID; got [${storageGroupUUID}]`,
REP_UUID.test(storageGroupUuid),
`Data storage group UUID must be a valid UUID; got [${storageGroupUuid}]`,
);
assert(
@ -103,18 +104,7 @@ export const createServer: RequestHandler = async (request, response) => {
return response.status(400).send();
}
const provisionServerJobData = `server_name=${serverName}
os=${os}
cpu_cores=${cpuCores}
ram=${memory}
storage_group_uuid=${storageGroupUUID}
storage_size=${storageSize}
install_iso=${installIsoUuid}
driver_iso=${driverIsoUuid}`;
stdout(`provisionServerJobData=[${provisionServerJobData}]`);
const [[provisionServerJobHostUUID]]: [[string]] = await query(
const [[provisionServerJobHostUuid]]: [[string]] = await query(
`SELECT
CASE
WHEN pri_hos.primary_host_uuid IS NULL
@ -147,17 +137,28 @@ driver_iso=${driverIsoUuid}`;
ON pri_hos.phl = nod_1.phr;`,
);
stdout(`provisionServerJobHostUUID=[${provisionServerJobHostUUID}]`);
stdout(`provisionServerJobHostUuid=[${provisionServerJobHostUuid}]`);
try {
await job({
file: __filename,
job_command: SERVER_PATHS.usr.sbin['anvil-provision-server'].self,
job_data: provisionServerJobData,
job_data: buildJobDataFromObject({
obj: {
cpu_cores: cpuCores,
driver_iso: driverIsoUuid,
install_iso: installIsoUuid,
os,
ram: memory,
server_name: serverName,
storage_group_uuid: storageGroupUuid,
storage_size: storageSize,
},
}),
job_name: 'server:provision',
job_title: 'job_0147',
job_description: 'job_0148',
job_host_uuid: provisionServerJobHostUUID,
job_host_uuid: provisionServerJobHostUuid,
});
} catch (subError) {
stderr(`Failed to provision server; CAUSE: ${subError}`);

@ -10,7 +10,7 @@ const print = (
}: { eol?: string; stream?: 'stderr' | 'stdout' } = {},
) => process[stream].write(`${message}${eol}`);
const systemCall = (
export const systemCall = (
...[command, args = [], options = {}]: Parameters<typeof spawnSync>
) => {
const { error, stderr, stdout } = spawnSync(command, args, {

@ -102,7 +102,7 @@ const AddPeerDialog = forwardRef<
sx: { minWidth: '4.6em', width: '25%' },
}}
id="add-peer-user-input"
inputProps={{ placeholder: 'root' }}
inputProps={{ placeholder: 'admin' }}
label={LABEL.user}
/>
}

@ -1 +1 @@
self.__BUILD_MANIFEST=function(s,a,c,e,t,n,i,f,d,u,b,k,h,j,r,g){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,e,i,f,k,"static/chunks/717-8bd60b96d67fd464.js",a,t,n,d,h,j,"static/chunks/pages/index-1f8f0ad3b3894dbc.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,c,e,i,f,k,a,t,n,d,h,"static/chunks/pages/anvil-c1177b17efcafc34.js"],"/config":[s,c,e,u,a,t,n,b,"static/chunks/pages/config-9d47390f2a09a755.js"],"/file-manager":[s,c,e,i,"static/chunks/768-9ee3dcb62beecb53.js",a,t,"static/chunks/pages/file-manager-1a707639a4834587.js"],"/init":[s,c,i,f,u,r,a,t,n,d,g,"static/chunks/pages/init-ae1befa8975f7914.js"],"/login":[s,c,e,a,t,n,b,"static/chunks/pages/login-b5de0cd2f49998d6.js"],"/manage-element":[s,c,e,i,f,u,r,"static/chunks/195-d5fd184cc249f755.js",a,t,n,d,b,g,"static/chunks/pages/manage-element-2b1d8792c2a5bf47.js"],"/server":[s,e,"static/chunks/227-a3756585a7ef09ae.js",a,j,"static/chunks/pages/server-db52258419acacf3.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/382-f51344f6f9208507.js","static/chunks/62-532ed713980da8db.js","static/chunks/483-f8013e38dca1620d.js","static/chunks/894-e57948de523bcf96.js","static/chunks/780-e8b3396d257460a4.js","static/chunks/899-83e9de2a35c6bcf0.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/614-0ce04fd295045ffe.js","static/chunks/140-ec935fb15330b98a.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/903-dc2a40be612a10c3.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/825-d34974d169ea09cc.js","static/chunks/94-db0af749b6e45543.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/692-59a4ae2829590f4c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
self.__BUILD_MANIFEST=function(s,c,a,e,t,n,i,f,d,u,b,k,h,j,r,g){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,a,e,i,f,k,"static/chunks/717-8bd60b96d67fd464.js",c,t,n,d,h,j,"static/chunks/pages/index-1f8f0ad3b3894dbc.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,a,e,i,f,k,c,t,n,d,h,"static/chunks/pages/anvil-c1177b17efcafc34.js"],"/config":[s,a,e,u,c,t,n,b,"static/chunks/pages/config-0ecdb2b2b3f8c089.js"],"/file-manager":[s,a,e,i,"static/chunks/768-9ee3dcb62beecb53.js",c,t,"static/chunks/pages/file-manager-1a707639a4834587.js"],"/init":[s,a,i,f,u,r,c,t,n,d,g,"static/chunks/pages/init-ae1befa8975f7914.js"],"/login":[s,a,e,c,t,n,b,"static/chunks/pages/login-b5de0cd2f49998d6.js"],"/manage-element":[s,a,e,i,f,u,r,"static/chunks/195-d5fd184cc249f755.js",c,t,n,d,b,g,"static/chunks/pages/manage-element-2b1d8792c2a5bf47.js"],"/server":[s,e,"static/chunks/227-a3756585a7ef09ae.js",c,j,"static/chunks/pages/server-db52258419acacf3.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/382-f51344f6f9208507.js","static/chunks/62-532ed713980da8db.js","static/chunks/483-f8013e38dca1620d.js","static/chunks/894-e57948de523bcf96.js","static/chunks/780-e8b3396d257460a4.js","static/chunks/899-83e9de2a35c6bcf0.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/614-0ce04fd295045ffe.js","static/chunks/140-ec935fb15330b98a.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/903-dc2a40be612a10c3.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/825-d34974d169ea09cc.js","static/chunks/94-db0af749b6e45543.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/692-59a4ae2829590f4c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -36,7 +36,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/cli": "^17.7.0",
"@commitlint/config-conventional": "^12.1.4",
"@types/netmask": "^1.0.30",
"@types/node": "^15.12.2",

Loading…
Cancel
Save