This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from leaphy-robotics/development
enhancement: add debugging for uploading and more feedback for uploading
- Loading branch information
Showing
13 changed files
with
179 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/app/modules/core/dialogs/debug-information/debug-information.dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="container"> | ||
|
||
<div id="header"> | ||
{{ "UPLOAD_OUTPUT" | translate}} | ||
<button mat-stroked-button class="icon-button" (click)="onCloseClicked()"> | ||
<mat-icon>close</mat-icon> | ||
</button> | ||
</div> | ||
<div class="upload-log"> | ||
<div class="upload-log-item" *ngFor="let item of (robotWiredState.uploadLog$ | async)"> | ||
<div class="upload-log-data">{{item}}</div> | ||
</div> | ||
</div> | ||
</div> |
47 changes: 47 additions & 0 deletions
47
src/app/modules/core/dialogs/debug-information/debug-information.dialog.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
} | ||
|
||
.upload-log-item { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: right; | ||
align-items: center; | ||
max-width: 100%; | ||
width: 100%; | ||
height: fit-content; | ||
border-bottom: 1px solid black; | ||
} | ||
|
||
.upload-log-data { | ||
max-width: 99%; | ||
flex: 1 0 auto; | ||
padding-left: 5px; | ||
color: black; | ||
word-break: break-all; | ||
} | ||
|
||
.upload-log { | ||
width: 100%; | ||
height: 50vh; | ||
margin: 0; | ||
overflow-y: scroll; | ||
background-color: lightgray; | ||
} | ||
|
||
#header:hover { | ||
cursor: grab; | ||
} | ||
|
||
#header { | ||
background-color: var(--leaphy-color-primary); | ||
color: var(--leaphy-color-light); | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-left: 10px; | ||
width: 100%; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/modules/core/dialogs/debug-information/debug-information.dialog.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
|
||
import { DebugInformationDialog } from './debug-information.dialog'; | ||
|
||
describe('NameFileComponent', () => { | ||
let component: DebugInformationDialog; | ||
let fixture: ComponentFixture<DebugInformationDialog>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ DebugInformationDialog ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DebugInformationDialog); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
25 changes: 25 additions & 0 deletions
25
src/app/modules/core/dialogs/debug-information/debug-information.dialog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {Component} from '@angular/core'; | ||
import {MatDialogRef} from '@angular/material/dialog'; | ||
import {RobotWiredState} from "../../../../state/robot.wired.state"; | ||
|
||
@Component({ | ||
selector: 'debug-information', | ||
templateUrl: './debug-information.dialog.html', | ||
styleUrls: ['./debug-information.dialog.scss'] | ||
}) | ||
export class DebugInformationDialog { | ||
|
||
constructor( | ||
public dialogRef: MatDialogRef<DebugInformationDialog>, | ||
public robotWiredState: RobotWiredState, | ||
) { | ||
|
||
} | ||
|
||
public onCloseClicked() { | ||
this.dialogRef.close(); | ||
} | ||
|
||
|
||
protected readonly document = document; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,7 @@ | |
justify-content: center; | ||
height: 100%; | ||
} | ||
|
||
.failed-upload { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.