Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development_2.6' into dev_add_ip…
Browse files Browse the repository at this point in the history
…_validation
  • Loading branch information
amiraabouhadid committed Jun 11, 2024
2 parents e737582 + ce6cb3b commit f86e92e
Show file tree
Hide file tree
Showing 52 changed files with 301 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Full Clients Build

on:
push:
branches: [development, development_314]
branches: [development, development_2.6]
pull_request:
branches: [development, development_314]
branches: [development, development_2.6]

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/grid_client_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'qa' }}
with:
ref: refs/tags/v2.3.5
ref: refs/tags/v2.4.3
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'test' }}
with:
ref: refs/tags/v2.3.5
ref: refs/tags/v2.4.3
- uses: actions/checkout@v4
if: ${{ env.NETWORK == 'main' }}
with:
ref: refs/tags/v2.3.5
ref: refs/tags/v2.4.3

- name: Set up node 18
uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Full Clients Lint

on:
push:
branches: [development, development_314]
branches: [development, development_2.6]
pull_request:
branches: [development, development_314]
branches: [development, development_2.6]

jobs:
lint:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mass_deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: refs/tags/v2.4.3
- name: Set up node 18
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/playground_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
push:
branches:
- development
- development_314
- development_2.6
paths:
- "packages/playground/**"
pull_request:
branches:
- development
- development_314
- development_2.6
paths:
- "packages/playground/**"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stats_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ name: Stats Build

on:
push:
branches: [development, development_314]
branches: [development, development_2.6]
paths:
- "packages/stats/**"
pull_request:
branches: [development, development_314]
branches: [development, development_2.6]
paths:
- "packages/stats/**"

Expand Down
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.5.0-rc1",
"version": "2.5.0-rc2",
"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.5.0-rc1",
"version": "2.5.0-rc2",
"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,14 +1,14 @@
{
"name": "@threefold/graphql_client",
"version": "2.5.0-rc1",
"version": "2.5.0-rc2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@threefold/types": "^2.5.0-rc1",
"@threefold/types": "^2.5.0-rc2",
"ts-mixer": "^6.0.2"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 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.5.0-rc1",
"version": "2.5.0-rc2",
"license": "ISC",
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/tree/development/packages/grid_client/README.md",
"repository": {
Expand All @@ -14,9 +14,9 @@
"dependencies": {
"@jimber/pkid": "1.0.4",
"@noble/secp256k1": "^1.7.1",
"@threefold/rmb_direct_client": "^2.5.0-rc1",
"@threefold/tfchain_client": "^2.5.0-rc1",
"@threefold/types": "^2.5.0-rc1",
"@threefold/rmb_direct_client": "^2.5.0-rc2",
"@threefold/tfchain_client": "^2.5.0-rc2",
"@threefold/types": "^2.5.0-rc2",
"algosdk": "^1.19.0",
"appdata-path": "^1.0.0",
"await-lock": "^2.2.2",
Expand Down
58 changes: 58 additions & 0 deletions packages/grid_client/tests/modules/zmount.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { Zmount } from "../../src";

let zmount: Zmount;

beforeEach(() => {
zmount = new Zmount();
});
describe("Zmount module", () => {
test("Zmount instance is of type Zmount.", () => {
expect(zmount).toBeInstanceOf(Zmount);
});

test("Min value for size.", () => {
const size = 100 * 1025 ** 2;

zmount.size = size;

const result = () => zmount.challenge();

expect(result).toThrow();
});

test("Max value for size.", () => {
const size = 100 * 1025 ** 4;

zmount.size = size;

const result = () => zmount.challenge();

expect(result).toThrow();
});

test("Size doesn't accept decimal value.", () => {
const size = 1.5;

zmount.size = size;

const result = () => zmount.challenge();

expect(result).toThrow();
});

test("Size empty value.", () => {
const result = () => zmount.challenge();

expect(result).toThrow();
});

test("Size negative value.", () => {
const negative_size = -1;

zmount.size = negative_size;

const result = () => zmount.challenge();

expect(result).toThrow();
});
});
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.5.0-rc1",
"version": "2.5.0-rc2",
"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.5.0-rc1",
"@threefold/grid_client": "^2.5.0-rc2",
"express": "^4.18.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.5.0-rc1",
"version": "2.5.0-rc2",
"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.5.0-rc1",
"@threefold/rmb_peer_server": "^2.5.0-rc1",
"@threefold/grid_client": "^2.5.0-rc2",
"@threefold/rmb_peer_server": "^2.5.0-rc2",
"typescript": "^4.7.4"
},
"devDependencies": {
"@threefold/rmb_peer_client": "^2.5.0-rc1",
"@threefold/rmb_peer_client": "^2.5.0-rc2",
"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.5.0-rc1",
"version": "2.5.0-rc2",
"description": "gridproxy_client help to interact with gridproxy based on network",
"main": "dist/public_api.js",
"types": "dist/public_api.d.ts",
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.5.0-rc1",
"version": "2.5.0-rc2",
"description": "Threefold monitoring package",
"license": "Apache-2.0",
"main": "dist/index.js",
Expand All @@ -16,9 +16,9 @@
"access": "public"
},
"dependencies": {
"@threefold/rmb_direct_client": "^2.5.0-rc1",
"@threefold/tfchain_client": "^2.5.0-rc1",
"@threefold/types": "^2.5.0-rc1",
"@threefold/rmb_direct_client": "^2.5.0-rc2",
"@threefold/tfchain_client": "^2.5.0-rc2",
"@threefold/types": "^2.5.0-rc2",
"axios": "^0.27.2",
"chalk": "4.1.2",
"ts-node": "^10.9.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@threefold/playground",
"version": "2.5.0-rc1",
"version": "2.5.0-rc2",
"private": true,
"scripts": {
"dev": "vite",
Expand All @@ -12,10 +12,10 @@
},
"dependencies": {
"@mdi/font": "^7.2.96",
"@threefold/graphql_client": "^2.5.0-rc1",
"@threefold/grid_client": "^2.5.0-rc1",
"@threefold/gridproxy_client": "^2.5.0-rc1",
"@threefold/types": "^2.5.0-rc1",
"@threefold/graphql_client": "^2.5.0-rc2",
"@threefold/grid_client": "^2.5.0-rc2",
"@threefold/gridproxy_client": "^2.5.0-rc2",
"@threefold/types": "^2.5.0-rc2",
"@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.5.0-rc1"
appVersion: "v2.5.0-rc2"
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.5.0-rc1"
tag: "2.5.0-rc2"

env:
- name: "MODE"
Expand Down
11 changes: 9 additions & 2 deletions packages/playground/src/calculator/pricing_calculator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@
</p>
</input-tooltip>
</div>
<section class="card mt-5" v-if="priceTask.data?.dedicatedPackage.package !== 'gold'">

<section
class="card mt-5"
v-if="!priceTask.loading && priceTask.data?.dedicatedPackage.package !== 'gold'"
>
<p class="card-info pa-2">
<b>Too expensive?</b> can upgrade to <b>Gold package</b> to get discount up to 60% when you fund your
wallet with <b>{{ dedicatedUpgradePrice }}</b> TFT
Expand All @@ -198,7 +202,10 @@
</p>
</input-tooltip>
</div>
<section class="card mt-5 pa-2" v-if="priceTask.data?.sharedPackage.package !== 'gold'">
<section
class="card mt-5 pa-2"
v-if="!priceTask.loading && priceTask.data?.sharedPackage.package !== 'gold'"
>
<p class="card-info">
<b>Too expensive?</b> can upgrade to <b>Gold package</b> to get discount up to 60% when you fund your
wallet with <b>{{ sharedUpgradePrice }}</b> TFT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
show-select
@update:page="updatePage"
@update:items-per-page="updateSize"
@update:sort-by="updateSortBy"
>
<template #[`item.nodeId`]="{ item }">
<span v-if="['node', 'rent'].includes(item.type)">{{ item.details.nodeId }}</span>
Expand All @@ -41,7 +42,7 @@
<p v-else>No Data Available</p>
</template>

<template #[`item.farmId`]="{ item }">
<template #[`item.farm_id`]="{ item }">
<span v-if="['node', 'rent'].includes(item.type)">
{{ item.details.farm_id ? item.details.farm_id : "-" }}
</span>
Expand Down Expand Up @@ -352,7 +353,13 @@ const isNodeInRentContracts = computed(() => {
return false;
});
const emits = defineEmits(["update:deleted-contracts", "update:unlock-contracts", "update:page", "update:size"]);
const emits = defineEmits([
"update:deleted-contracts",
"update:unlock-contracts",
"update:page",
"update:size",
"update:sort",
]);
function updatePage(page: number) {
emits("update:page", page);
Expand All @@ -362,6 +369,10 @@ function updateSize(size: number) {
emits("update:size", size);
}
function updateSortBy(sort: { key: string; order: "asc" | "desc" }[]) {
emits("update:sort", sort);
}
const layout = ref();
const contractLocked = ref<ContractLock>();
const deleting = ref<boolean>(false);
Expand Down
4 changes: 3 additions & 1 deletion packages/playground/src/components/manage_gateway_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ export default {
loadingGateways.value = true;
updateGrid(grid, { projectName: props.vm.projectName });
const { gateways: gws, failedToList } = await loadDeploymentGateways(grid!);
const { gateways: gws, failedToList } = await loadDeploymentGateways(grid!, {
filter: gw => gw.backends.some(bk => bk.includes(ip)),
});
gateways.value = gws;
failedToListGws.value = failedToList;
} catch (error) {
Expand Down
Loading

0 comments on commit f86e92e

Please sign in to comment.