2 Commits

2 changed files with 15 additions and 1 deletions

View File

@@ -42,6 +42,11 @@ pub fn delete_update(platform: OTAPlatform, version: &semver::Version) -> anyhow
pub fn get_ota_updates_for_platform(platform: OTAPlatform) -> anyhow::Result<Vec<OTAUpdate>> {
let ota_path = AppConfig::get().ota_platform_dir(platform);
// Check if the directory dedicated to the updates of the platform exists
if !ota_path.is_dir() {
return Ok(Vec::new());
}
let mut out = Vec::new();
for e in std::fs::read_dir(ota_path)? {

View File

@@ -14,6 +14,7 @@ import {
TableHead,
TableRow,
Tooltip,
Typography,
} from "@mui/material";
import { filesize } from "filesize";
import React from "react";
@@ -141,6 +142,14 @@ function _OTAList(p: {
}
};
if (p.list.length === 0) {
return (
<Typography>
There is no OTA update uploaded on the platform yet.
</Typography>
);
}
return (
<>
{deployUpdate && (
@@ -150,7 +159,7 @@ function _OTAList(p: {
/>
)}
<TableContainer component={Paper}>
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<Table sx={{ minWidth: 650 }} aria-label="list of updates">
<TableHead>
<TableRow>
<TableCell align="center">Platform</TableCell>