Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
"used_percent": 1
},
"network": {
"download_rate": 1000,
"download_rate_limit": 4000,
"rx_bandwidth": 1000,
"max_rx_bandwidth": 4000,
"idc": "HangZhou",
"location": "HangZhou",
"tcp_connection_count": 2,
"upload_rate": 1000,
"upload_rate_limit": 20000,
"tx_bandwidth": 1000,
"max_tx_bandwidth": 20000,
"upload_tcp_connection_count": 4
},
"os": "ios",
Expand Down Expand Up @@ -152,13 +152,13 @@
"used_percent": 1
},
"network": {
"download_rate": 1000,
"download_rate_limit": 4000,
"rx_bandwidth": 1000,
"max_rx_bandwidth": 4000,
"idc": "HangZhou",
"location": "HangZhou",
"tcp_connection_count": 2,
"upload_rate": 1000,
"upload_rate_limit": 20000,
"tx_bandwidth": 1000,
"max_tx_bandwidth": 20000,
"upload_tcp_connection_count": 4
},
"os": "ios",
Expand Down Expand Up @@ -234,13 +234,13 @@
"used_percent": 1
},
"network": {
"download_rate": 1000,
"download_rate_limit": 4000,
"rx_bandwidth": 1000,
"max_rx_bandwidth": 4000,
"idc": "HangZhou",
"location": "HangZhou",
"tcp_connection_count": 2,
"upload_rate": 1000,
"upload_rate_limit": 20000,
"tx_bandwidth": 1000,
"max_tx_bandwidth": 20000,
"upload_tcp_connection_count": 4
},
"os": "Linux",
Expand Down Expand Up @@ -316,13 +316,13 @@
"used_percent": 1
},
"network": {
"download_rate": 1000,
"download_rate_limit": 4000,
"rx_bandwidth": 1000,
"max_rx_bandwidth": 4000,
"idc": "HangZhou",
"location": "HangZhou",
"tcp_connection_count": 2,
"upload_rate": 1000,
"upload_rate_limit": 20000,
"tx_bandwidth": 1000,
"max_tx_bandwidth": 20000,
"upload_tcp_connection_count": 4
},
"os": "ios",
Expand Down Expand Up @@ -398,13 +398,13 @@
"used_percent": 1
},
"network": {
"download_rate": 1000,
"download_rate_limit": 4000,
"rx_bandwidth": 1000,
"max_rx_bandwidth": 4000,
"idc": "HangZhou",
"location": "HangZhou",
"tcp_connection_count": 2,
"upload_rate": 1000,
"upload_rate_limit": 20000,
"tx_bandwidth": 1000,
"max_tx_bandwidth": 20000,
"upload_tcp_connection_count": 4
},
"os": "ios",
Expand Down Expand Up @@ -480,13 +480,13 @@
"used_percent": 1
},
"network": {
"download_rate": 1000,
"download_rate_limit": 4000,
"rx_bandwidth": 1000,
"max_rx_bandwidth": 4000,
"idc": "HangZhou",
"location": "HangZhou",
"tcp_connection_count": 2,
"upload_rate": 1000,
"upload_rate_limit": 20000,
"tx_bandwidth": 1000,
"max_tx_bandwidth": 20000,
"upload_tcp_connection_count": 4
},
"os": "ios",
Expand Down
16 changes: 8 additions & 8 deletions cypress/fixtures/resource/task/image-manifest-url-task.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
"ip": "172.18.0.4",
"hostname": "kind-worker1",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1ffc4b5459e82dc8e7ddd1d1a2ec469e85a1f076090c22851a1f2ce6f71e1a6?format=json"
},
Expand All @@ -38,7 +38,7 @@
{
"ip": "172.18.0.4",
"hostname": "kind-worker2",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1f1039835051ecc04909f939530e86a20f02d2ce5ad7a81c0fa3616f7303944"
},
Expand All @@ -51,7 +51,7 @@
{
"ip": "172.18.0.4",
"hostname": "kind-worker3",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1ffc4b5459e82dc8e7ddd1d1a2ec469e85a1f076090c22851a1f2ce6f71e1a6"
},
Expand All @@ -64,7 +64,7 @@
{
"ip": "172.18.0.4",
"hostname": "kind-worker4",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1f1039835051ecc04909f939530e86a20f02d2ce5ad7a81c0fa3616f7303944"
},
Expand All @@ -77,7 +77,7 @@
{
"ip": "172.18.0.4",
"hostname": "kind-worker5",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1ffc4b5459e82dc8e7ddd1d1a2ec469e85a1f076090c22851a1f2ce6f71e1a6"
},
Expand All @@ -90,7 +90,7 @@
{
"ip": "172.18.0.4",
"hostname": "kind-worker6",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1f1039835051ecc04909f939530e86a20f02d2ce5ad7a81c0fa3616f7303944"
},
Expand All @@ -103,7 +103,7 @@
{
"ip": "172.18.0.3",
"hostname": "kind-worker7",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1f1039835051ecc04909f939530e86a20f02d2ce5ad7a81c0fa3616f7303944"
},
Expand All @@ -116,7 +116,7 @@
{
"ip": "172.18.0.3",
"hostname": "kind-worker8",
"layers": [
"cached_layers": [
{
"url": "https://ghcr.io/v2/dragonflyoss/scheduler/blobs/sha256:f1f1039835051ecc04909f939530e86a20f02d2ce5ad7a81c0fa3616f7303944"
},
Expand Down
8 changes: 4 additions & 4 deletions src/components/resource/task/clear/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type Image = {
type OriginalPeer = {
ip: string;
hostname: string;
layers: Layers[];
cached_layers: Layers[];
scheduler_cluster_id?: number;
};

Expand All @@ -117,7 +117,7 @@ const transformImages = (images: createGetImageDistributionJobResponse): Transfo
const cleanedPeer = {
ip: peer.ip,
hostname: peer.hostname,
layers: peer.layers,
cached_layers: peer.cached_layers,
};

clusters.get(clusterId)!.push(cleanedPeer);
Expand Down Expand Up @@ -1478,7 +1478,7 @@ export default function Clear() {
fontFamily="mabry-bold"
className={styles.bolbProportionText}
>
{`${((items?.layers?.length / layer) * 100).toFixed(2) || 0}%`}
{`${((items?.cached_layers?.length / layer) * 100).toFixed(2) || 0}%`}
</Typography>
</Box>
</Box>
Expand All @@ -1500,7 +1500,7 @@ export default function Clear() {
</Typography>
</Box>
<Box className={styles.cardCantainer}>
{items?.layers.map((item: any, bolbIndex: any) => (
{items?.cached_layers.map((item: any, bolbIndex: any) => (
<Box key={bolbIndex} className={styles.urlsWrapper}>
<Tooltip title={extractSHA256Regex(item?.url || '-') || '-'} placement="top">
<Typography
Expand Down
10 changes: 5 additions & 5 deletions src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ interface layers {
interface ImageDistributionpeers {
ip: string;
hostname: string;
layers: layers[];
cached_layers: layers[];
scheduler_cluster_id: number;
}

Expand Down Expand Up @@ -1186,13 +1186,13 @@ export interface persistentCacheTasksPeersResponse {
used_percent: number;
};
network: {
download_rate: number;
download_rate_limit: number;
rx_bandwidth: number;
max_rx_bandwidth: number;
idc: string;
location: string;
tcp_connection_count: number;
upload_rate: number;
upload_rate_limit: number;
tx_bandwidth: number;
max_tx_bandwidth: number;
upload_tcp_connection_count: number;
};
os: string;
Expand Down