Skip to content

Commit

Permalink
cleanup console logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Aug 14, 2015
1 parent 754e9e0 commit 975ab61
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 175 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/*
*
* @licstart The following is the entire license notice for the
* @licstart The following is the entire license notice for the
* JavaScript code in this page.
*
*
* Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
* This file is part of RockStor.
*
*
* RockStor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
*
* RockStor is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* @licend The above is the entire license notice
* for the JavaScript code in this page.
*
*
*/

ROCKSTOR_LOG_LEVEL = 'debug';
Expand All @@ -31,7 +31,6 @@ logger = function() {
var obj = {};
obj.log = function(msg, log_level) {
if (_.indexOf(LOG_LEVELS[log_level]) >= _.indexOf(LOG_LEVELS[ROCKSTOR_LOG_LEVEL])) {
// console.log(msg);
}
}
_.each(LOG_LEVELS, function(level) {
Expand All @@ -42,4 +41,3 @@ logger = function() {
return obj;

}();

1 change: 0 additions & 1 deletion src/rockstor/storageadmin/static/storageadmin/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,6 @@ $(document).ready(function() {
});

$('#donate-modal #donateYes').click(function(event) {
console.log('donate yes clicked');
contrib = $('#donate-modal input[type="radio"][name="contrib"]:checked').val();
if (contrib=='custom') {
contrib = $('#custom-amount').val();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ AddShareView = Backbone.View.extend({
_this.slider.setValue((size_value));
}
});



$('#add-share-form input').tooltip({placement: 'right'});

_this.$('#compression').tooltip({
Expand Down Expand Up @@ -152,7 +152,6 @@ AddShareView = Backbone.View.extend({
size_value = size_value*1024*1024;
}

console.log('compression = ' + compression);
$.ajax({
url: "/api/shares",
type: "POST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ ConfigBackupView = RockstorLayoutView.extend({
},

newBackup: function() {
console.log('in newBackup');
var _this = this;
var button = _this.$('#new-backup');
if (buttonDisabled(button)) return false;
Expand All @@ -65,11 +64,9 @@ ConfigBackupView = RockstorLayoutView.extend({
contentType: "application/json",
success: function() {
enableButton(button);
console.log('backup successful');
_this.collection.fetch({reset: true});
},
error: function(xhr, status, error) {
console.log("error in config backup");
enableButton(button);
}
});
Expand All @@ -92,7 +89,6 @@ ConfigBackupView = RockstorLayoutView.extend({
_this.collection.fetch({reset: true});
},
error: function(xhr, status, error) {
console.log('error while deleting config backup');
enableButton(button);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ DiskDetailsLayoutView = RockstorLayoutView.extend({
var errorlog = this.smartinfo.get('errorlog') || [];
var testlog = this.smartinfo.get('testlog') || [];
var testlogdetail = this.smartinfo.get('testlogdetail') || [];
console.log('attributes ', attributes);
$(this.el).html(this.template({disk: this.disk, attributes: attributes,
capabilities: capabilities,
errorlogsummary: errorlogsummary,
Expand All @@ -92,7 +91,6 @@ DiskDetailsLayoutView = RockstorLayoutView.extend({
var button = $(event.currentTarget);
if (buttonDisabled(button)) return false;
disableButton(button);
console.log('refreshing');
$.ajax({
url: '/api/disks/smart/info/' + _this.diskName,
type: 'POST',
Expand All @@ -111,7 +109,6 @@ DiskDetailsLayoutView = RockstorLayoutView.extend({
if (buttonDisabled(button)) return false;
disableButton(button);
var test_type = $('#test_name').val();
console.log('test type', test_type);
$.ajax({
url: '/api/disks/smart/test/' + _this.diskName,
type: 'POST',
Expand Down
24 changes: 11 additions & 13 deletions src/rockstor/storageadmin/static/storageadmin/js/views/login.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/*
*
* @licstart The following is the entire license notice for the
* @licstart The following is the entire license notice for the
* JavaScript code in this page.
*
*
* Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
* This file is part of RockStor.
*
*
* RockStor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
*
* RockStor is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* @licend The above is the entire license notice
* for the JavaScript code in this page.
*
*
*/

LoginView = RockstorLayoutView.extend({
Expand All @@ -36,7 +36,7 @@ initialize: function() {
this.networkInterfaces.pageSize = RockStorGlobals.maxPageSize;
this.networkInterfaces.on("reset", this.saveAppliance, this);
this.appliances = new ApplianceCollection();

},

render: function() {
Expand Down Expand Up @@ -108,7 +108,7 @@ makeLoginRequest: function(username, password) {
data: {
username: username,
password: password,
},
},
success: function(data, status, xhr) {
_this.scanNetwork();

Expand All @@ -122,7 +122,7 @@ makeLoginRequest: function(username, password) {
scanNetwork: function() {
var _this = this;
$.ajax({
url: "/api/network",
url: "/api/network",
type: "POST",
dataType: "json",
success: function(data, status, xhr) {
Expand All @@ -146,15 +146,13 @@ setIp: function() {
},

saveAppliance: function() {
console.log('again inside save appliance');
var _this = this;
this.setIp();
// create current appliance if not created already
if (this.appliances.length > 0) {
var current_appliance = this.appliances.find(function(appliance) {
return appliance.get('current_appliance') == true;
return appliance.get('current_appliance') == true;
});
console.log(current_appliance);
}
if (_.isUndefined(current_appliance)) {
var new_appliance = new Appliance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ PoolRaidChange = RockstorWizardPage.extend({

save: function() {
var valid = $('#raid-change-form').valid();
console.log(valid);
if (valid) {
var raidLevel = this.$('#raid-level').val();
this.model.set('raidLevel', raidLevel);
Expand Down
Loading

0 comments on commit 975ab61

Please sign in to comment.