-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding stats * comments fixed regenerating bundle * removing ctrl variables * updating contiv-nginx.conf
- Loading branch information
Showing
12 changed files
with
1,852 additions
and
1,440 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<div class="ui basic segment" [ngClass]="{loading: showLoader}"> | ||
<div><h4 class="ui header">Basic Settings</h4></div> <!-- Top Margin is less,When h4 is first child in div --> | ||
<table class="ui very basic selectable table"> | ||
<tbody> | ||
<tr> | ||
<td class="three wide column">Name</td> | ||
<td>{{applicationGroup.groupName}}</td> | ||
</tr> | ||
<tr> | ||
<td class="three wide column">Network</td> | ||
<td>{{applicationGroup.networkName}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<div class="ui section divider" style="margin-top: 30px"></div> | ||
|
||
<ctv-collapsible title="Isolation Policies"> | ||
<ctv-isolationpolicy [mode]="mode" [applicationgroup]="applicationGroup"></ctv-isolationpolicy> | ||
</ctv-collapsible> | ||
|
||
<div class="ui section divider"></div> | ||
|
||
<ctv-collapsible title="Bandwidth Policies"> | ||
<ctv-bandwidthpolicy [mode]="mode" [applicationgroup]="applicationGroup"></ctv-bandwidthpolicy> | ||
</ctv-collapsible> | ||
</div> |
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,23 @@ | ||
/** | ||
* Created by cshampur on 11/18/16. | ||
*/ | ||
|
||
|
||
import {Component, Input, OnInit} from "@angular/core"; | ||
@Component({ | ||
selector: 'applicationgroupinfo', | ||
templateUrl: 'applicationgroups/applicationgroupinfo.html' | ||
}) | ||
|
||
export class ApplicationGroupInfoComponent{ | ||
@Input('applicationGroup') applicationGroup: any; | ||
@Input('mode') mode: string; | ||
@Input('showLoader') showLoader: boolean | ||
constructor(){ | ||
this.applicationGroup= { | ||
groupName: '', | ||
networkName: '' | ||
} | ||
this.mode = 'details'; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<div class="ui basic segment" [ngClass]="{loading: showLoader}"> | ||
<table class="ui very basic selectable table"> | ||
<tbody> | ||
<tr> | ||
<td class="ctv-header three wide column">Name</td> | ||
<td>{{config['groupName']}}</td> | ||
</tr> | ||
<tr> | ||
<td class="ctv-header three wide column">Network Name</td> | ||
<td>{{config['networkName']}}</td> | ||
</tr> | ||
<tr> | ||
<td class="ctv-header three wide column">External Packet Tag</td> | ||
<td>{{applicationInspectStats.externalPktTag}}</td> | ||
</tr> | ||
<tr> | ||
<td class="ctv-header three wide column">Number of Endpoints</td> | ||
<td>{{applicationInspectStats.numEndpoints}}</td> | ||
</tr> | ||
<tr> | ||
<td class="ctv-header three wide column">Packet Tag</td> | ||
<td>{{applicationInspectStats.pktTag}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<div class="ui section divider"></div> | ||
<ctv-collapsible title="End Points"> | ||
<ctv-table #tableRef [defaultSortColumn]="'containerName'" | ||
[items]="endpoints" | ||
(filtereditems)="filteredendpoints=$event" | ||
[size]="12"> | ||
<thead> | ||
<tr> | ||
<div class="ui grid" style="margin-top: 25px;margin-left: 25px;margin-bottom: 1px;"> | ||
<th class="five wide column"><ctv-th [sortfield]="'containerName'" (sortdata)="tableRef.applysort($event)" [sortobject]="tableRef.sortObj"> Container Name </ctv-th></th> | ||
<th class="four wide column"><ctv-th [sortfield]="'ipAddress'" (sortdata)="tableRef.applysort($event)" [sortobject]="tableRef.sortObj"> IP Address </ctv-th></th> | ||
<th class="three wide column"><ctv-th [sortfield]="'homingHost'" (sortdata)="tableRef.applysort($event)" [sortobject]="tableRef.sortObj"> Host </ctv-th></th> | ||
<th class="four wide column"> | ||
<ctv-search (searchTextChange)="tableRef.showChunk(tableRef.table.pageNo,$event);" [placeholder]="'Search Containers...'"></ctv-search> | ||
</th> | ||
</div> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<tr *ngFor="let endpoint of filteredendpoints"> | ||
<td> | ||
<ctv-accordion [items]="containerDetails[endpoint.containerID]"> | ||
<div class="ui grid" style="margin-top: -33px; margin-left: 30px;"> | ||
<div class="five wide column">{{endpoint.containerName.substr(1)}}</div> | ||
<div class="four wide column">{{endpoint.ipAddress.join(' ')}}</div> | ||
<div class="four wide column">{{endpoint.homingHost}}</div> | ||
</div> | ||
</ctv-accordion> | ||
</td> | ||
<td></td> | ||
</tr> | ||
</tbody> | ||
|
||
<tfoot> | ||
<tr> | ||
<td colspan="5"> | ||
<ctv-tpagination [chunks]="tableRef.pageChunks" | ||
(showPage)="tableRef.showChunk($event, tableRef.table.searchText)" | ||
(prevChunk)="tableRef.showPrevChunk()" | ||
(nextChunk)="tableRef.showNextChunk()"> | ||
</ctv-tpagination> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</ctv-table> | ||
</ctv-collapsible> | ||
</div> |
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,83 @@ | ||
/** | ||
* Created by cshampur on 11/18/16. | ||
*/ | ||
|
||
import {Component, NgZone, Input, OnInit, OnDestroy} from "@angular/core"; | ||
import {ApplicationGroupsModel} from "../components/models/applicationgroupsmodel"; | ||
import {CRUDHelperService} from "../components/utils/crudhelperservice"; | ||
import {InspectService} from "../components/utils/inspectservice"; | ||
import {Subscription, Observable} from "rxjs"; | ||
import {ContivGlobals} from "../components/models/contivglobals"; | ||
import {isUndefined} from "util"; | ||
@Component({ | ||
selector: 'applicationgroupstats', | ||
templateUrl: 'applicationgroups/applicationgroupstats.html' | ||
}) | ||
|
||
export class ApplicationGroupStatsComponent implements OnInit, OnDestroy{ | ||
@Input('statkey') statkey: string; | ||
public applicationInspectStats: any; | ||
private refresh: Subscription; | ||
public showLoader: boolean; | ||
config:any; endpoints:any; filteredendpoints: any; containerDetails: any; | ||
constructor(private applicationGroupsModel: ApplicationGroupsModel, | ||
private crudHelperService: CRUDHelperService, | ||
private inspectService: InspectService, | ||
private ngZone: NgZone){ | ||
this.statkey = ''; | ||
this.applicationInspectStats = { | ||
externalPktTag: '', | ||
numEndpoints: '', | ||
pktTag: '' | ||
} | ||
this.config = {networkName: '', groupName: ''} | ||
this.endpoints = []; | ||
this.filteredendpoints = []; | ||
this.containerDetails= {}; | ||
this.refresh = Observable.interval(5000).subscribe(() => { | ||
if(this.statkey!='') | ||
this.getApplicationgroupInspect(true); | ||
}); | ||
} | ||
|
||
ngOnInit(){ | ||
this.crudHelperService.startLoader(this); | ||
if(this.statkey!='') | ||
this.getApplicationgroupInspect(false); | ||
} | ||
|
||
getApplicationgroupInspect(reload: boolean){ | ||
var applicationStatsCtrl = this; | ||
this.applicationGroupsModel.getInspectByKey(this.statkey, ContivGlobals.APPLICATIONGROUPS_INSPECT_ENDPOINT, reload) | ||
.then((result) => { | ||
applicationStatsCtrl['applicationInspectStats'] = result['Oper']; | ||
applicationStatsCtrl['config'] = result['Config']; | ||
if(!isUndefined(result['Oper'].endpoints)){ | ||
var containerDetails = applicationStatsCtrl.inspectService.buildEndPoints(result['Oper'].endpoints); | ||
if(applicationStatsCtrl.inspectService.checkContainerChanged(applicationStatsCtrl['containerDetails'],containerDetails)){ | ||
applicationStatsCtrl['endpoints'] = result['Oper'].endpoints; | ||
applicationStatsCtrl['containerDetails'] = containerDetails; | ||
} | ||
} | ||
else{ | ||
applicationStatsCtrl['endpoints'] = []; | ||
applicationStatsCtrl['containerDetails'] = {}; | ||
} | ||
applicationStatsCtrl.ngZone.run(() => { | ||
applicationStatsCtrl.crudHelperService.stopLoader(applicationStatsCtrl); | ||
}); | ||
}, | ||
(error) => { | ||
applicationStatsCtrl.ngZone.run(() => { | ||
applicationStatsCtrl.crudHelperService.stopLoader(applicationStatsCtrl); | ||
}); | ||
}); | ||
|
||
|
||
} | ||
|
||
ngOnDestroy(){ | ||
this.refresh.unsubscribe(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.