Skip to content

Commit 241bdde

Browse files
mohitsumandgolovin
authored andcommitted
Add Miscellaneous components card on Final Page (#1374)
1 parent 90ab0ad commit 241bdde

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

browser/pages/start/controller.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ class StartController {
2323
return 'https://developers.redhat.com/products/cdk/hello-world/#cdk_build-your-first-app';
2424
}
2525

26+
fetchMiscComponents() {
27+
let miscComponents = [];
28+
this.removeComponents('devstudio');
29+
this.removeComponents('cdk');
30+
for (let [key, value] of this.installerDataSvc.allInstallables()) {
31+
if(value.installed && key!=="devstudio" && key!=="cdk" && key!==undefined){
32+
miscComponents.push(value);
33+
}
34+
}
35+
return miscComponents;
36+
}
37+
38+
removeComponents(key) {
39+
for(let list of this.installerDataSvc.getInstallable(key).dependenciesOf){
40+
this.installerDataSvc.allInstallables().delete(list.keyName);
41+
}
42+
return;
43+
}
44+
2645
startDevstudio() {
2746
if(this.devstudioInstall.isSkipped() && this.fuseInstall.isSkipped()) {
2847
this.exit();

browser/pages/start/start.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,34 @@
1111
</div>
1212
<get-started component="'devstudio'" start="startCtrl.startDevstudio()"></get-started>
1313
<get-started component="'cdk'" start="startCtrl.startCdk()"></get-started>
14+
<div class="row row-cards-pf" ng-show="startCtrl.fetchMiscComponents().length > 0">
15+
<div class="col-xs-12">
16+
<div class="card-pf card-pf-view card-pf-view-select card-pf-view-single-select">
17+
<div class="card-pf-body" style="min-height: 100px; overflow: hidden;">
18+
<section class="product-header">
19+
<div class="row">
20+
<div class="header-column">
21+
<h2>
22+
<span class="field-name-title">Miscellaneous Components</span>
23+
</h2>
24+
</div>
25+
</div>
26+
</section>
27+
<div class="card-pf-top-element">
28+
<div class="col-sm-8" style="margin-top: 2%">
29+
<ul style="margin-left: -50px;list-style: none;">
30+
<li ng-repeat="dependency in startCtrl.fetchMiscComponents()" style="margin: 6px">
31+
<i class="pficon-applications"></i>
32+
<span>{{dependency.productName}}&nbsp;|</span>
33+
<span class="product-info">{{dependency.version}}</span>
34+
</li>
35+
</ul>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
</div>
41+
</div>
1442
</div>
1543
</div>
1644
</main>

0 commit comments

Comments
 (0)