fix page api url; fix url encode; fix memory > int32 change it to big int
This commit is contained in:
@@ -142,7 +142,7 @@ export default function HostDetail() {
|
||||
const fetchTimeDistribution = async () => {
|
||||
try {
|
||||
setLoadingDistribution(true);
|
||||
const response = await fetch(`/api/hosts/${hostname}/time-distribution`);
|
||||
const response = await fetch(`/hosts/${hostname}/time-distribution`);
|
||||
if (!response.ok) throw new Error('获取时间分布数据失败');
|
||||
const data = await response.json();
|
||||
setTimeDistribution(data.distribution);
|
||||
@@ -157,7 +157,7 @@ export default function HostDetail() {
|
||||
const fetchCredentials = async () => {
|
||||
try {
|
||||
setLoadingCredentials(true);
|
||||
const response = await fetch(`/api/hosts/${hostname}/credentials`);
|
||||
const response = await fetch(`/hosts/${hostname}/credentials`);
|
||||
if (!response.ok) throw new Error('获取凭据数据失败');
|
||||
const data = await response.json();
|
||||
setCredentials(data);
|
||||
@@ -181,7 +181,7 @@ export default function HostDetail() {
|
||||
setLoadingRecords(true);
|
||||
setShowDetailTimeline(true);
|
||||
const response = await fetch(
|
||||
`/api/hosts/${hostname}/screenshots?startTime=${startTime}&endTime=${endTime}`
|
||||
`/hosts/${hostname}/screenshots?startTime=${startTime}&endTime=${endTime}`
|
||||
);
|
||||
if (!response.ok) throw new Error('获取记录数据失败');
|
||||
const data = await response.json();
|
||||
@@ -517,7 +517,7 @@ export default function HostDetail() {
|
||||
返回
|
||||
</button>
|
||||
<h1 className="text-3xl font-semibold text-gray-900 mt-2">
|
||||
{hostname}
|
||||
{decodeURI(hostname)}
|
||||
</h1>
|
||||
</div>
|
||||
{lastUpdate && (
|
||||
@@ -632,7 +632,7 @@ export default function HostDetail() {
|
||||
style={{ aspectRatio: imageAspectRatio }}
|
||||
>
|
||||
<img
|
||||
src={`/api/screenshots/${screenshot.fileId}`}
|
||||
src={`/screenshots/${screenshot.fileId}`}
|
||||
alt={screenshot.monitorName}
|
||||
className="absolute top-0 left-0 w-full h-full object-contain shadow-sm hover:shadow-md transition-shadow"
|
||||
onLoad={(e) => onImageLoad(e, screenshot.fileId)}
|
||||
|
||||
Reference in New Issue
Block a user