-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dedicated yaml tab for Trials (#2034)
* frontend: Create a yaml tab for Trials (#2011) * Create a dedicated yaml tab for Trials. Signed-off-by: Elena Zioga <elena@arrikto.com> * frontend: Rename components * Rename trial-modal component to trial-details. * Rename trial-modal-overview component to trial-overview. Signed-off-by: Elena Zioga <elena@arrikto.com> Signed-off-by: Elena Zioga <elena@arrikto.com>
- Loading branch information
Showing
23 changed files
with
142 additions
and
63 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
File renamed without changes.
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
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
...ent-details/trials-table/trial-details/trial-overview/metrics/metrics.component.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,10 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { ConditionsTableModule, DetailsListModule } from 'kubeflow'; | ||
import { TrialMetricsComponent } from './metrics.component'; | ||
|
||
@NgModule({ | ||
declarations: [TrialMetricsComponent], | ||
imports: [ConditionsTableModule, DetailsListModule], | ||
exports: [TrialMetricsComponent], | ||
}) | ||
export class TrialMetricsModule {} |
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
File renamed without changes.
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
6 changes: 6 additions & 0 deletions
6
.../pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.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,6 @@ | ||
<lib-monaco-editor | ||
[(text)]="yaml" | ||
[language]="'yaml'" | ||
[readOnly]="true" | ||
[height]="500" | ||
></lib-monaco-editor> |
4 changes: 4 additions & 0 deletions
4
.../pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.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,4 @@ | ||
:host { | ||
display: block; | ||
overflow: auto; | ||
} |
30 changes: 30 additions & 0 deletions
30
...ges/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.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,30 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { EditorModule } from 'kubeflow'; | ||
import { TrialYamlComponent } from './trial-yaml.component'; | ||
|
||
describe('TrialYamlComponent', () => { | ||
let component: TrialYamlComponent; | ||
let fixture: ComponentFixture<TrialYamlComponent>; | ||
|
||
beforeEach( | ||
waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [CommonModule, NoopAnimationsModule, EditorModule], | ||
declarations: [TrialYamlComponent], | ||
}).compileComponents(); | ||
}), | ||
); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TrialYamlComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
17 changes: 17 additions & 0 deletions
17
...pp/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.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,17 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { TrialK8s } from 'src/app/models/trial.k8s.model'; | ||
import { dump } from 'js-yaml'; | ||
|
||
@Component({ | ||
selector: 'app-trial-yaml', | ||
templateUrl: './trial-yaml.component.html', | ||
styleUrls: ['./trial-yaml.component.scss'], | ||
}) | ||
export class TrialYamlComponent { | ||
public yaml = ''; | ||
|
||
@Input() | ||
set trialJson(trial: TrialK8s) { | ||
this.yaml = dump(trial); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...c/app/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.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,12 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { TrialYamlComponent } from './trial-yaml.component'; | ||
import { EditorModule } from 'kubeflow'; | ||
|
||
@NgModule({ | ||
declarations: [TrialYamlComponent], | ||
imports: [CommonModule, EditorModule], | ||
exports: [TrialYamlComponent], | ||
}) | ||
export class TrialYamlModule {} |
10 changes: 0 additions & 10 deletions
10
.../experiment-details/trials-table/trial-modal/overview/metrics/metrics.component.module.ts
This file was deleted.
Oops, something went wrong.
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