This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
Health statistics #436
Open
ashandk
wants to merge
128
commits into
apache:gsoc-projects-2015
Choose a base branch
from
ashandk:HealthStatistics
base: gsoc-projects-2015
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Health statistics #436
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
9d3df24
adding Health Statistics.jag
ashandk 71b9586
Health Statistics Render
ashandk bfc7b46
Health Statistics Partial class
ashandk fdbef49
Health Statistics Charts
ashandk e51db92
Health Statistics OutPut Adapter and Event Formatter without Flight R…
ashandk bb090ee
Update OutPutadaptorRDBMStoPublishHealthStat.xml
ashandk 7484b0b
Update Average_Member_Load_Average.xml
ashandk 3643b5f
Event Formatter Flight Request And Data Source
ashandk f57c5b2
Merge branch 'HealthStatistics' of https://github.com/ashandk/stratos…
ashandk 3921c52
Data Source
ashandk c4064a3
Data Source Changes
ashandk ef16940
Data Source Changes
ashandk 5ca895e
ReadMe File to deploy cep artifacts
ashandk e0bb022
Health Spealling Correction
ashandk 4c65e70
Adding the Time Stamp to the Cartridge Agent Payload
ashandk e09334c
Adding the Time Stamp to the In FLight Request Payload
ashandk 225952e
Updating Read Me
ashandk 3c3fc11
Flight Request Count Formatter
ashandk 431710d
Changing SQL Column Assembly
ashandk 9c0fce9
Sending Member Load Average data to the RDBMS with TimeStamp
ashandk efa25eb
Sending Member Memory Consumption data to the RDBMS with TimeStamp
ashandk d168c16
Adding the licenses Header
ashandk d4115ed
Health Statistics DataSource and its Assembly
ashandk b1a40e8
changing local passwords
ashandk a6a7c46
changing database coloumns and removed datasource
ashandk 78270c1
Java Beans for the REST API
ashandk 3933aeb
REST Bean to get Average Memory Conumption
ashandk 6e20979
Delete InFlightRequest.java
ashandk 454a4d6
Delete AverageMemberMemory.java
ashandk 6b4c22f
Delete MemberLoadAverage.java
ashandk c54c26d
REST Bean to get Average Memory Conumption
ashandk cd2f3b8
Merge branch 'HealthStatistics' of https://github.com/ashandk/stratos…
ashandk 0f71e5e
REST Bean to get Average Memory Conumption
ashandk 60bf515
REST Bean to get Average Load Average
ashandk 5b2ce68
REST Bean to get In Flight Request
ashandk 57efe03
DataBase Connection for HealthStat
ashandk 24ab63f
REST API Imlementation
ashandk c0b43ea
REST API Changes
ashandk 4b01bd8
Changes
ashandk 5ab9159
Commiting the REST API for Health Statistics UI
ashandk 7112c1a
Implement Changes
ashandk f32dbea
Event Publishing Changes
ashandk 45e8c16
Adding Changes accoding to the CODE review.Changing REST urls on sugg…
ashandk 3888ceb
Commiting Java docs on methods which i have implemented for the REST …
ashandk 3702641
Commiting REST call methods to the REST API from jaggery, to get data…
ashandk 85c06f4
Adding UI changes on healthStatistic.hbs
ashandk 4449459
Updating the REST API method responses.
ashandk 380c28e
Validating REST API calls for null result sets.
ashandk 3fb9369
Adding Health Statistics jag modifications with body on load data for…
ashandk 9effd90
d3js chart tip libarary which use to give tool tips on charts.
ashandk e001cfc
Attaching the Health Statistics REST API calls controller. This class…
ashandk deaae58
RDBMS connection close method
ashandk 5d924a4
implemented close connection for every method which use connection ha…
ashandk 7616726
Validating the REST api response for null values in the UI side
ashandk 310ea34
This are the UI components. rest calls to the REST api.health statist…
ashandk 5d85797
Health Stat Publisher event formatter.This is to send all health stat…
ashandk 70a0e13
Adding flight count data to a new export stream definition to create …
ashandk 89f12ac
Chaning Health Stat topic.
ashandk cdd7534
Adding the new stream definition which create a new export stream tha…
ashandk d6e134e
Adding few minor changes to the UI
ashandk e7f7379
css style sheets for the health statistics UI
ashandk 598318e
Adding the helper js file for the health statistics UI
ashandk 80e6214
Commiting the tip js library
ashandk 3be909f
application topology button changes
ashandk 9782be5
Health statistics event formatter changing the output table assembly
ashandk 60a2232
cluster variable -> Cluster
ashandk 2b3de72
Connection handler class modification
ashandk 7269f4f
Changed the back button location and the headline margins.
ashandk eea5d39
Changing the partials and removing all the scripts and style sheets f…
ashandk 1490310
New health statistic js which include the javasripts for charts.
ashandk 3e3cc07
Adding averages/flight counts in to the New output stream definiton w…
ashandk e39d118
removing unused variables.
ashandk 064b4b3
REST api changes code improvements.
ashandk cabb1d0
application topology changes.
ashandk 36b2308
Fixed the bug in the button when onclick the colour doesn't change pr…
ashandk 09da05a
comments for the charts implementation.
ashandk 145bc25
Commiting the Ui changes
ashandk 55b1a91
Commiting the changes of rest_call jag
ashandk 2968805
Bug in the UI fixed.
ashandk db5e234
Enabling the left menu in the health statistics page.
ashandk 8c7f487
adding margin to the back button.
ashandk d6f2831
Commiting a new button to the Show Health Statistic in topology view …
ashandk 9886b3d
Changing button name to the Member/Cluster Health Statistic in topolo…
ashandk 8389da4
Commiting the REST API changes which is reviewd by Lahirus. Id to Clu…
ashandk 764e35c
mysql table clearing method implementation.
ashandk 71e5436
Commenting on the healthStatistic jag implementation
ashandk e8b30c2
Commiting the REST jaggery method changes.
ashandk b5d396c
d3 tool tip enabling library.
ashandk 9bd6304
Removing table data deletion method.
ashandk 4054b29
adding export stream to AverageHeathRequest excution plan.
ashandk 2db724f
Commiting the changes of configuaration document for CEP adapters.
ashandk 0b84314
REST API changes in StratosApiV41.java to enable quering using Start_…
ashandk beea127
Commiting the implementation for search health statistics data by giv…
ashandk 4ad2c7a
Changing UI for the new REST API.
ashandk ef4cd28
Changing UI REST call methods to the new REST Api.
ashandk 0566bf5
UI changes on the new REST API methods.
ashandk cdec6f4
health statistic get request methods will call the trigger the rest_c…
ashandk 8517d37
Configuration part for enabling and disabling the health statistic UI.
ashandk 723b78f
Adding the enabling UI feature configuration property to the jag file.
ashandk d30b81d
Commiting the new UI changes for charts against the REST API
ashandk 3642c35
Configuration to enable disable health stat UI. This will implement s…
ashandk ff4f633
Adding Div button to the HBS file
ashandk 83084d3
adding the java script to check the configuration and add button if t…
ashandk 072ca30
Git improving the code using the sonar cube.
ashandk 6fa845a
Removing auto assemling healthstat-datasources.xml datasource. Lettin…
ashandk 9798eee
Removing auto assembling the health statistic datasource.
ashandk 67a1f82
Commiting the sonarqube optimization for the implemented code of the …
ashandk 711e688
sonarqube optimization for the current implementation
ashandk 4a258dc
Adding new Jaggery rest call triggers in UI back end.
ashandk 1b7a77e
Git adding the application topology comments.
ashandk 212a22b
Adding new css classes to the UI for the comments recieved from Daksh…
ashandk f75bc4c
Git REST api request changes UI backend
ashandk 4216ddd
New UI css fields.
ashandk 2c1a677
Adding the new charts with tool tip
ashandk a1f9b30
Adding the health statistics renders/partials.
ashandk 0b87a40
Removing the formatter that are unneccesory.
ashandk d194c2a
UI changes to submit genaralizing the implementation.
ashandk 6207834
Java Script code review changes.
ashandk 626216d
Chaning the health statistics page URL
ashandk 7fa751e
Changing method names and adding comments.
ashandk 8c0264f
Adding class level comments.
ashandk 82753c1
Formatted the code.
ashandk d6cf9d0
including SQL Exception object in the RestAPIException.
ashandk c0dd060
Formatted the Code.
ashandk 65d770f
Removing unnecessary spaces.
ashandk cdf22cd
Reformatting the Code.
ashandk d5558cf
commiting changes for health stat charts.
ashandk fd28523
Changed and improved the implementation after getting the code review…
ashandk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
...rc/main/java/org/apache/stratos/common/beans/healthStatistics/AverageLoadAverageBean.java
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 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.apache.stratos.common.beans.healthStatistics; | ||
|
||
/* | ||
* This bean class may use to create the data transfer objects for Load Average data of clusters and members. | ||
* */ | ||
public class AverageLoadAverageBean { | ||
|
||
private static final long serialVersionUID = -7788619177798333712L; | ||
|
||
private final String clusterId; | ||
private final Long timeStamp; | ||
private final Double memberAverageLoadAverage; | ||
private final String memberId; | ||
|
||
public AverageLoadAverageBean(String clusterId, Long timeStamp, Double memberAverageLoadAverage, String memberId) { | ||
this.clusterId = clusterId; | ||
this.timeStamp = timeStamp; | ||
this.memberAverageLoadAverage = memberAverageLoadAverage; | ||
this.memberId = memberId; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class variables initialized via the constructor can be marked as final. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class variables changed to final variable. |
||
} | ||
|
||
public String getClusterId() { | ||
return clusterId; | ||
} | ||
|
||
public Double getMemberAverageLoadAverage() { | ||
return memberAverageLoadAverage; | ||
} | ||
|
||
public Long getTimeStamp() { | ||
return timeStamp; | ||
} | ||
|
||
public String getMemberId() { | ||
return memberId; | ||
} | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
...n/java/org/apache/stratos/common/beans/healthStatistics/AverageMemoryConsumptionBean.java
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,58 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.apache.stratos.common.beans.healthStatistics; | ||
|
||
/* | ||
* This bean class may use to create the data transfer objects for Average Memory data of clusters and members. | ||
* */ | ||
public class AverageMemoryConsumptionBean { | ||
|
||
private static final long serialVersionUID = -7788619177798333711L; | ||
|
||
private final String clusterId; | ||
private final Double memberAverageMemoryConsumption; | ||
private final Long timeStamp; | ||
private final String memberId; | ||
|
||
public AverageMemoryConsumptionBean(final String clusterId,final Double memberAverageMemoryConsumption,final Long timeStamp,final String memberId) { | ||
this.clusterId = clusterId; | ||
this.memberAverageMemoryConsumption = memberAverageMemoryConsumption; | ||
this.timeStamp = timeStamp; | ||
this.memberId = memberId; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class variables initialized via the constructor can be marked as final. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed the class variables into final. |
||
} | ||
|
||
public String getClusterId() { | ||
return clusterId; | ||
} | ||
|
||
public Double getMemberAverageMemoryConsumption() { | ||
return memberAverageMemoryConsumption; | ||
} | ||
|
||
public Long getTimeStamp() { | ||
return timeStamp; | ||
} | ||
|
||
public String getMemberId() { | ||
return memberId; | ||
} | ||
|
||
} | ||
|
51 changes: 51 additions & 0 deletions
51
...n/src/main/java/org/apache/stratos/common/beans/healthStatistics/InFlightRequestBean.java
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,51 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.apache.stratos.common.beans.healthStatistics; | ||
|
||
/* | ||
* This bean class may use to create the data transfer objects for Inflight request data of clusters. | ||
* */ | ||
public class InFlightRequestBean { | ||
|
||
private static final long serialVersionUID = -7788619177798333712L; | ||
|
||
private final String clusterId; | ||
private final Long timeStamp; | ||
private final Double inFlightRequestCount; | ||
|
||
public InFlightRequestBean(String clusterId, Long timeStamp, Double inFlightRequestCount) { | ||
this.clusterId = clusterId; | ||
this.timeStamp = timeStamp; | ||
this.inFlightRequestCount = inFlightRequestCount; | ||
} | ||
|
||
public String getClusterId() { | ||
return clusterId; | ||
} | ||
|
||
public Double getInFlightRequestCount() { | ||
return inFlightRequestCount; | ||
} | ||
|
||
public Long getTimeStamp() { | ||
return timeStamp; | ||
} | ||
|
||
} |
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
3 changes: 3 additions & 0 deletions
3
components/org.apache.stratos.manager.console/console/config/console.json
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"backendServerConfiguration": { | ||
"url": "%https.host%/api/v4.1" | ||
}, | ||
"healthStatistics": { | ||
"UI_enable": "false" | ||
} | ||
} |
117 changes: 117 additions & 0 deletions
117
...atos.manager.console/console/controllers/healthStatistics/healthStatistics_getrequest.jag
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,117 @@ | ||
<% | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
*/ | ||
var log = new Log("apachestratos.configure_request"), | ||
util = require('/controllers/rest/rest_calls.jag'), | ||
formtype = request.getParameter('formtype'), | ||
ChartType = request.getParameter('chartType'), | ||
Duration = request.getParameter('duration'), | ||
IdValue = request.getParameter('idValue'); | ||
|
||
var formSubmit; | ||
var DurationVal; | ||
|
||
//creatingTimeObjects | ||
var startTime = new Date(); | ||
var endTime = new Date(); | ||
|
||
//add login validator for pages | ||
include('/controllers/login/validator.jag'); | ||
|
||
//checking the interval for the required data to check | ||
if( "30Min" != Duration){ | ||
|
||
switch (Duration) { | ||
|
||
case "1Hour": | ||
DurationVal = 1; | ||
break; | ||
case "1Day": | ||
DurationVal = 24; | ||
break; | ||
case "1Week": | ||
DurationVal = 168; | ||
break; | ||
case "1Month": | ||
DurationVal = 672; | ||
break; | ||
} | ||
|
||
//substratcting hour from current time | ||
startTime.setHours(endTime.getHours() - DurationVal); | ||
|
||
} else { | ||
|
||
//substratcting hour from current time | ||
startTime.setMinutes(endTime.getMinutes() - 30); | ||
|
||
} | ||
|
||
//switch to trigger the rest call when needs | ||
try { | ||
switch (formtype) { | ||
|
||
case "MemoryConsumption": | ||
|
||
if("Cluster" == ChartType){ | ||
|
||
formSubmit = util.RESTCalls.getClusterMemoryAverageDetails(IdValue, startTime.getTime(),endTime.getTime()); | ||
break; | ||
} | ||
else{ | ||
formSubmit = util.RESTCalls.getMemberMemoryAvrageDetails(IdValue, startTime.getTime(),endTime.getTime()); | ||
break; | ||
} | ||
|
||
case "LoadAverage": | ||
|
||
if("Cluster" == ChartType){ | ||
formSubmit = util.RESTCalls.getClusterLoadAverageDetails(IdValue, startTime.getTime(),endTime.getTime()); | ||
break; | ||
} | ||
else{ | ||
formSubmit = util.RESTCalls.getMemberLoadAverageDetails(IdValue, startTime.getTime(),endTime.getTime()); | ||
break; | ||
} | ||
|
||
case "InFlight": | ||
formSubmit = util.RESTCalls.getFlightRequestDetails(IdValue, startTime.getTime(),endTime.getTime()); | ||
break; | ||
|
||
default: | ||
session.put("deploy-status", { "message": "Sorry Endpoint Error", "status": "error" }); | ||
} | ||
|
||
//vaidating the response and return | ||
if (formSubmit == undefined) | ||
{ | ||
print({"status": 'error', "message": "No Data found!"}); | ||
|
||
} else { | ||
print(formSubmit); | ||
} | ||
|
||
} catch (e) { | ||
log.warn(e); | ||
print({"status": 'error', "message": e.toString()}); | ||
} | ||
|
||
%> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to add class comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included the class level comments.