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

cinder/manila: reduce creation of global variables #2292

Open
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $(document).ready(function($) {
{
//FIXME: right now, there's no good way to localize strings in js :/
if (confirm("All volumes in the backend will be made unavailable; do you really want to delete this backend?")) {
volume_entry = $(this).data("volumeid");
var volume_entry = $(this).data("volumeid");

// delete the backend entry from the attributes JSON
$('#proposal_attributes').removeJsonAttribute('volumes/' + volume_entry);
Expand Down Expand Up @@ -66,8 +66,7 @@ $(document).ready(function($) {
$('#backend_entries').html()
);
}
volumes = $('#proposal_attributes').readJsonAttribute('volumes', {});
volume_defaults = $('#proposal_attributes').readJsonAttribute('volume_defaults', {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is volume_defaults no longer needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to have been an unused variable.

var volumes = $('#proposal_attributes').readJsonAttribute('volumes', {});

// Render forms for backend list
$('#cinder_backends').replaceWith(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(document).ready(function($) {
{
//FIXME: right now, there's no good way to localize strings in js :/
if (confirm("All shares in the backend will be made unavailable; do you really want to delete this backend?")) {
share_entry = $(this).data("shareid");
var share_entry = $(this).data("shareid");

// delete the backend entry from the attributes JSON
$('#proposal_attributes').removeJsonAttribute('shares/' + share_entry);
Expand Down Expand Up @@ -64,8 +64,7 @@ $(document).ready(function($) {
$('#backend_entries').html()
);
}
shares = $('#proposal_attributes').readJsonAttribute('shares', {});
share_defaults = $('#proposal_attributes').readJsonAttribute('share_defaults', {});
var shares = $('#proposal_attributes').readJsonAttribute('shares', {});

// Render forms for backend list
$('#manila_backends').replaceWith(
Expand Down