Skip to content

Commit

Permalink
Merge branch 'development' of github.com:threefoldtech/tfgrid-sdk-ts …
Browse files Browse the repository at this point in the history
…into development_2.7_update
  • Loading branch information
0oM4R committed Nov 5, 2024
2 parents d1e0a1d + a004c81 commit 0d6cd29
Show file tree
Hide file tree
Showing 54 changed files with 292 additions and 88 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"npmClient": "yarn"
}
2 changes: 1 addition & 1 deletion packages/UI/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@threefold/ui",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"private": false,
"main": "dist/threefold-ui.umd.js",
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql_client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@threefold/graphql_client",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"main": "./dist/node/index.js",
"module": "./dist/es6/index.js",
"exports": {
Expand All @@ -18,7 +18,7 @@
"es6-build": "tsc --build tsconfig.json"
},
"dependencies": {
"@threefold/types": "2.6.0-rc2",
"@threefold/types": "2.6.0-rc3",
"ts-mixer": "^6.0.2"
},
"devDependencies": {
Expand Down
11 changes: 6 additions & 5 deletions packages/grid_client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@threefold/grid_client",
"author": "Ahmed Hanafy",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"license": "ISC",
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/tree/development/packages/grid_client/README.md",
"repository": {
Expand All @@ -14,10 +14,11 @@
"dependencies": {
"@jimber/pkid": "1.0.4",
"@noble/secp256k1": "^1.7.1",
"@threefold/gridproxy_client": "2.6.0-rc2",
"@threefold/rmb_direct_client": "2.6.0-rc2",
"@threefold/tfchain_client": "2.6.0-rc2",
"@threefold/types": "2.6.0-rc2",
"@threefold/gridproxy_client": "2.6.0-rc3",
"@threefold/monitoring": "2.6.0-rc3",
"@threefold/rmb_direct_client": "2.6.0-rc3",
"@threefold/tfchain_client": "2.6.0-rc3",
"@threefold/types": "2.6.0-rc3",
"algosdk": "^1.19.0",
"appdata-path": "^1.0.0",
"await-lock": "^2.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/grid_client/src/clients/kyc/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class KYC {
async isHealthy(): Promise<boolean> {
try {
const res = await axios.get(urlJoin("https://", this.apiDomain, API_PREFIX, "health"));
const { status } = res.data;
const { status } = res.data.result;
if (status !== `Healthy`) return false;
return true;
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion packages/grid_client/src/modules/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { IsAlphanumericExpectUnderscore } from "../helpers";
import { Deployment } from "../zos/deployment";
import { ZdbModes } from "../zos/zdb";
import { blockchainType } from "./blockchainInterface";
const NameLength = 50;
const NameLength = 35;
const FarmNameLength = 40;

enum ContractStates {
Expand Down
4 changes: 2 additions & 2 deletions packages/grid_http_server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@threefold/grid_http_server",
"author": "Ahmed Hanafy",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"license": "ISC",
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/blob/development/packages/grid_http_server/README.md",
"repository": {
Expand All @@ -12,7 +12,7 @@
"access": "public"
},
"dependencies": {
"@threefold/grid_client": "2.6.0-rc2",
"@threefold/grid_client": "2.6.0-rc3",
"express": "^4.21.1",
"http-server": "^14.1.1",
"typescript": "^4.7.4"
Expand Down
8 changes: 4 additions & 4 deletions packages/grid_rmb_server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@threefold/grid_rmb_server",
"author": "Ahmed Hanafy",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"license": "ISC",
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/blob/development/packages/grid_rmb_server/README.md",
"repository": {
Expand All @@ -12,12 +12,12 @@
"access": "public"
},
"dependencies": {
"@threefold/grid_client": "2.6.0-rc2",
"@threefold/rmb_peer_server": "2.6.0-rc2",
"@threefold/grid_client": "2.6.0-rc3",
"@threefold/rmb_peer_server": "2.6.0-rc3",
"typescript": "^4.7.4"
},
"devDependencies": {
"@threefold/rmb_peer_client": "2.6.0-rc2",
"@threefold/rmb_peer_client": "2.6.0-rc3",
"ts-node": "^10.9.1"
},
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/gridproxy_client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@threefold/gridproxy_client",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"description": "gridproxy_client help to interact with gridproxy based on network",
"main": "./dist/node/public_api.js",
"module": "./dist/es6/public_api.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/monitoring/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@threefold/monitoring",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"description": "Threefold monitoring package",
"license": "Apache-2.0",
"main": "./dist/node/index.js",
Expand All @@ -26,9 +26,9 @@
"access": "public"
},
"dependencies": {
"@threefold/rmb_direct_client": "2.6.0-rc2",
"@threefold/tfchain_client": "2.6.0-rc2",
"@threefold/types": "2.6.0-rc2",
"@threefold/rmb_direct_client": "2.6.0-rc3",
"@threefold/tfchain_client": "2.6.0-rc3",
"@threefold/types": "2.6.0-rc3",
"chalk": "4.1.2",
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/monitoring/src/serviceMonitor/kyc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export class KYCMonitor extends ServiceBase implements ILivenessChecker {
try {
const res = await fetch(urlJoin(url, "/api/v1/health"));
if (!res?.ok) throw Error(`HTTP Response Code: ${res?.status}`);
const { status } = await res.json();
if (status !== "Healthy") throw Error(`Status: ${status}`);
const { result } = await res.json();
if (result.status !== "Healthy") throw Error(`Status: ${result.status}`);
return { alive: true };
} catch (error) {
return { alive: false, error };
Expand Down
12 changes: 6 additions & 6 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@threefold/playground",
"version": "2.6.0-rc2",
"version": "2.6.0-rc3",
"private": true,
"scripts": {
"dev": "vite",
Expand All @@ -13,11 +13,11 @@
"dependencies": {
"@mdi/font": "^7.2.96",
"@sentry/vue": "^8.19.0",
"@threefold/graphql_client": "2.6.0-rc2",
"@threefold/grid_client": "2.6.0-rc2",
"@threefold/gridproxy_client": "2.6.0-rc2",
"@threefold/monitoring": "2.6.0-rc2",
"@threefold/types": "2.6.0-rc2",
"@threefold/graphql_client": "2.6.0-rc3",
"@threefold/grid_client": "2.6.0-rc3",
"@threefold/gridproxy_client": "2.6.0-rc3",
"@threefold/monitoring": "2.6.0-rc3",
"@threefold/types": "2.6.0-rc3",
"@types/ip": "^1.1.3",
"@types/md5": "^2.3.5",
"await-lock": "^2.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/playground-charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v2.6.0-rc2"
appVersion: "v2.6.0-rc3"
2 changes: 1 addition & 1 deletion packages/playground/playground-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: ghcr.io/threefoldtech/playground
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "2.6.0-rc2"
tag: "2.6.0-rc3"

env:
- name: "MODE"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/caprover_worker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 35 characters.', 35),
]"
:value="$props.modelValue.name"
#="{ props }"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/k8s_worker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
validators.minLength('Name minimum length is 2 chars.', 2),
validators.maxLength('Name max length is 50 chars.', 50),
validators.maxLength('Name max length is 35 chars.', 35),
]"
#="{ props }"
>
Expand Down
10 changes: 7 additions & 3 deletions packages/playground/src/components/manage_gateway_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,18 @@ export default {
gateways.value = [];
gatewaysToDelete.value = [];
loadingGateways.value = true;
failedToListGws.value = [];
errorMessage.value = "";
updateGrid(grid, { projectName: props.vm ? props.vm.projectName : props.k8s!.projectName });
const { gateways: gws, failedToList } = await loadDeploymentGateways(grid, {
filter: gw => true,
});
gateways.value = gws;
failedToListGws.value = failedToList;
if (failedToListGws.value.length) {
if (failedToList.length != 0) {
failedToListGws.value = failedToList;
errorMessage.value = `Failed to list ${failedToListGws.value.length} domains`;
}
} catch (error) {
Expand Down Expand Up @@ -473,7 +477,7 @@ export default {
validators.isAlphanumeric("Subdomain should consist of letters and numbers only."),
(subdomain: string) => validators.isAlpha("Subdomain must start with an alphabet char.")(subdomain[0]),
validators.minLength("Subdomain must be at least 4 characters.", 4),
(subdomain: string) => validators.maxLength("Subdomain cannot exceed 50 characters.", 50)(subdomain),
(subdomain: string) => validators.maxLength("Subdomain cannot exceed 35 characters.", 35)(subdomain),
];
const portRules = [validators.required("Port is required."), validators.isPort("Please provide a valid port.")];
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/views/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
validators.required('Query timeout is required.'),
validators.isInt('Timeout must be a valid integer.'),
validators.min(`Query timeout should be at least 3 second.`, 3),
validators.max('Query timeout maximum limit exceeded', 3 * 60),
validators.max('Query timeout maximum limit is 180 seconds', 3 * 60),
]"
#="{ props }"
ref="timeoutQueryInput"
Expand Down Expand Up @@ -145,7 +145,7 @@
validators.required('Deployment timeout is required.'),
validators.isInt('Timeout must be a valid integer.'),
validators.min(`Deployment timeout should be at least 3 second.`, 3),
validators.max('Deployment timeout maximum limit exceeded', 30 * 60),
validators.max('Deployment timeout maximum limit is 1800 seconds', 30 * 60),
]"
#="{ props }"
ref="timeoutDeploymentInput"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/freeflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
validators.required('Name is required.'),
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
validators.minLength('Name must be at least 4 characters.', 4),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/weblets/full_vm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 35 characters.', 35),
]"
#="{ props }"
>
Expand Down Expand Up @@ -104,7 +104,7 @@
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Disk name minimum length is 2 characters.', 2),
validators.isAlphanumeric('Disk name only accepts alphanumeric characters.'),
validators.maxLength('Disk name maximum length is 50 characters.', 50),
validators.maxLength('Disk name maximum length is 35 characters.', 35),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/jenkins.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/weblets/micro_vm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 35 characters.', 35),
]"
#="{ props }"
>
Expand Down Expand Up @@ -130,7 +130,7 @@
}),
validators.minLength('Disk name minimum length is 2 characters.', 2),
validators.isAlphanumeric('Disk name only accepts alphanumeric characters.'),
validators.maxLength('Disk name maximum length is 50 characters.', 50),
validators.maxLength('Disk name maximum length is 35 characters.', 35),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_algorand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 35 characters.', 35),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_casperlabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_discourse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_domains.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
validators.isAlphanumeric('Subdomain should consist of letters and numbers only.'),
subdomain => validators.isAlpha('Subdomain must start with alphabet char.')(subdomain[0]),
validators.minLength('Subdomain must be at least 4 characters.', 4),
subdomain => validators.maxLength('Subdomain cannot exceed 50 characters.', 50)(subdomain),
subdomain => validators.maxLength('Subdomain cannot exceed 35 characters.', 35)(subdomain),
]"
:async-rules="[validateSubdomain]"
#="{ props }"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_funkwhale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_jitsi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
name => validators.isAlpha('Name must start with alphabet char.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_kubernetes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
validators.minLength('Name minimum length is 2 chars.', 2),
validators.maxLength('Name max length is 50 chars.', 50),
validators.maxLength('Name max length is 35 chars.', 35),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_mattermost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_nextcloud.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
validators.IsAlphanumericExpectUnderscore('Name should consist of letters ,numbers and underscores only.'),
(name: string) => validators.isAlpha('Name must start with an alphabetical character.')(name[0]),
validators.minLength('Name must be at least 2 characters.', 2),
validators.maxLength('Name cannot exceed 50 characters.', 50),
validators.maxLength('Name cannot exceed 15 characters.', 15),
]"
#="{ props }"
>
Expand Down
Loading

0 comments on commit 0d6cd29

Please sign in to comment.