forked from kubeflow/katib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated cherry pick of kubeflow#2101: Create the LOGS tab of Trial'…
…s details page in KWA Signed-off-by: Elena Zioga <elena@arrikto.com> --------- Signed-off-by: Elena Zioga <elena@arrikto.com>
- Loading branch information
Showing
11 changed files
with
151 additions
and
3 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
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
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
15 changes: 15 additions & 0 deletions
15
.../pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.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,15 @@ | ||
<!--if no logs are present at all then show a warning message--> | ||
<ng-container *ngIf="logsRequestError"> | ||
<lib-panel icon="error" color="warn"> | ||
{{ logsRequestError }} | ||
</lib-panel> | ||
</ng-container> | ||
|
||
<ng-container *ngIf="!logsRequestError"> | ||
<lib-logs-viewer | ||
class="logs-viewer" | ||
heading="Trial Logs" | ||
[subHeading]="''" | ||
[logs]="logs" | ||
></lib-logs-viewer> | ||
</ng-container> |
9 changes: 9 additions & 0 deletions
9
.../pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.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,9 @@ | ||
lib-panel { | ||
display: block; | ||
margin-top: 1rem; | ||
} | ||
|
||
.logs-viewer { | ||
margin-bottom: 2rem; | ||
margin-top: 1rem; | ||
} |
36 changes: 36 additions & 0 deletions
36
...ges/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.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,36 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { | ||
HeadingSubheadingRowModule, | ||
KubeflowModule, | ||
LogsViewerModule, | ||
} from 'kubeflow'; | ||
|
||
import { TrialLogsComponent } from './trial-logs.component'; | ||
|
||
describe('TrialLogsComponent', () => { | ||
let component: TrialLogsComponent; | ||
let fixture: ComponentFixture<TrialLogsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [TrialLogsComponent], | ||
imports: [ | ||
CommonModule, | ||
KubeflowModule, | ||
HeadingSubheadingRowModule, | ||
LogsViewerModule, | ||
], | ||
}).compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TrialLogsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
...pp/pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.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,21 @@ | ||
import { Component, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-trial-logs', | ||
templateUrl: './trial-logs.component.html', | ||
styleUrls: ['./trial-logs.component.scss'], | ||
}) | ||
export class TrialLogsComponent { | ||
public logs: string[]; | ||
|
||
@Input() logsRequestError: string; | ||
|
||
@Input() | ||
set trialLogs(trialLogs: string) { | ||
if (!trialLogs) { | ||
return; | ||
} | ||
|
||
this.logs = trialLogs.split('\n'); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...c/app/pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.module.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,20 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { TrialLogsComponent } from './trial-logs.component'; | ||
import { | ||
HeadingSubheadingRowModule, | ||
KubeflowModule, | ||
LogsViewerModule, | ||
} from 'kubeflow'; | ||
|
||
@NgModule({ | ||
declarations: [TrialLogsComponent], | ||
imports: [ | ||
CommonModule, | ||
KubeflowModule, | ||
HeadingSubheadingRowModule, | ||
LogsViewerModule, | ||
], | ||
exports: [TrialLogsComponent], | ||
}) | ||
export class TrialLogsModule {} |
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