Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade backbone #1484

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
535 changes: 269 additions & 266 deletions src/rockstor/storageadmin/static/storageadmin/js/rockstor.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ AddAFPShareView = RockstorLayoutView.extend({
"click #cancel": "cancel"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.afp_add_afp_share;
this.shares = new ShareCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ AddGroupView = RockstorLayoutView.extend({
"click #cancel": "cancel"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
// set template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ AddReplicationTaskView = RockstorLayoutView.extend({
},

initialize: function() {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.replication_add_replication_task;
this.shares = new ShareCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ AddSambaExportView = RockstorLayoutView.extend({
'click #shadow_copy': 'toggleSnapPrefix'
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.samba_add_samba_export;
this.shares = new ShareCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ AddShareView = Backbone.View.extend({
"click #js-cancel": "cancel"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
var _this = this;
this.pools = new PoolCollection();
this.pools.pageSize = RockStorGlobals.maxPageSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ AddUserView = RockstorLayoutView.extend({
"click #cancel": "cancel"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
// set template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ BlinkDiskView = RockstorLayoutView.extend({
'click #cancel': 'cancel'
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.disk_blink_disks;
this.disks = new DiskCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ ConfigureServiceView = RockstorLayoutView.extend({
"click #mode": "toggleNutFields"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
var _this = this;
this.constructor.__super__.initialize.apply(this, arguments);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ DashboardConfigView = Backbone.View.extend({
"click .widget-name": "widgetClicked"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.dashboardconfig = this.options.dashboardconfig;
this.template = window.JST.dashboard_dashboard_config;
this.parentView = this.options.parentView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

DiskDetailsLayoutView = RockstorLayoutView.extend({

initialize: function () {
initialize: function (options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
this.diskName = this.options.diskName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ DockerServiceView = Backbone.View.extend({
'switchChange.bootstrapSwitch': 'switchStatus',
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.template = window.JST.rockons_docker_service;
this.serviceName = 'docker';
this.service = new Service({name: this.serviceName});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ NetworkConnectionView = RockstorLayoutView.extend({
'change #ctype': 'renderCTypeOptionalFields'
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.connectionId = this.options.connectionId || null;
this.connection = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ EditNFSExportView = RockstorLayoutView.extend({
'click #cancel': 'cancel'
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.nfs_edit_nfs_export;
this.shares = new ShareCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

PoolDetailsLayoutView = RockstorLayoutView.extend({

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
this.poolName = this.options.poolName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ PoolRebalanceTableModule = RockstorModuleView.extend({
"click #js-poolrebalance-cancel": "cancel"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.template = window.JST.pool_poolrebalance_table_template;
this.startRebalanceTemplate = window.JST.pool_poolrebalance_start_template;
this.module_name = 'poolrebalances';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ PoolScrubTableModule = RockstorModuleView.extend({
"click #js-poolscrub-cancel": "cancel"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.template = window.JST.pool_poolscrub_table_template;
this.startScrubTemplate = window.JST.pool_poolscrub_start_template;
this.module_name = 'poolscrubs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ ReplicaReceiveTrailsView = RockstorLayoutView.extend({
events: {
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
// set template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ ReplicaTrailsView = RockstorLayoutView.extend({
events: {
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
// set template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ RollbackView = RockstorLayoutView.extend({
'click #js-confirm-rollback-submit': 'confirmRollback'
},

initialize: function() {
initialize: function(option) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
// Templates
this.template = window.JST.share_rollback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
SetupSystemView = Backbone.View.extend({
tagName: 'div',

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.template = window.JST.setup_system;
this.sysinfo = this.options.sysinfo;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ ShareDetailsLayoutView = RockstorLayoutView.extend({
"click #js-confirm-share-delete": "confirmShareDelete",
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
this.shareName = this.options.shareName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ ShareUsageModule = RockstorModuleView.extend({

},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.template = window.JST.share_share_usage_module;
this.editTemplate = window.JST.share_share_usage_edit;
this.module_name = 'share-usage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ SmartcustomDiskView = RockstorLayoutView.extend({
'click #cancel': 'cancel'
},

initialize: function () {
initialize: function (options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.disk_smartcustom_disks;
this.disks = new DiskCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ SnapshotsView = SnapshotsCommonView.extend({
"click #js-snapshot-delete-multiple": "deleteMultipleSnapshots"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.share_snapshots;
this.addTemplate = window.JST.share_snapshot_add_template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ SnapshotsTableModule = SnapshotsCommonView.extend({
"click #js-snapshot-delete-multiple": "deleteMultipleSnapshots"
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
this.template = window.JST.share_snapshots_table_template;
this.addTemplate = window.JST.share_snapshot_add;
this.module_name = 'snapshots';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ SpindownDiskView = RockstorLayoutView.extend({
'click #cancel': 'cancel'
},

initialize: function () {
initialize: function (options) {
this.options = options || {}
var _this = this;
this.constructor.__super__.initialize.apply(this, arguments);
this.template = window.JST.disk_spindown_disks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ TasksView = RockstorLayoutView.extend({
events: {
},

initialize: function() {
initialize: function(options) {
this.options = options || {}
// call initialize of base
this.constructor.__super__.initialize.apply(this, arguments);
// set template
Expand Down
4 changes: 2 additions & 2 deletions src/rockstor/storageadmin/templates/storageadmin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
<script src="/static/js/lib/d3.v3.min.js"></script>
<script src="/static/js/lib/d3-tip.js"></script>
<script src="/static/js/lib/cubism.v1.js"></script>
<script src="/static/js/lib/underscore-1.3.2.js"></script>
<script src="/static/js/lib/backbone-0.9.2.js"></script>
<script src="/static/js/lib/underscore.js"></script>
<script src="/static/js/lib/backbone.js"></script>
<script src="/static/js/lib/backbone.routefilter.min.js"></script>
<script src="/static/js/lib/cocktail.js"></script>
<script src="/static/js/lib/bootstrap.js"></script>
Expand Down