From 49bcf70c15fb78386a64dff797d1bf1732d2bc0a Mon Sep 17 00:00:00 2001 From: James Strachan Date: Fri, 28 Apr 2017 10:41:41 +0100 Subject: [PATCH] feat(apps page): add kebab menu lets add a kebab menu to drop down so folks can scale, delete or view on openshift console. Also lets remove the icon on the versions and just use links to make things look easier to grok #454 --- .../ui/app/list/list.app.component.html | 78 +++++++++++++++---- .../ui/app/list/list.app.component.scss | 10 ++- .../ui/app/list/list.app.component.ts | 20 ++++- .../ui/deployment/deployment.module.ts | 2 + 4 files changed, 94 insertions(+), 16 deletions(-) diff --git a/src/app/kubernetes/ui/app/list/list.app.component.html b/src/app/kubernetes/ui/app/list/list.app.component.html index 6caf896..021b1d6 100644 --- a/src/app/kubernetes/ui/app/list/list.app.component.html +++ b/src/app/kubernetes/ui/app/list/list.app.component.html @@ -32,14 +32,49 @@
-

- {{envInfo.version}}  - - - - +

+ + + + {{envInfo.version}} + + + + {{envInfo.version}} + + + + + + + +

+
@@ -56,18 +91,20 @@

{{envInfo.deployment.terminatingReplicas}}
- + 0

- + +

@@ -90,3 +127,16 @@

+ + + + + + + + + + diff --git a/src/app/kubernetes/ui/app/list/list.app.component.scss b/src/app/kubernetes/ui/app/list/list.app.component.scss index a856792..8d561a0 100644 --- a/src/app/kubernetes/ui/app/list/list.app.component.scss +++ b/src/app/kubernetes/ui/app/list/list.app.component.scss @@ -25,4 +25,12 @@ } .app-env-info-panel-row { -} \ No newline at end of file +} + +.card-pf-title .kebab { + padding-top: 0px; +} + +.card-pf-title .app-version-link { + +} diff --git a/src/app/kubernetes/ui/app/list/list.app.component.ts b/src/app/kubernetes/ui/app/list/list.app.component.ts index 26f3a5a..63cba30 100644 --- a/src/app/kubernetes/ui/app/list/list.app.component.ts +++ b/src/app/kubernetes/ui/app/list/list.app.component.ts @@ -1,8 +1,10 @@ -import {Component, Input} from "@angular/core"; +import {Component, Input, ViewChild} from "@angular/core"; import {TREE_ACTIONS} from "angular2-tree-component"; import {ParentLinkFactory} from "../../../../common/parent-link-factory"; import {AppDeployments} from "../list-page/list-page.app.component"; import {Space, createEmptySpace} from "../../../model/space.model"; +import {DeploymentDeleteDialog} from "../../deployment/delete-dialog/delete-dialog.deployment.component"; +import {DeploymentScaleDialog} from "../../deployment/scale-dialog/scale-dialog.deployment.component"; @Component({ selector: 'fabric8-apps-list', @@ -16,10 +18,26 @@ export class AppListComponent { @Input() apps: AppDeployments[]; @Input() space: Space; + + @ViewChild(DeploymentDeleteDialog) deleteDialog: DeploymentDeleteDialog; + @ViewChild(DeploymentScaleDialog) scaleDialog: DeploymentScaleDialog; + constructor( parentLinkFactory: ParentLinkFactory, ) { this.parentLink = parentLinkFactory.parentLink; } + openDeleteDialog(deleteDeploymentModal, deployment) { + this.deleteDialog.modal = deleteDeploymentModal; + this.deleteDialog.deployment = deployment; + deleteDeploymentModal.open(); + } + + openScaleDialog(scaleDeploymentModal, deployment) { + this.scaleDialog.configure(scaleDeploymentModal, deployment); + scaleDeploymentModal.open(); + } + + } diff --git a/src/app/kubernetes/ui/deployment/deployment.module.ts b/src/app/kubernetes/ui/deployment/deployment.module.ts index 388ed76..2d59b6e 100644 --- a/src/app/kubernetes/ui/deployment/deployment.module.ts +++ b/src/app/kubernetes/ui/deployment/deployment.module.ts @@ -55,6 +55,8 @@ import {DeploymentScaleDialog} from './scale-dialog/scale-dialog.deployment.comp exports: [ ModalModule, DeploymentsListComponent, + DeploymentDeleteDialog, + DeploymentScaleDialog, ], providers: [ DropdownConfig