Skip to content

Commit

Permalink
DNN-35360 - Azure Storage disconnect name fix (#3449)
Browse files Browse the repository at this point in the history
  • Loading branch information
berkarslan-xo authored and donker committed Jan 11, 2020
1 parent 6e72329 commit 4ba7208
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ define(['jquery', 'knockout', 'main/pager', 'main/validator', 'main/config', 'ma
newConfigurations[key] = "";
}
});
var displayName = e === true ? item.name : getNewName(item);
var displayName = e === true ? item.displayName : getNewName(item);
closeAllSubConnectors();
var newConnection = Object.assign(connections[0].initialObject, { id: null, configurations: newConfigurations, displayName: displayName, open: true });
var newConn = wrapConnection(newConnection);
Expand All @@ -377,9 +377,9 @@ define(['jquery', 'knockout', 'main/pager', 'main/validator', 'main/config', 'ma
var getNewName = function (item) {
var connections = item.connections();
var index = connections.length;
var newName = item.name + " - " + index;
var newName = item.displayName + " - " + index;
while (connections.some(function (conn) { return conn.displayName() === newName })) {
newName = item.name + " - " + ++index;
newName = item.displayName + " - " + ++index;
}
return newName;
}
Expand Down Expand Up @@ -491,6 +491,7 @@ define(['jquery', 'knockout', 'main/pager', 'main/validator', 'main/config', 'ma
connections: ko.observable(_connections),
supportsMultiple: ko.observable(_connections[0].supportsMultiple),
name: _connections[0].name,
displayName: _connections[0].displayName(),
isOpen: ko.observable(false),
height: ko.observable(0),

Expand Down

0 comments on commit 4ba7208

Please sign in to comment.