Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Apr 4, 2024
1 parent 99f1f24 commit b870724
Show file tree
Hide file tree
Showing 3 changed files with 580 additions and 592 deletions.
16 changes: 8 additions & 8 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
"preview": "vite preview"
},
"dependencies": {
"antd": "^5.13.2",
"axios": "^1.6.7",
"antd": "^5.16.0",
"axios": "^1.6.8",
"pretty-bytes": "^6.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@vitejs/plugin-react-swc": "^3.5.0",
"prettier": "^3.2.4",
"typescript": "^5.3.3",
"vite": "^5.0.12"
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24",
"@vitejs/plugin-react-swc": "^3.6.0",
"prettier": "^3.2.5",
"typescript": "^5.4.3",
"vite": "^5.2.8"
}
}
12 changes: 8 additions & 4 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const addToFileTreeView = (
downloadIcon = (
<a
className="download"
href={`/api/file?digest=${layer.digest}&mediaType=${layer.mediaType}&file=${item.key}`}
href={`./api/file?digest=${layer.digest}&mediaType=${layer.mediaType}&file=${item.key}`}
>
{getDownloadIcon()}
</a>
Expand Down Expand Up @@ -467,6 +467,10 @@ interface App {
}
const amd64Arch = "amd64";
const arm64Arch = "arm64";
const request = axios.create({
timeout: 600 * 1000,
baseURL: "./api",
});

class App extends Component {
constructor(props: any) {
Expand Down Expand Up @@ -497,7 +501,7 @@ class App extends Component {
if (this.state.imageName) {
this.onSearch(this.state.imageName);
}
const { data } = await axios.get<LatestImages>("/api/latest-images", {
const { data } = await request.get<LatestImages>("/latest-images", {
timeout: 5 * 1000,
});
this.setState({
Expand All @@ -521,11 +525,11 @@ class App extends Component {
loading: true,
});
try {
let url = `/api/analyze?image=${image}`;
let url = `/analyze?image=${image}`;
if (!/^(file|docker):\/\//.test(image) && arch) {
url += `?arch=${arch}`;
}
const { data } = await axios.get<ImageAnalyzeResult>(url, {
const { data } = await request.get<ImageAnalyzeResult>(url, {
timeout: 10 * 60 * 1000,
});
// 为每个file tree item增加key
Expand Down
Loading

0 comments on commit b870724

Please sign in to comment.