Skip to content

Commit

Permalink
Use echo inspection target name as tag description
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Dec 10, 2024
1 parent 4e83bb5 commit 5b387f2
Show file tree
Hide file tree
Showing 9 changed files with 1,426 additions and 3 deletions.
2 changes: 2 additions & 0 deletions backend/api.test/Mocks/MissionLoaderMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class MockMissionLoader() : IMissionLoader
tagId: "1",
tagLink: new Uri("https://testurl.com"),
poseId: 1,
taskDescription: "description",
robotPose: new Pose
{
Position = new Position { X = 0, Y = 0, Z = 0 },
Expand All @@ -42,6 +43,7 @@ public class MockMissionLoader() : IMissionLoader
tagId: "2",
tagLink: new Uri("https://testurl.com"),
poseId: 1,
taskDescription: "description",
robotPose: new Pose
{
Position = new Position { X = 0, Y = 0, Z = 0 },
Expand Down
7 changes: 7 additions & 0 deletions backend/api/Database/Context/InitDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCD",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.Successful
);
Expand All @@ -463,6 +464,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCDE",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.Failed
);
Expand All @@ -473,6 +475,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCDEF",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.PartiallySuccessful
);
Expand All @@ -483,6 +486,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCDEFG",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.Cancelled
);
Expand All @@ -493,6 +497,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCDEFGH",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.Failed
);
Expand All @@ -503,6 +508,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCDEFGHI",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.Failed
);
Expand All @@ -513,6 +519,7 @@ private static List<MissionTask> GetMissionTasks()
taskOrder: 0,
tagLink: url,
tagId: "ABCDEFGHIJ",
taskDescription: "Task description",
poseId: 2,
status: TaskStatus.Failed
);
Expand Down
4 changes: 4 additions & 0 deletions backend/api/Database/Models/Inspection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ public Inspection(
InspectionType inspectionType,
float? videoDuration,
Position inspectionTarget,
string? inspectionTargetName,
InspectionStatus status = InspectionStatus.NotStarted,
AnalysisType? analysisType = null
)
{
InspectionType = inspectionType;
VideoDuration = videoDuration;
InspectionTarget = inspectionTarget;
InspectionTargetName = inspectionTargetName;
AnalysisType = analysisType;
Status = status;
}
Expand Down Expand Up @@ -65,6 +67,8 @@ public Inspection(Inspection copy, InspectionStatus? inspectionStatus = null, bo
[Required]
public Position InspectionTarget { get; set; }

public string? InspectionTargetName { get; set; }

[Required]
public InspectionStatus Status
{
Expand Down
2 changes: 2 additions & 0 deletions backend/api/Database/Models/MissionTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public MissionTask(
Uri? tagLink,
string? tagId,
int? poseId,
string? taskDescription,
IsarZoomDescription? zoomDescription = null,
TaskStatus status = TaskStatus.NotStarted,
MissionTaskType type = MissionTaskType.Inspection)
Expand All @@ -34,6 +35,7 @@ public MissionTask(
RobotPose = robotPose;
PoseId = poseId;
TaskOrder = taskOrder;
Description = taskDescription;
Status = status;
Type = type;
IsarZoomDescription = zoomDescription;
Expand Down
Loading

0 comments on commit 5b387f2

Please sign in to comment.