You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/03/01 11:09:56 UTC
[incubator-dlab] 02/03: [DLAB-375]: added isAdmin property to
manage views
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-375
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit b879b8c4e2a1acec83176748c8407699a0d52a07
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Mar 1 12:52:24 2019 +0200
[DLAB-375]: added isAdmin property to manage views
---
.../management-grid/management-grid.component.ts | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
index efcf6e8..f444ac6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
@@ -35,10 +35,11 @@ export interface ManageAction {
'../../resources/computational/computational-resources-list/computational-resources-list.component.scss'
]
})
-export class ManagementGridComponent {
+export class ManagementGridComponent implements OnInit{
@Input() allEnvironmentData: Array<any>;
@Input() resources: Array<any>;
@Input() uploadKey: boolean;
+ @Input() isAdmin: boolean;
@Output() refreshGrid: EventEmitter<{}> = new EventEmitter();
@Output() actionToggle: EventEmitter<ManageAction> = new EventEmitter();
@@ -47,13 +48,17 @@ export class ManagementGridComponent {
constructor(public dialog: MatDialog) {}
+ ngOnInit() {
+
+ }
+
buildGrid(): void {
this.refreshGrid.emit();
}
- toggleResourceAction(environment, action, resource?) {
+ toggleResourceAction(environment, action: string, resource?) {
if (resource) {
- let resource_name = resource ? resource.computational_name : environment.name;
+ const resource_name = resource ? resource.computational_name : environment.name;
const dialogRef: MatDialogRef<ConfirmationDialog> = this.dialog.open(ConfirmationDialog, {
data: { action, resource_name, user: environment.user },
width: '550px'
@@ -63,7 +68,9 @@ export class ManagementGridComponent {
});
} else {
if (action === 'stop') {
- this.confirmationDialog.open({ isFooter: false }, environment, environment.name === 'edge node' ? ConfirmationDialogType.StopEdgeNode : ConfirmationDialogType.StopExploratory);
+ this.confirmationDialog.open(
+ { isFooter: false }, environment,
+ environment.name === 'edge node' ? ConfirmationDialogType.StopEdgeNode : ConfirmationDialogType.StopExploratory);
} else if (action === 'terminate') {
this.confirmationDialog.open({ isFooter: false }, environment, ConfirmationDialogType.TerminateExploratory);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org