Skip to content

Commit 65d8855

Browse files
committed
Only use blob location instead of sas in record
1 parent 7286ba8 commit 65d8855

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

api/Controllers/Models/InspectionRecordDto.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ public class InspectionRecordDto(InspectionRecord record, IBlobStorageService bl
88
public Guid Id { get; set; } = record.Id;
99
public string InspectionId { get; set; } = record.InspectionId;
1010
public string InstallationCode { get; set; } = record.InstallationCode;
11-
public Uri SASToken { get; set; } =
12-
blobService.CreateReadSasUri(record.BlobStorageLocation).Result;
11+
public BlobStorageLocation BlobStorageLocation { get; set; } = record.BlobStorageLocation;
1312
public DateTime CreatedAt { get; set; } = record.CreatedAt;
1413
public string? InspectionType { get; set; } = record.InspectionType;
1514
public string? Tag { get; set; } = record.Tag;

frontend/src/api/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export interface InspectionRecord {
9999
id: string;
100100
inspectionId: string;
101101
installationCode: string;
102-
sasToken: string;
102+
blobStorageLocation: BlobStorageLocation;
103103
createdAt: string;
104104
inspectionType?: string | null;
105105
tag?: string | null;

frontend/src/pages/inspection-records/detail.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import { arrow_back } from "@equinor/eds-icons";
1010
import { getInspectionRecord, type InspectionRecord, type Orientation, type Position } from "../../api/client";
1111
import StatusChip from "../../components/StatusChip";
12+
import BlobLocation from "../../components/BlobLocation";
1213

1314
Icon.add({ arrow_back });
1415

@@ -93,12 +94,7 @@ export default function InspectionRecordDetailPage() {
9394
<Table.Row>
9495
<Table.Cell>Blob</Table.Cell>
9596
<Table.Cell>
96-
{
97-
record.sasToken ? (
98-
<Typography link href={record.sasToken}>
99-
Link
100-
</Typography>) : "-"
101-
}
97+
<BlobLocation loc={record.blobStorageLocation} />
10298
</Table.Cell>
10399
</Table.Row>
104100
<Table.Row>

0 commit comments

Comments
 (0)