From 3232e40a11da7d3f026912b2f756de4ebf5c4513 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Sun, 10 Jan 2016 17:01:31 +0000 Subject: [PATCH 1/4] test for fake-serial in new ui logic #1086 --- src/rockstor/storageadmin/static/storageadmin/js/views/disks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js index 5f9b3f6ec..4b987dd79 100644 --- a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js +++ b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js @@ -205,7 +205,7 @@ DisksView = Backbone.View.extend({ html += ''; html += ''; - if (serial == null || serial == '' || serial == diskName) { + if (serial == null || serial == '' || serial == diskName || serial.length == 48) { html += '
' + + '

Warning! Disk serial number or UUID is not legitimate or unique.

' + warning +'
'; }else{ From db6735fb634b17dd2b5d3ef97ef4346ebcbee3e0 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Sun, 10 Jan 2016 17:46:10 +0000 Subject: [PATCH 2/4] correct minor string addition syntax in serial warning #1086 --- src/rockstor/storageadmin/static/storageadmin/js/views/disks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js index 4b987dd79..f10f1b1c5 100644 --- a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js +++ b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js @@ -207,7 +207,7 @@ DisksView = Backbone.View.extend({ html += ''; if (serial == null || serial == '' || serial == diskName || serial.length == 48) { html += '
' + - + '

Warning! Disk serial number or UUID is not legitimate or unique.

' + warning +'
'; + '

Warning! Disk serial number or UUID is not legitimate or unique.

' + warning +''; }else{ html += serial; if (serial) { From 6c4c53b0d8b1342796da47136a8ba881982424f2 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Sun, 10 Jan 2016 17:51:37 +0000 Subject: [PATCH 3/4] remove reference to UUID in serial warning message #1086 There is no mechanism that reads the disk UUID that relates to the reason this message comes up so to avoid confusion with actual disk UUID's remove reference to it in the warning message as it only pertains to no / fake serial. --- src/rockstor/storageadmin/static/storageadmin/js/views/disks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js index f10f1b1c5..f2d5d3e2f 100644 --- a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js +++ b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js @@ -207,7 +207,7 @@ DisksView = Backbone.View.extend({ html += ''; if (serial == null || serial == '' || serial == diskName || serial.length == 48) { html += '
' + - '

Warning! Disk serial number or UUID is not legitimate or unique.

' + warning +'
'; + '

Warning! Disk serial number is not legitimate or unique.

' + warning +''; }else{ html += serial; if (serial) { From a3fc028ad97244d6897209ed06066b1c4492cea2 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Sun, 10 Jan 2016 17:57:14 +0000 Subject: [PATCH 4/4] add full stop to serial warning explanation #1086 --- src/rockstor/storageadmin/static/storageadmin/js/views/disks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js index f2d5d3e2f..4c2d60400 100644 --- a/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js +++ b/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js @@ -174,7 +174,7 @@ DisksView = Backbone.View.extend({ Handlebars.registerHelper('display_disks_tbody', function() { var html = '', - warning = 'Disk names may change unfavourably upon reboot leading to inadvertent drive reallocation and potential data loss. This error is caused by the source of these disks such as your Hypervisor or SAN. Please ensure that disks are provided with unique serial numbers before proceeding further'; + warning = 'Disk names may change unfavourably upon reboot leading to inadvertent drive reallocation and potential data loss. This error is caused by the source of these disks such as your Hypervisor or SAN. Please ensure that disks are provided with unique serial numbers before proceeding further.'; this.collection.each(function(disk, index) { var diskName = disk.get('name'),