Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use echo inspection target name as tag description #1858

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading