Skip to content

Commit

Permalink
Merge branch 'development' into development_zos4
Browse files Browse the repository at this point in the history
  • Loading branch information
maayarosama committed Dec 8, 2024
2 parents 0215009 + 08b50d4 commit 061df42
Show file tree
Hide file tree
Showing 37 changed files with 221 additions and 119 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",
"version": "2.6.1",
"npmClient": "yarn"
}
4 changes: 2 additions & 2 deletions 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",
"version": "2.6.1",
"private": false,
"main": "dist/threefold-ui.umd.js",
"publishConfig": {
Expand All @@ -20,7 +20,7 @@
"dependencies": {
"@polkadot/keyring": "^12.4.2",
"@threefold/extension_api": "^0.0.1-rc6",
"axios": "1.7.4",
"axios": "1.7.8",
"buffer": "^6.0.3",
"crypto-js": "^4.2.0",
"html-parsed-element": "^0.4.1",
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",
"version": "2.6.1",
"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",
"@threefold/types": "^2.6.1",
"ts-mixer": "^6.0.2"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 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",
"version": "2.6.1",
"license": "ISC",
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/tree/development/packages/grid_client/README.md",
"repository": {
Expand All @@ -14,11 +14,11 @@
"dependencies": {
"@jimber/pkid": "1.0.4",
"@noble/secp256k1": "^1.7.1",
"@threefold/gridproxy_client": "2.6.0",
"@threefold/monitoring": "2.6.0",
"@threefold/rmb_direct_client": "2.6.0",
"@threefold/tfchain_client": "2.6.0",
"@threefold/types": "2.6.0",
"@threefold/gridproxy_client": "^2.6.1",
"@threefold/monitoring": "^2.6.1",
"@threefold/rmb_direct_client": "^2.6.1",
"@threefold/tfchain_client": "^2.6.1",
"@threefold/types": "^2.6.1",
"algosdk": "^1.19.0",
"appdata-path": "^1.0.0",
"await-lock": "^2.2.2",
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",
"version": "2.6.1",
"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",
"@threefold/grid_client": "^2.6.1",
"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",
"version": "2.6.1",
"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",
"@threefold/rmb_peer_server": "2.6.0",
"@threefold/grid_client": "^2.6.1",
"@threefold/rmb_peer_server": "^2.6.1",
"typescript": "^4.7.4"
},
"devDependencies": {
"@threefold/rmb_peer_client": "2.6.0",
"@threefold/rmb_peer_client": "^2.6.1",
"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",
"version": "2.6.1",
"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",
"version": "2.6.1",
"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",
"@threefold/tfchain_client": "2.6.0",
"@threefold/types": "2.6.0",
"@threefold/rmb_direct_client": "^2.6.1",
"@threefold/tfchain_client": "^2.6.1",
"@threefold/types": "^2.6.1",
"chalk": "4.1.2",
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
Expand Down
13 changes: 7 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",
"version": "2.6.1",
"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",
"@threefold/grid_client": "2.6.0",
"@threefold/gridproxy_client": "2.6.0",
"@threefold/monitoring": "2.6.0",
"@threefold/types": "2.6.0",
"@threefold/graphql_client": "^2.6.1",
"@threefold/grid_client": "^2.6.1",
"@threefold/gridproxy_client": "^2.6.1",
"@threefold/monitoring": "^2.6.1",
"@threefold/types": "^2.6.1",
"@types/ip": "^1.1.3",
"@types/md5": "^2.3.5",
"await-lock": "^2.2.2",
Expand All @@ -41,6 +41,7 @@
"mosha-vue-toastify": "^1.0.23",
"pinia": "^2.0.32",
"qrcode": "^1.5.1",
"url-join": "^5.0.0",
"validator": "^13.9.0",
"vue": "^3.2.47",
"vue-chartjs": "^5.2.0",
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"
appVersion: "v2.6.1"
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"
tag: "2.6.1"

env:
- name: "MODE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ export default {
downloadSpeed: format(node.download_speed),
uploadSpeed: format(node.upload_speed),
}));
if (array.length === 0) {
console.error("Empty array returned from the IPerf test");
throw new Error("Can't get the test results, please try again later.");
}
IperfDetails.value = array;
return IperfDetails.value;
};
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/stores/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const useStatsStore = defineStore("stats-store", () => {
const data = computed(() => res.value.data);
const stats = computed(() => [
{
label: "Capacity",
value: data.value?.capacity,
label: "SSD Capacity",
value: data.value?.ssd,
image: "capacity.png",
},
{
Expand Down
18 changes: 18 additions & 0 deletions packages/playground/src/utils/format_resource_size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,21 @@ function toFixedTwo(val: number) {
function formatSpeed(val: number) {
return Math.round(val);
}

export function toTeraOrGigaStats(sizeInBytes: number) {
const giga = 1024 ** 3;

if (!sizeInBytes) return "0 GB";

const val = +sizeInBytes;
if (val === 0 || isNaN(val)) return "0 GB";

const gb = val / giga;

if (gb < 100) {
return gb.toFixed(2) + " GB";
}

const tb = gb / 1024;
return tb.toFixed(2) + " TB";
}
34 changes: 19 additions & 15 deletions packages/playground/src/utils/manual.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
const BASE = window.env.MANUAL_URL;
import urlJoin from "url-join";

const BASE = window.env.MANUAL_URL;
export const manual = {
dedicated_machines: `${BASE}/documentation/dashboard/deploy/node_finder.html#dedicated-nodes`,
tft_bridges: `${BASE}/documentation/threefold_token/tft_bridges/tft_bridges.html`,
buy_sell_tft: `${BASE}/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html`,
farmers: `${BASE}/documentation/farmers/farmers.html`,
governance: `${BASE}/documentation/dashboard/tfchain/tf_dao.html`,
pricing: `${BASE}/knowledge_base/cloud/pricing/pricing.html`,
dao: `${BASE}/documentation/dashboard/tfchain/tf_dao.html`,
caprover: `${BASE}/documentation/dashboard/solutions/caprover.html`,
tf_connect_app: `${BASE}/documentation/threefold_token/storing_tft/tf_connect_app.html`,
contract_locking: `${BASE}/documentation/developers/tfchain/tfchain.html#contract-locking`,
billing_pricing: `${BASE}/documentation/dashboard/deploy/node_finder.html#billing--pricing`,
discount_levels: `${BASE}/knowledge_base/cloud/pricing/pricing.html#staking-discount`,
tfchain_stellar_bridge: `${BASE}/documentation/threefold_token/tft_bridges/tfchain_stellar_bridge.html`,
minting_receipts: `${BASE}/documentation/farmers/3node_building/minting_receipts.html`,
dedicated_machines: urlJoin(BASE, "/documentation/dashboard/deploy/node_finder.html#dedicated-nodes"),
tft_bridges: urlJoin(BASE, "/documentation/threefold_token/tft_bridges/tft_bridges.html"),
buy_sell_tft: urlJoin(BASE, "/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html"),
farmers: urlJoin(BASE, "/documentation/farmers/farmers.html"),
governance: urlJoin(BASE, "/documentation/dashboard/tfchain/tf_dao.html"),
pricing: urlJoin(BASE, "/knowledge_base/cloud/pricing/pricing.html"),
dao: urlJoin(BASE, "/documentation/dashboard/tfchain/tf_dao.html"),
caprover: urlJoin(BASE, "/documentation/dashboard/solutions/caprover.html"),
tf_connect_app: urlJoin(BASE, "/documentation/threefold_token/storing_tft/tf_connect_app.html"),
tf_connect_wallet: urlJoin(BASE, "/documentation/dashboard/wallet_connector.html"),
contract_locking: urlJoin(BASE, "/documentation/developers/tfchain/tfchain.html#contract-locking"),
billing_pricing: urlJoin(BASE, "/documentation/dashboard/deploy/node_finder.html#billing--pricing"),
discount_levels: urlJoin(BASE, "/knowledge_base/cloud/pricing/pricing.html#staking-discount"),
tfchain_stellar_bridge: urlJoin(BASE, "/documentation/threefold_token/tft_bridges/tfchain_stellar_bridge.html"),
minting_receipts: urlJoin(BASE, "/documentation/farmers/3node_building/minting_receipts.html"),
minting_process: urlJoin(BASE, "/documentation/farmers/farming_optimization/minting_process.html"),
minting_reports: urlJoin(BASE, "/documentation/dashboard/tfchain/tf_minting_reports.html"),
};
14 changes: 2 additions & 12 deletions packages/playground/src/views/minting_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,10 @@
</v-card>
<v-alert class="mb-4 text-subtitle-2 font-weight-regular" type="info" variant="tonal">
For more information about minting check
<a
class="app-link font-weight-medium"
target="_blank"
href="https://www.manual.grid.tf/documentation/faq/faq.html#what-is-the-tft-minting-process-is-it-fully-automated"
>TFT minting process.
</a>
<a class="app-link font-weight-medium" target="_blank" :href="manual.minting_process">TFT minting process. </a>
<br />
The user can verify the 3Nodes' payments on Stellar Blockchain through the Threefold's
<a
class="app-link font-weight-medium"
target="_blank"
href="https://www.manual.grid.tf/documentation/dashboard/tfchain/tf_minting_reports.html"
>minting tool.
</a>
<a class="app-link font-weight-medium" target="_blank" :href="manual.minting_reports">minting tool. </a>
<br />
TFT minting address on Stellar Chain:
<a
Expand Down
13 changes: 3 additions & 10 deletions packages/playground/src/views/stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@
</v-col>
<v-col v-if="Istats.length !== 0" cols="12" md="4">
<v-row>
<v-col
v-for="(item, index) of Istats"
:key="item.title"
:cols="index === Istats.length - 1 ? 12 : 6"
:md="index === Istats.length - 1 ? 12 : 6"
class="d-flex flex-grow-1"
>
<v-col v-for="item of Istats" :key="item.title" :cols="6" :md="6" class="d-flex flex-grow-1">
<StatisticsCard :item="item" />
</v-col>
</v-row>
Expand All @@ -50,7 +44,7 @@
import { NodeStatus, type Stats as GridProxyStats } from "@threefold/gridproxy_client";
import { onMounted, ref } from "vue";
import formatResourceSize from "@/utils/format_resource_size";
import formatResourceSize, { toTeraOrGigaStats } from "@/utils/format_resource_size";
import { gridProxyClient } from "../clients";
import StatisticsCard from "../components/statistics_card.vue";
Expand Down Expand Up @@ -140,8 +134,7 @@ const fetchData = async () => {
{ data: stats!.farms, title: "Farms", icon: "mdi-tractor" },
{ data: stats!.countries, title: "Countries", icon: "mdi-earth" },
{ data: stats!.totalCru, title: "CPUs", icon: "mdi-cpu-64-bit" },
{ data: formatResourceSize(stats!.totalSru), title: "SSD Storage", icon: "mdi-nas" },
{ data: formatResourceSize(stats!.totalHru), title: "HDD Storage", icon: "mdi-harddisk" },
{ data: toTeraOrGigaStats(stats!.totalSru), title: "SSD Storage", icon: "mdi-nas" },
{ data: formatResourceSize(stats!.totalMru), title: "RAM", icon: "mdi-memory" },
{ data: stats!.gpus, title: "GPUs", icon: "mdi-memory" },
{ data: stats!.accessNodes, title: "Access Nodes", icon: "mdi-gate" },
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/profile_manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<v-alert variant="tonal" class="mb-6">
<p :style="{ maxWidth: '880px' }">
Please visit
<a class="app-link" :href="manual.tf_connect_app" target="_blank"> the manual </a>
<a class="app-link" :href="manual.tf_connect_wallet" target="_blank"> the manual </a>
get started.
</p>
</v-alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class DashboardPage:
email_login_label = (By.XPATH, "//label[text()='Email']/following-sibling::input")
id_login_label = (By.XPATH, "//label[text()='Twin ID']/following-sibling::input")
address_login_label = (By.XPATH, "//label[text()='Address']/following-sibling::input")
capacity_stats = (By.XPATH, '/html/body/div[1]/div/div/main/div/div[2]/div/div/div[2]/div[2]/div[2]/div[1]/div/div[3]/p[1]')
nodes_stats = (By.XPATH, '/html/body/div[1]/div/div/main/div/div[2]/div/div/div[2]/div[2]/div[2]/div[2]/div/div[3]/p[1]')
countries_stats = (By.XPATH, '/html/body/div[1]/div/div/main/div/div[2]/div/div/div[2]/div[2]/div[2]/div[3]/div/div[3]/p[1]')
cores_stats = (By.XPATH, '/html/body/div[1]/div/div/main/div/div[2]/div/div/div[2]/div[2]/div[2]/div[4]/div/div[3]/p[1]')
capacity_stats = (By.XPATH, "//p[contains(@class, 'text-center') and following-sibling::p[text()='Capacity']]")
nodes_stats = (By.XPATH, "//p[contains(@class, 'text-center') and following-sibling::p[text()='Nodes']]")
countries_stats = (By.XPATH, "//p[contains(@class, 'text-center') and following-sibling::p[text()='Countries']]")
cores_stats = (By.XPATH, "//p[contains(@class, 'text-center') and following-sibling::p[text()='Cores']]")
profile_button = (By.XPATH, '/html/body/div[1]/div/div/main/header[1]/div/div[3]/i')
profile_label = (By.XPATH, '/html/body/div[1]/div/div/main/div/div[2]/div/div/div/div[1]/div/div[1]')
qr_code_img = (By.XPATH, "//img[@alt='qrcode']")
Expand Down
Loading

0 comments on commit 061df42

Please sign in to comment.