-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add creator to endpoint table UI (#4876)
Signed-off-by: Thomas Quandt <[email protected]>
- Loading branch information
1 parent
ac6ab4a
commit e28003f
Showing
6 changed files
with
97 additions
and
4 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
3 changes: 3 additions & 0 deletions
3
...ist-types/endpoint/table-cell-endpoint-creator/table-cell-endpoint-creator.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,3 @@ | ||
<div> | ||
{{ creator }} | ||
</div> |
Empty file.
35 changes: 35 additions & 0 deletions
35
...-types/endpoint/table-cell-endpoint-creator/table-cell-endpoint-creator.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,35 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { CoreModule } from '@stratosui/core'; | ||
import { EndpointModel } from '@stratosui/store'; | ||
|
||
import { TableCellEndpointCreatorComponent } from './table-cell-endpoint-creator.component'; | ||
|
||
describe('TableCellEndpointCreatorComponent', () => { | ||
let component: TableCellEndpointCreatorComponent; | ||
let fixture: ComponentFixture<TableCellEndpointCreatorComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ TableCellEndpointCreatorComponent ], | ||
imports: [ | ||
CoreModule | ||
] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TableCellEndpointCreatorComponent); | ||
component = fixture.componentInstance; | ||
component.row = { | ||
creator: { | ||
name: 'dummy' | ||
} | ||
} as EndpointModel; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
30 changes: 30 additions & 0 deletions
30
.../list-types/endpoint/table-cell-endpoint-creator/table-cell-endpoint-creator.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,30 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { EndpointModel, entityCatalog } from '@stratosui/store'; | ||
import { TableCellCustom } from '../../../list.types'; | ||
|
||
@Component({ | ||
selector: 'app-table-cell-endpoint-creator', | ||
templateUrl: './table-cell-endpoint-creator.component.html', | ||
styleUrls: ['./table-cell-endpoint-creator.component.scss'] | ||
}) | ||
export class TableCellEndpointCreatorComponent extends TableCellCustom<EndpointModel> implements OnInit { | ||
|
||
public creator = ''; | ||
|
||
@Input() | ||
get row(): EndpointModel { | ||
return super.row; | ||
} | ||
set row(row: EndpointModel) { | ||
super.row = row; | ||
} | ||
|
||
constructor() { | ||
super(); | ||
} | ||
|
||
ngOnInit(): void { | ||
this.creator = this.row.creator.name; | ||
} | ||
|
||
} |
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