forked from winery/winery
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Live-Modeling: Enable Deployments at Modeling Time
Co-authored-by: Kálmán Képes <[email protected]> Co-authored-by: Björn Müller <[email protected]> Co-authored-by: Lukas Harzenetter <[email protected]> Signed-off-by: Phi Dang <[email protected]> Signed-off-by: Lukas Harzenetter <[email protected]>
- Loading branch information
1 parent
de2c8c7
commit 2f0536c
Showing
128 changed files
with
7,061 additions
and
528 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
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
57 changes: 57 additions & 0 deletions
57
...p/topologymodeler/src/app/live-modeling/buildplan-outputs/buildplan-outputs.component.css
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,57 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
*******************************************************************************/ | ||
|
||
.table-scrollable { | ||
max-height: 200px; | ||
overflow-y: auto; | ||
font-size: x-small; | ||
} | ||
|
||
.table-scrollable th { | ||
padding: 0.25em; | ||
} | ||
|
||
.table-scrollable td { | ||
padding: 0.25em; | ||
} | ||
|
||
.parameters-table { | ||
width: 100%; | ||
table-layout: fixed; | ||
border-collapse: collapse; | ||
} | ||
|
||
.parameters-table, | ||
.parameters-table th, | ||
.parameters-table td { | ||
border: 1px solid #3d3d3d; | ||
} | ||
|
||
.parameters-table th, | ||
.parameters-table td { | ||
width: 50%; | ||
word-break: break-all; | ||
} | ||
|
||
.parameters-table th { | ||
background: #333; | ||
} | ||
|
||
.parameters-table tr:nth-child(odd) { | ||
background: #242424; | ||
} | ||
|
||
.parameters-table tr:nth-child(even) { | ||
background: #292929; | ||
} |
39 changes: 39 additions & 0 deletions
39
.../topologymodeler/src/app/live-modeling/buildplan-outputs/buildplan-outputs.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,39 @@ | ||
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
~ | ||
~ See the NOTICE file(s) distributed with this work for additional | ||
~ information regarding copyright ownership. | ||
~ | ||
~ This program and the accompanying materials are made available under the | ||
~ terms of the Eclipse Public License 2.0 which is available at | ||
~ http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 | ||
~ which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
~ | ||
~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> | ||
|
||
<div *ngIf="currentBuildPlanInstance?.outputs.length > 0; then content else placeholder"></div> | ||
<ng-template #content> | ||
<div class="table-scrollable"> | ||
<table class="parameters-table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Name</th> | ||
<th scope="col">Value</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let parameter of currentBuildPlanInstance.outputs"> | ||
<td>{{parameter.name}}</td> | ||
<td>{{parameter.value || '(empty)'}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</ng-template> | ||
<ng-template #placeholder> | ||
<div | ||
style="padding: 0.5em; font-size: xx-small; font-style: italic; text-align: center"> | ||
No outputs found | ||
</div> | ||
</ng-template> |
48 changes: 48 additions & 0 deletions
48
...pp/topologymodeler/src/app/live-modeling/buildplan-outputs/buildplan-outputs.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,48 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
*******************************************************************************/ | ||
import { Component, OnDestroy, OnInit, } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { NgRedux } from '@angular-redux/store'; | ||
import { IWineryState } from '../../redux/store/winery.store'; | ||
import { ServiceTemplateInstanceStates } from '../../models/enums'; | ||
import { PlanInstance } from '../../models/container/plan-instance.model'; | ||
|
||
@Component({ | ||
selector: 'winery-live-modeling-sidebar-buildplan-outputs', | ||
templateUrl: './buildplan-outputs.component.html', | ||
styleUrls: ['./buildplan-outputs.component.css'], | ||
}) | ||
export class BuildplanOutputsComponent implements OnInit, OnDestroy { | ||
currentBuildPlanInstance: PlanInstance; | ||
subscriptions: Array<Subscription> = []; | ||
|
||
constructor(private ngRedux: NgRedux<IWineryState>) { | ||
} | ||
|
||
ngOnInit() { | ||
// tslint:disable-next-line:no-unused-expression | ||
this.subscriptions.push(this.ngRedux.select((state) => { | ||
return state.liveModelingState.currentBuildPlanInstance; | ||
}) | ||
.subscribe((buildPlanInstance) => { | ||
this.currentBuildPlanInstance = buildPlanInstance; | ||
})); | ||
} | ||
|
||
ngOnDestroy() { | ||
this.subscriptions.forEach((subscription) => { | ||
subscription.unsubscribe(); | ||
}); | ||
} | ||
} |
Oops, something went wrong.