Skip to content

Commit 2eb94f9

Browse files
Merge pull request #700 from RLOpenCatalyst/stage
Enhancements in workzone and tracks. Cost and usage reports implementation
2 parents 348c501 + 6385e1f commit 2eb94f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+10157
-3447
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ server/app/vspheretest.js
2727
*.svn
2828
server/config
2929
server/logs
30+
.project

client/cat3/package.json

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
11
{
2-
"name": "catalyst",
3-
"version": "3.0.0",
4-
"description": "Catalyst 3.0",
5-
"main": "app.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1",
8-
"start": "grunt --verbose",
9-
"build-dev": "grunt build-dev --verbose",
10-
"build-qa": "grunt build-qa --verbose",
11-
"build-prod": "grunt build-prod --verbose",
12-
"build-dist": "grunt build-dist --verbose"
13-
},
14-
"author": "revinjacob",
15-
"license": "Catalyst License",
16-
"repository": {
17-
"type": "git",
18-
"url": "https://github.com/RLOpenCatalyst/core.git"
19-
},
20-
"dependencies": {
21-
"grunt": "^0.4.x",
22-
"grunt-bower-task": "~0.4.0",
23-
"grunt-concurrent": "^2.x.x",
24-
"grunt-contrib-clean": "^0.6.x",
25-
"grunt-contrib-concat": "~0.5.1",
26-
"grunt-contrib-copy": "^0.8.x",
27-
"grunt-contrib-jshint": "^0.11.x",
28-
"grunt-contrib-sass": "^0.9.2",
29-
"grunt-contrib-uglify": "^0.9.x",
30-
"grunt-copy-bower": "~0.1.0",
31-
"grunt-processhtml": "~0.3.8"
32-
},
33-
"devDependencies": {
34-
"express": "^4.13.3",
35-
"bower": "~1.4.1",
36-
"connect": "^3.4.1",
37-
"grunt-contrib-watch": "^0.6.x",
38-
"grunt-newer": "^1.x.x",
39-
"grunt-nodemon": "^0.4.x"
40-
}
2+
"name": "catalyst",
3+
"version": "3.0.0",
4+
"description": "Catalyst 3.0",
5+
"main": "app.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "grunt --verbose",
9+
"build-dev": "grunt build-dev --verbose",
10+
"build-qa": "grunt build-qa --verbose",
11+
"build-prod": "grunt build-prod --verbose",
12+
"build-dist": "grunt build-dist --verbose"
13+
},
14+
"author": "revinjacob",
15+
"license": "Catalyst License",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/RLOpenCatalyst/core.git"
19+
},
20+
"dependencies": {
21+
"grunt": "^0.4.x",
22+
"grunt-bower-task": "~0.4.0",
23+
"grunt-concurrent": "^2.x.x",
24+
"grunt-contrib-clean": "^0.6.x",
25+
"grunt-contrib-concat": "~0.5.1",
26+
"grunt-contrib-copy": "^0.8.x",
27+
"grunt-contrib-jshint": "^0.11.x",
28+
"grunt-contrib-sass": "^0.9.2",
29+
"grunt-contrib-uglify": "^0.9.x",
30+
"grunt-copy-bower": "~0.1.0",
31+
"grunt-processhtml": "~0.3.8"
32+
},
33+
"devDependencies": {
34+
"bower": "~1.4.1",
35+
"connect": "^3.4.1",
36+
"express": "^4.13.3",
37+
"grunt": "^0.4.5",
38+
"grunt-contrib-watch": "^0.6.x",
39+
"grunt-newer": "^1.x.x",
40+
"grunt-nodemon": "^0.4.x"
41+
}
4142
}

client/cat3/src/factory/workzoneServices.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,13 @@
124124
return $http.get(fullUrl(url), Auth.getHeaderObject());
125125
},
126126
/*instanceCtrl*/
127-
getPaginatedInstances: function(envParams,paginationParams) {
127+
getPaginatedInstances: function(envParams,paginationParams,filterBy) {
128128
var pageStr = paginationUtil.pageObjectToString(paginationParams);
129129
var url = '/organizations/' + envParams.org + '/businessgroups/' + envParams.bg +
130130
'/projects/' + envParams.proj + '/environments/' + envParams.env + '/instanceList'+pageStr;
131+
if(filterBy){
132+
url += '&filterBy=' + filterBy;
133+
}
131134
return $http.get(fullUrl(url), Auth.getHeaderObject());
132135
},
133136
getCheckIfConfigListAvailable: function () {
@@ -491,6 +494,26 @@
491494
getCompsiteBlueprintInfo:function (compositeBlueprintId) {
492495
var url ='/composite-blueprints/'+compositeBlueprintId;
493496
return $http.get(fullUrl(url),Auth.getHeaderObject());
497+
},
498+
getAllRegionsList: function () {
499+
var url = '/vmimages/regions/list';
500+
return $http.get(fullUrl(url), Auth.getHeaderObject());
501+
},
502+
getProviders:function () {
503+
var url ='/aws/providers';
504+
return $http.get(fullUrl(url),Auth.getHeaderObject());
505+
},
506+
getProviderRegions:function (providerId) {
507+
var url ='/aws/providers/'+providerId;
508+
return $http.get(fullUrl(url),Auth.getHeaderObject());
509+
},
510+
getProviderVPCs:function (providerId, region) {
511+
var reqBody = {
512+
providerId: providerId,
513+
region: region
514+
};
515+
var url ='/aws/providers/describe/vpcs';
516+
return $http.post(fullUrl(url),reqBody, Auth.getHeaderObject());
494517
}
495518
};
496519
return serviceInterface;

client/cat3/src/partials/global.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@ option.script {
442442
@include theme-border-color;
443443
height: 30px;
444444
padding: 5px 15px;
445+
position:relative;
446+
z-index:3;
445447
}
446448

447449
.panel-title {

client/cat3/src/partials/sections/dashboard/workzone/instance/instance.html

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
</button>
2020
</span>
2121
<span class="pull-right">
22+
<span ng-if="filterBy">
23+
<span ng-repeat="chip in filterChips" class="chip"><strong>{{chip.key}}:&nbsp;</strong>{{chip.value}}</span>
24+
<span class="chip"><i class="fa fa-fw fa-close black cursor" ng-click="resetFilter()"></i></span>
25+
</span>
26+
<button type="button" title="Filters" class="btn btn-xs cat-btn-update" ng-click="fnShowFilters()">
27+
<i class="fa fa-fw fa-filter white"></i>
28+
</button>
2229
<button type="button" title="Import By Ip" class="btn btn-xs cat-btn-update"
2330
ng-click="isImportClickEnabled && instanceImportByIP()" ng-show="perms.launch">
2431
<i class="fa fa-plus white"></i>
@@ -29,10 +36,72 @@
2936
</button>
3037
</span>
3138
</div>
39+
<div class="box box-default instance-filter" ng-class="{'active':showFilters}">
40+
<div class="box-header with-border">
41+
<h3 class="box-title"><i class="fa fa-fw fa-filter"></i>Filter By</h3>
42+
<div class="box-tools pull-right">
43+
<button type="button" ng-click="resetFilter()" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-fw fa-refresh"></i>Reset</button>
44+
45+
</div>
46+
</div>
47+
<!-- /.box-header -->
48+
<div class="box-body form-horizontal">
49+
<div class="row">
50+
<div class="col-md-3">
51+
<div class="form-group">
52+
<label for="selectProvider" class="col-sm-3 control-label">Provider:</label>
53+
<div class="col-sm-9">
54+
<select class="form-control select2 select2-hidden-accessible" id="selectProvider" ng-model="filter.providerId" ng-options="provider._id as provider.providerName for provider in providers" ng-change="fnProviderChange()">
55+
<option value=''>All</option>
56+
</select>
57+
</div>
58+
</div>
59+
</div>
60+
<div class="col-md-1 loader-container">
61+
<span ng-show="providerLoading">
62+
<i class="fa fa-spinner fa-pulse fa-fw black"></i>
63+
</span>
64+
</div>
65+
<div class="col-md-3">
66+
<div class="form-group">
67+
<label for="selectRegion" class="col-sm-3 control-label">Region:</label>
68+
<div class="col-sm-9">
69+
<select class="form-control select2 select2-hidden-accessible" id="selectRegion" ng-model="filter.regionId" ng-options="region.region as region.region_name +' | '+region.region for region in regions" ng-change="fnRegionChange()">
70+
<option value=''>All</option>
71+
</select>
72+
</div>
73+
</div>
74+
</div>
75+
<div class="col-md-1 loader-container">
76+
<span ng-show="regionLoading">
77+
<i class="fa fa-spinner fa-pulse fa-fw black"></i>
78+
</span>
79+
</div>
80+
<div class="col-md-3">
81+
<div class="form-group">
82+
<label for="selectVPC" class="col-sm-3 control-label">VPC:</label>
83+
<div class="col-sm-9">
84+
<select class="form-control select2 select2-hidden-accessible" id="selectVPC" ng-options="vpc.VpcId as vpc.VpcId +' ('+vpc.CidrBlock+')' for vpc in vpcs" ng-model="filter.vpcId">
85+
<option value=''>All</option>
86+
</select>
87+
</div>
88+
</div>
89+
</div>
90+
<div class="col-md-1">
91+
<button type="button" title="Search" class="btn btn-xs cat-btn-update" ng-click="fnSearchFilters()">
92+
<i class="fa fa-fw fa-search white"></i>
93+
</button>
94+
</div>
95+
</div>
96+
<!-- /.row -->
97+
</div>
98+
</div>
99+
32100
<div class="alert alert-info text-center" ng-show="instanceList.length===0">
33101
No Instances Available
34102
</div>
35-
<section id="cardView" class="scrollContent" ng-show="isCardViewActive">
103+
104+
<section id="cardView" class="scrollContent" ng-show="isCardViewActive">
36105
<div class="card-wrapper" ng-repeat="inst in instanceList" ng-mouseover="overHandler()" ng-mouseout="outHandler()">
37106
<div class="card" ng-click="selectCard(inst._id);" ng-class="{'card-border' :inst._id == selectedCard}">
38107
<div class="card-title">
@@ -56,7 +125,7 @@
56125
</div>
57126
</div>
58127
<div class="instance-ip">
59-
<strong>{{inst.instanceIP}}</strong>
128+
<strong ng-if="inst.instanceIP">{{inst.instanceIP}}</strong><strong ng-if="!inst.instanceIP && inst.privateIpAddress">{{inst.privateIpAddress}}</strong>
60129
</div>
61130
<div class="provider-id" title="{{getPlatformId(inst.providerType,inst.platformId)}}">
62131
{{getPlatformId(inst.providerType,inst.platformId)}}
@@ -176,4 +245,4 @@
176245
</div>
177246
</section>
178247
</div>
179-
</div>
248+
</div>

0 commit comments

Comments
 (0)