-
Notifications
You must be signed in to change notification settings - Fork 138
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
[Rockon] when adding storage pre-addition summary screen displays incorrectly #2933
Comments
Following the description of the issue in the forum thread linked above, we indeed see the following as the summary of the changes to be instantiated after the "Add Storage" procedure: The Backbone template is Line 17 in 812f1cf
The display of newly-added volumes is thus defined by the handlebars helper: rockstor-core/src/rockstor/storageadmin/static/storageadmin/js/views/rockons.js Lines 1617 to 1630 in 812f1cf
We could thus swap the 2 rows in questions to fix the bug, but this would most likely just cover the real source of the "bug" here. We indeed, use the construct for |
This is defined at: rockstor-core/src/rockstor/storageadmin/static/storageadmin/js/views/rockons.js Lines 1202 to 1204 in 812f1cf
Swapping the key:value here as follows... this.share_map = this.model.get('shares');
// this.share_map[this.$('#volume').val()] = this.$('#share').val();
this.share_map[this.$('#share').val()] = this.$('#volume').val();
this.model.set('shares', this.share_map); ... then rebuilding the static files...
|
The internal:external representation of volumes:shares in the summary table showed at the end of the Add Storage to a Rock-On process was the inverse to what it should have been (inverse of table headers). This commit swaps the order in the underlying JS object to correct this.
While the table is now displayed, properly, the update process itself fails, however: This is due to the fact that our backend is currently expecting the dict to be
While it would be more appropriate to be consistent across our various update objects here, the amount of refactoring required in our backend does not fit the current very late stage in our testing phase. I thus favor the first option laid out early in this thread: adjusting the |
The internal:external representation of volumes:shares in the summary table showed at the end of the Add Storage to a Rock-On process was the inverse to what it should have been (inverse of table headers). This commit adjusts the Handlebars helper used to display the newly added volume to swap the internal:external representations.
@FroggyFlox Re:
Agreed. We can address the referenced inconsistencies when we get to switching out some of our interface technologies. As you say, we should try to avoid deeper changes at the end of a testing phase. |
Thanks for the feedback! |
…rrect-summary Swap order of newVolumes representation in summary table #2933
Closing as fixed by #2942. |
As a continuation of #2904 that was fixed by #2914:
Thanks to forum user stevek who observed a similar behavior when adding storage to an installed Rockon:
https://forum.rockstor.com/t/syncthing-add-storage-function/10321/
I assume, it's probably the same root cause, just in a different place of the coding.
The text was updated successfully, but these errors were encountered: