Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
arhimondr committed Sep 30, 2013
1 parent ecb090b commit fc29d43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions web/js/DiskInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ SMARTMonitoring.DiskInfo.prototype.compareTo = function(obj){
*
* @constructor
*/
SMARTMonitoring.Server = function(obj){
SMARTMonitoring.ServerInfo = function(obj){

obj = obj || {};

Expand Down Expand Up @@ -523,9 +523,9 @@ SMARTMonitoring.Server = function(obj){
* Compare 2 server priority
*
*
* @param {SMARTMonitoring.Server} obj
* @param {SMARTMonitoring.ServerInfo} obj
*/
SMARTMonitoring.Server.prototype.compareTo = function(obj){
SMARTMonitoring.ServerInfo.prototype.compareTo = function(obj){
return this.totalOverAllIndex > obj.totalOverAllIndex ? -1
: (this.totalOverAllIndex < obj.totalOverAllIndex ? 1 : 0);
}
2 changes: 1 addition & 1 deletion web/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $(function(){
url: 'http://localhost:8080/status',
dataType: 'jsonp',
success: function(data){
var diskInfo = new SMARTMonitoring.Server(data);
var diskInfo = new SMARTMonitoring.ServerInfo(data);
//debugger;
}
});
Expand Down

0 comments on commit fc29d43

Please sign in to comment.