diff --git a/package-lock.json b/package-lock.json index 4ca6d87..d7b0bdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "jet-pilot", "version": "1.1.0", "dependencies": { + "@kubernetes-models/istio": "^2.3.0", "@kubernetes/client-node": "^0.20.0", "@radix-icons/vue": "^1.0.0", "@tanstack/vue-table": "^8.11.0", @@ -893,6 +894,80 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kubernetes-models/apimachinery": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@kubernetes-models/apimachinery/-/apimachinery-1.2.1.tgz", + "integrity": "sha512-mURvFnel3gaMXFchp8YeFmPBWuYifakuJnmRK1ad0Y7bxcPbcEntcb1rjdwitnHE0qTq3JZ2kBzpNqGO3+YJUw==", + "dependencies": { + "@kubernetes-models/base": "^4.0.3", + "@kubernetes-models/validate": "^3.1.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@kubernetes-models/base": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@kubernetes-models/base/-/base-4.0.3.tgz", + "integrity": "sha512-9Uo/RzB1ZvvPmnnpAE6yWPaFerMkpBxIHLuObexVDF813ZwVPdn56mmOOFfA6RyZtPdIT1AlhMozlHKOX16AGQ==", + "dependencies": { + "@kubernetes-models/validate": "^3.1.1", + "is-plain-object": "^5.0.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@kubernetes-models/istio": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@kubernetes-models/istio/-/istio-2.3.0.tgz", + "integrity": "sha512-tA3/4u54DAVJerwCKDC/kJmBMgDfjuc2OC+bigI8oqi+1aZGmJco/c6txfLYXSevdFcgeIWf6hQ/eyxj6GyZ2g==", + "dependencies": { + "@kubernetes-models/apimachinery": "^1.2.1", + "@kubernetes-models/base": "^4.0.3", + "@kubernetes-models/validate": "^3.1.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@kubernetes-models/validate": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@kubernetes-models/validate/-/validate-3.1.1.tgz", + "integrity": "sha512-s1YMn5+9jLG0S0441Tca8aukt05UqyqlloW6seJ43gdjBHWOYhfaG7ppw8Lmw0jvxF69yNV6wtYfXCTULXIfLw==", + "dependencies": { + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "ajv-formats-draft2019": "^1.6.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@kubernetes-models/validate/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@kubernetes-models/validate/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/@kubernetes/client-node": { "version": "0.20.0", "resolved": "https://registry.npmjs.org/@kubernetes/client-node/-/client-node-0.20.0.tgz", @@ -2665,6 +2740,56 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats-draft2019": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ajv-formats-draft2019/-/ajv-formats-draft2019-1.6.1.tgz", + "integrity": "sha512-JQPvavpkWDvIsBp2Z33UkYCtXCSpW4HD3tAZ+oL4iEFOk9obQZffx0yANwECt6vzr6ET+7HN5czRyqXbnq/u0Q==", + "dependencies": { + "punycode": "^2.1.1", + "schemes": "^1.4.0", + "smtp-address-parser": "^1.0.3", + "uri-js": "^4.4.1" + }, + "peerDependencies": { + "ajv": "*" + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/ansi-escapes": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", @@ -3897,6 +4022,11 @@ "node": ">=8" } }, + "node_modules/discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -5688,6 +5818,14 @@ "node": ">=8" } }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", @@ -6348,6 +6486,11 @@ "ufo": "^1.3.0" } }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6399,6 +6542,32 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, + "node_modules/nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "dependencies": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "bin": { + "nearley-railroad": "bin/nearley-railroad.js", + "nearley-test": "bin/nearley-test.js", + "nearley-unparse": "bin/nearley-unparse.js", + "nearleyc": "bin/nearleyc.js" + }, + "funding": { + "type": "individual", + "url": "https://nearley.js.org/#give-to-nearley" + } + }, + "node_modules/nearley/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -10341,6 +10510,23 @@ "fast-deep-equal": "^3.1.3" } }, + "node_modules/railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + }, + "node_modules/randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dependencies": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -10629,6 +10815,14 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -10663,6 +10857,14 @@ "lowercase-keys": "^1.0.0" } }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -10790,6 +10992,14 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/schemes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/schemes/-/schemes-1.4.0.tgz", + "integrity": "sha512-ImFy9FbCsQlVgnE3TCWmLPCFnVzx0lHL/l+umHplDqAKd0dzFpnS6lFZIpagBlYhKwzVmlV36ec0Y1XTu8JBAQ==", + "dependencies": { + "extend": "^3.0.0" + } + }, "node_modules/scule": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/scule/-/scule-1.1.0.tgz", @@ -11199,6 +11409,17 @@ "node": ">=8" } }, + "node_modules/smtp-address-parser": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/smtp-address-parser/-/smtp-address-parser-1.0.10.tgz", + "integrity": "sha512-Osg9LmvGeAG/hyao4mldbflLOkkr3a+h4m1lwKCK5U8M6ZAr7tdXEz/+/vr752TSGE4MNUlUl9cIK2cB8cgzXg==", + "dependencies": { + "nearley": "^2.20.1" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/socket.io": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.2.tgz", @@ -13276,6 +13497,66 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@kubernetes-models/apimachinery": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@kubernetes-models/apimachinery/-/apimachinery-1.2.1.tgz", + "integrity": "sha512-mURvFnel3gaMXFchp8YeFmPBWuYifakuJnmRK1ad0Y7bxcPbcEntcb1rjdwitnHE0qTq3JZ2kBzpNqGO3+YJUw==", + "requires": { + "@kubernetes-models/base": "^4.0.3", + "@kubernetes-models/validate": "^3.1.1", + "tslib": "^2.4.0" + } + }, + "@kubernetes-models/base": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@kubernetes-models/base/-/base-4.0.3.tgz", + "integrity": "sha512-9Uo/RzB1ZvvPmnnpAE6yWPaFerMkpBxIHLuObexVDF813ZwVPdn56mmOOFfA6RyZtPdIT1AlhMozlHKOX16AGQ==", + "requires": { + "@kubernetes-models/validate": "^3.1.1", + "is-plain-object": "^5.0.0", + "tslib": "^2.4.0" + } + }, + "@kubernetes-models/istio": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@kubernetes-models/istio/-/istio-2.3.0.tgz", + "integrity": "sha512-tA3/4u54DAVJerwCKDC/kJmBMgDfjuc2OC+bigI8oqi+1aZGmJco/c6txfLYXSevdFcgeIWf6hQ/eyxj6GyZ2g==", + "requires": { + "@kubernetes-models/apimachinery": "^1.2.1", + "@kubernetes-models/base": "^4.0.3", + "@kubernetes-models/validate": "^3.1.1", + "tslib": "^2.4.0" + } + }, + "@kubernetes-models/validate": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@kubernetes-models/validate/-/validate-3.1.1.tgz", + "integrity": "sha512-s1YMn5+9jLG0S0441Tca8aukt05UqyqlloW6seJ43gdjBHWOYhfaG7ppw8Lmw0jvxF69yNV6wtYfXCTULXIfLw==", + "requires": { + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "ajv-formats-draft2019": "^1.6.1", + "tslib": "^2.4.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, "@kubernetes/client-node": { "version": "0.20.0", "resolved": "https://registry.npmjs.org/@kubernetes/client-node/-/client-node-0.20.0.tgz", @@ -14496,6 +14777,43 @@ "uri-js": "^4.2.2" } }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "requires": { + "ajv": "^8.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, + "ajv-formats-draft2019": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ajv-formats-draft2019/-/ajv-formats-draft2019-1.6.1.tgz", + "integrity": "sha512-JQPvavpkWDvIsBp2Z33UkYCtXCSpW4HD3tAZ+oL4iEFOk9obQZffx0yANwECt6vzr6ET+7HN5czRyqXbnq/u0Q==", + "requires": { + "punycode": "^2.1.1", + "schemes": "^1.4.0", + "smtp-address-parser": "^1.0.3", + "uri-js": "^4.4.1" + } + }, "ansi-escapes": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", @@ -15390,6 +15708,11 @@ "path-type": "^4.0.0" } }, + "discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + }, "dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -16744,6 +17067,11 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, "is-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", @@ -17249,6 +17577,11 @@ "ufo": "^1.3.0" } }, + "moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -17288,6 +17621,24 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, + "nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "requires": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -19908,6 +20259,20 @@ "fast-deep-equal": "^3.1.3" } }, + "railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + }, + "randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "requires": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -20134,6 +20499,11 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -20159,6 +20529,11 @@ "lowercase-keys": "^1.0.0" } }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -20238,6 +20613,14 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "schemes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/schemes/-/schemes-1.4.0.tgz", + "integrity": "sha512-ImFy9FbCsQlVgnE3TCWmLPCFnVzx0lHL/l+umHplDqAKd0dzFpnS6lFZIpagBlYhKwzVmlV36ec0Y1XTu8JBAQ==", + "requires": { + "extend": "^3.0.0" + } + }, "scule": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/scule/-/scule-1.1.0.tgz", @@ -20558,6 +20941,14 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, + "smtp-address-parser": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/smtp-address-parser/-/smtp-address-parser-1.0.10.tgz", + "integrity": "sha512-Osg9LmvGeAG/hyao4mldbflLOkkr3a+h4m1lwKCK5U8M6ZAr7tdXEz/+/vr752TSGE4MNUlUl9cIK2cB8cgzXg==", + "requires": { + "nearley": "^2.20.1" + } + }, "socket.io": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.2.tgz", diff --git a/package.json b/package.json index c34d6fb..f960b98 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "check": "cd src-tauri && cargo check" }, "dependencies": { + "@kubernetes-models/istio": "^2.3.0", "@kubernetes/client-node": "^0.20.0", "@radix-icons/vue": "^1.0.0", "@tanstack/vue-table": "^8.11.0", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ddf7e9f..30783a6 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -180,7 +180,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -197,7 +197,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -276,9 +276,9 @@ checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "bitflags" @@ -709,12 +709,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -733,16 +733,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -758,13 +758,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.1", + "darling_core 0.20.3", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -913,7 +913,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -1052,7 +1052,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -1157,7 +1157,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -1834,6 +1834,19 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +[[package]] +name = "istio-sdk" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c242652e4372b9cadfb379477fa206b5ca0e94368b9134a5177dc7ee4734244" +dependencies = [ + "k8s-openapi", + "kube", + "schemars", + "serde", + "serde_json", +] + [[package]] name = "itoa" version = "0.4.8" @@ -1874,6 +1887,7 @@ name = "jet_pilot" version = "0.0.1" dependencies = [ "fix-path-env", + "istio-sdk", "k8s-openapi", "kube", "portable-pty", @@ -1945,7 +1959,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd990069640f9db34b3b0f7a1afc62a05ffaa3be9b66aa3c313f58346df7f788" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "bytes", "chrono", "http", @@ -2521,7 +2535,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -2778,7 +2792,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -2805,7 +2819,7 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "indexmap 1.9.3", "line-wrap", "quick-xml 0.28.2", @@ -2917,9 +2931,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" dependencies = [ "unicode-ident", ] @@ -3108,7 +3122,7 @@ version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -3355,7 +3369,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -3389,7 +3403,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -3419,7 +3433,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "chrono", "hex", "indexmap 1.9.3", @@ -3435,10 +3449,10 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" dependencies = [ - "darling 0.20.1", + "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -3765,9 +3779,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" dependencies = [ "proc-macro2", "quote", @@ -3966,7 +3980,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54ad2d49fdeab4a08717f5b49a163bdc72efc3b1950b6758245fcde79b645e1a" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "brotli", "ico", "json-patch", @@ -4147,22 +4161,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -4348,7 +4362,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "bitflags 2.4.1", "bytes", "futures-core", @@ -4396,7 +4410,7 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] @@ -4663,7 +4677,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", "wasm-bindgen-shared", ] @@ -4697,7 +4711,7 @@ checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5399,7 +5413,7 @@ checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.42", ] [[package]] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index bc945d9..73a2706 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -18,6 +18,7 @@ tauri = { version = "1.4.1", features = [ "macos-private-api", "api-all"] } tokio = "1.29.1" kube = { version = "0.84.0", features = ["runtime", "derive"] } k8s-openapi = { version = "0.18.0", features = ["v1_26"] } +istio-sdk = { version = "0.1.3", features = ["v1_18"] } fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs", branch = "dev" } portable-pty = "0.8.1" uuid = "1.4.1" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 5b77999..6d6bd40 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,11 +1,13 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] -use k8s_openapi::api::batch::v1::Job; +use istio_sdk::networking::v1beta1::virtual_service::VirtualService; +use k8s_openapi::api::batch::v1::{CronJob, Job}; +use k8s_openapi::api::networking::v1::Ingress; use tauri::Manager; use k8s_openapi::api::apps::v1::Deployment; -use k8s_openapi::api::core::v1::{Namespace, Pod, Service}; +use k8s_openapi::api::core::v1::{ConfigMap, Namespace, Pod, Secret, Service}; use kube::api::ListParams; use kube::config::{KubeConfigOptions, Kubeconfig, KubeconfigError}; use kube::{api::Api, Client, Config, Error}; @@ -197,6 +199,81 @@ async fn list_jobs(context: &str, namespace: &str) -> Result, Serializa .map_err(|err| SerializableKubeError::from(err)); } +#[tauri::command] +async fn list_cronjobs( + context: &str, + namespace: &str, +) -> Result, SerializableKubeError> { + let client = client_with_context(context).await?; + let cronjobs_api: Api = Api::namespaced(client, namespace); + + return cronjobs_api + .list(&ListParams::default()) + .await + .map(|cronjobs| cronjobs.items) + .map_err(|err| SerializableKubeError::from(err)); +} + +#[tauri::command] +async fn list_configmaps( + context: &str, + namespace: &str, +) -> Result, SerializableKubeError> { + let client: Client = client_with_context(context).await?; + let configmaps_api: Api = Api::namespaced(client, namespace); + + return configmaps_api + .list(&ListParams::default()) + .await + .map(|configmaps| configmaps.items) + .map_err(|err| SerializableKubeError::from(err)); +} + +#[tauri::command] +async fn list_secrets( + context: &str, + namespace: &str, +) -> Result, SerializableKubeError> { + let client: Client = client_with_context(context).await?; + let secrets_api: Api = Api::namespaced(client, namespace); + + return secrets_api + .list(&ListParams::default()) + .await + .map(|secrets| secrets.items) + .map_err(|err| SerializableKubeError::from(err)); +} + +#[tauri::command] +async fn list_virtual_services( + context: &str, + namespace: &str, +) -> Result, SerializableKubeError> { + let client: Client = client_with_context(context).await?; + let virtual_services_api: Api = Api::namespaced(client, namespace); + + return virtual_services_api + .list(&ListParams::default()) + .await + .map(|virtual_services| virtual_services.items) + .map_err(|err| SerializableKubeError::from(err)); +} + +#[tauri::command] +async fn list_ingresses( + context: &str, + namespace: &str, +) -> Result, SerializableKubeError> { + let client: Client = client_with_context(context).await?; + let ingress_api: Api = Api::namespaced(client, namespace); + + return ingress_api + .list(&ListParams::default()) + .await + .map(|ingresses| ingresses.items) + .map_err(|err| SerializableKubeError::from(err)); +} + struct TerminalSession { writer: Arc>>, } @@ -309,8 +386,13 @@ fn main() { list_pods, get_pod, list_deployments, - list_services, list_jobs, + list_cronjobs, + list_configmaps, + list_secrets, + list_services, + list_virtual_services, + list_ingresses, create_tty_session, stop_tty_session, write_to_pty diff --git a/src/components/tables/configmaps/columns.ts b/src/components/tables/configmaps/columns.ts new file mode 100644 index 0000000..cd6184e --- /dev/null +++ b/src/components/tables/configmaps/columns.ts @@ -0,0 +1,24 @@ +import { V1ConfigMap } from "@kubernetes/client-node"; +import { ColumnDef } from "@tanstack/vue-table"; +import { formatDateTimeDifference } from "@/lib/utils"; + +export const columns: ColumnDef[] = [ + { + accessorKey: "metadata.name", + header: "Name", + }, + { + header: "Data", + accessorFn: (row) => { + return `${Object.keys(row.data || {}).length}`; + }, + }, + { + header: "Age", + accessorFn: (row) => + formatDateTimeDifference( + row.metadata?.creationTimestamp || new Date(), + new Date() + ), + }, +]; diff --git a/src/components/tables/cronjobs/columns.ts b/src/components/tables/cronjobs/columns.ts new file mode 100644 index 0000000..79318c5 --- /dev/null +++ b/src/components/tables/cronjobs/columns.ts @@ -0,0 +1,40 @@ +import { V1CronJob, V1Job } from "@kubernetes/client-node"; +import { ColumnDef } from "@tanstack/vue-table"; +import { formatDateTimeDifference } from "@/lib/utils"; + +export const columns: ColumnDef[] = [ + { + accessorKey: "metadata.name", + header: "Name", + }, + { + header: "Schedule", + accessorKey: "spec.schedule", + }, + { + header: "Suspend", + accessorKey: "spec.suspend", + }, + { + header: "Active", + accessorFn: (row) => { + return `${row.status?.active?.length ?? 0}`; + }, + }, + { + header: "Last Schedule", + accessorFn: (row) => + formatDateTimeDifference( + row.status?.lastScheduleTime || new Date(), + new Date() + ), + }, + { + header: "Age", + accessorFn: (row) => + formatDateTimeDifference( + row.metadata?.creationTimestamp || new Date(), + new Date() + ), + }, +]; diff --git a/src/components/tables/ingresses/columns.ts b/src/components/tables/ingresses/columns.ts new file mode 100644 index 0000000..84c255e --- /dev/null +++ b/src/components/tables/ingresses/columns.ts @@ -0,0 +1,28 @@ +import { formatDateTimeDifference } from "@/lib/utils"; +import { V1Ingress } from "@kubernetes/client-node"; +import { ColumnDef } from "@tanstack/vue-table"; + +export const columns: ColumnDef[] = [ + { + accessorKey: "metadata.name", + header: "Name", + }, + { + header: "Class", + accessorKey: "spec.ingressClassName", + }, + { + header: "Hosts", + accessorFn: (row) => { + return `${row.spec?.rules?.map((rule) => rule.host).join("; ")}`; + }, + }, + { + header: "Age", + accessorFn: (row) => + formatDateTimeDifference( + row.metadata?.creationTimestamp || new Date(), + new Date() + ), + }, +]; diff --git a/src/components/tables/secrets/columns.ts b/src/components/tables/secrets/columns.ts new file mode 100644 index 0000000..8a0aee4 --- /dev/null +++ b/src/components/tables/secrets/columns.ts @@ -0,0 +1,28 @@ +import { V1Secret } from "@kubernetes/client-node"; +import { ColumnDef } from "@tanstack/vue-table"; +import { formatDateTimeDifference } from "@/lib/utils"; + +export const columns: ColumnDef[] = [ + { + accessorKey: "metadata.name", + header: "Name", + }, + { + header: "Type", + accessorKey: "type", + }, + { + header: "Data", + accessorFn: (row) => { + return `${Object.keys(row.data || {}).length}`; + }, + }, + { + header: "Age", + accessorFn: (row) => + formatDateTimeDifference( + row.metadata?.creationTimestamp || new Date(), + new Date() + ), + }, +]; diff --git a/src/components/tables/virtualservices/columns.ts b/src/components/tables/virtualservices/columns.ts new file mode 100644 index 0000000..9fbe45e --- /dev/null +++ b/src/components/tables/virtualservices/columns.ts @@ -0,0 +1,30 @@ +import { formatDateTimeDifference } from "@/lib/utils"; +import { VirtualService } from "@kubernetes-models/istio/networking.istio.io/v1beta1"; +import { ColumnDef } from "@tanstack/vue-table"; + +export const columns: ColumnDef[] = [ + { + accessorKey: "metadata.name", + header: "Name", + }, + { + header: "Gateways", + accessorFn: (row) => { + return `${row.spec?.gateways?.join("; ")}`; + }, + }, + { + header: "Hosts", + accessorFn: (row) => { + return `${row.spec?.hosts?.join("; ")}`; + }, + }, + { + header: "Age", + accessorFn: (row) => + formatDateTimeDifference( + row.metadata?.creationTimestamp || new Date(), + new Date() + ), + }, +]; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index e29d4fb..932045a 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -42,6 +42,9 @@ export function formatDateTimeDifference(startDate: Date, endDate: Date) { } } else if (minutes > 0) { formattedDuration += `${minutes}m`; + if (seconds > 0) { + formattedDuration += `${seconds}s`; + } } else { formattedDuration += `${seconds}s`; } diff --git a/src/providers/KubeContextProvider.ts b/src/providers/KubeContextProvider.ts index 3d54225..ca910ef 100644 --- a/src/providers/KubeContextProvider.ts +++ b/src/providers/KubeContextProvider.ts @@ -37,6 +37,7 @@ export default { Kubernetes.getCurrentContext().then((context) => { setContext(context); + setNamespace("tms"); }); }, render(): any { diff --git a/src/router.ts b/src/router.ts index caba730..45522ce 100644 --- a/src/router.ts +++ b/src/router.ts @@ -16,11 +16,36 @@ const routes: Array = [ name: "Jobs", component: () => import("./views/Jobs.vue"), }, + { + path: "/cronjobs", + name: "CronJobs", + component: () => import("./views/CronJobs.vue"), + }, + { + path: "/configmaps", + name: "ConfigMaps", + component: () => import("./views/ConfigMaps.vue"), + }, + { + path: "/secrets", + name: "Secrets", + component: () => import("./views/Secrets.vue"), + }, { path: "/services", name: "Services", component: () => import("./views/Services.vue"), }, + { + path: "/virtualservices", + name: "VirtualServices", + component: () => import("./views/VirtualServices.vue"), + }, + { + path: "/ingresses", + name: "Ingresses", + component: () => import("./views/Ingresses.vue"), + }, ]; const router = createRouter({ diff --git a/src/services/Kubernetes.ts b/src/services/Kubernetes.ts index d4e1776..6617c64 100644 --- a/src/services/Kubernetes.ts +++ b/src/services/Kubernetes.ts @@ -1,10 +1,15 @@ import { + V1ConfigMap, + V1CronJob, V1Deployment, + V1Ingress, V1Job, V1Namespace, V1Pod, + V1Secret, V1Service, } from "@kubernetes/client-node"; +import { VirtualService } from "@kubernetes-models/istio/networking.istio.io/v1beta1"; import { invoke } from "@tauri-apps/api/tauri"; export interface KubernetesError { @@ -63,6 +68,43 @@ export class Kubernetes { }); } + static async getJobs(context: string, namespace: string): Promise { + return invoke("list_jobs", { + context: context, + namespace: namespace, + }); + } + + static async getCronJobs( + context: string, + namespace: string + ): Promise { + return invoke("list_cronjobs", { + context: context, + namespace: namespace, + }); + } + + static async getConfigMaps( + context: string, + namespace: string + ): Promise { + return invoke("list_configmaps", { + context: context, + namespace: namespace, + }); + } + + static async getSecrets( + context: string, + namespace: string + ): Promise { + return invoke("list_secrets", { + context: context, + namespace: namespace, + }); + } + static async getServices( context: string, namespace: string @@ -73,8 +115,21 @@ export class Kubernetes { }); } - static async getJobs(context: string, namespace: string): Promise { - return invoke("list_jobs", { + static async getVirtualServices( + context: string, + namespace: string + ): Promise { + return invoke("list_virtual_services", { + context: context, + namespace: namespace, + }); + } + + static async getIngresses( + context: string, + namespace: string + ): Promise { + return invoke("list_ingresses", { context: context, namespace: namespace, }); diff --git a/src/views/ConfigMaps.vue b/src/views/ConfigMaps.vue new file mode 100644 index 0000000..b128924 --- /dev/null +++ b/src/views/ConfigMaps.vue @@ -0,0 +1,54 @@ + +x + diff --git a/src/views/CronJobs.vue b/src/views/CronJobs.vue new file mode 100644 index 0000000..747dc7c --- /dev/null +++ b/src/views/CronJobs.vue @@ -0,0 +1,54 @@ + +x + diff --git a/src/views/Ingresses.vue b/src/views/Ingresses.vue new file mode 100644 index 0000000..a3e2fe1 --- /dev/null +++ b/src/views/Ingresses.vue @@ -0,0 +1,53 @@ + + diff --git a/src/views/Secrets.vue b/src/views/Secrets.vue new file mode 100644 index 0000000..a0e7f55 --- /dev/null +++ b/src/views/Secrets.vue @@ -0,0 +1,54 @@ + +x + diff --git a/src/views/VirtualServices.vue b/src/views/VirtualServices.vue new file mode 100644 index 0000000..f2e9f50 --- /dev/null +++ b/src/views/VirtualServices.vue @@ -0,0 +1,53 @@ + +