|
|
@ -76,7 +76,6 @@ export class ListItemModel extends Model<{ |
|
|
|
|
|
|
|
|
|
|
|
return api.updateConnection(connection).then(re => { |
|
|
|
return api.updateConnection(connection).then(re => { |
|
|
|
if (!re.errorCode) { |
|
|
|
if (!re.errorCode) { |
|
|
|
this.setIsEdit(false, oldName); |
|
|
|
|
|
|
|
this.model.connections = this.model.connections.map(item => { |
|
|
|
this.model.connections = this.model.connections.map(item => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
...item, |
|
|
@ -103,7 +102,7 @@ export class ListItemModel extends Model<{ |
|
|
|
item.connectionData = JSON.parse(item.connectionData as string); |
|
|
|
item.connectionData = JSON.parse(item.connectionData as string); |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (name === this.model.connectionSelected) { |
|
|
|
if (name === this.model.connectionSelected) { |
|
|
|
this.model.connectionSelected = ''; |
|
|
|
this.model.connectionSelected = BI.size(this.model.connections) > 0 ? this.model.connections[0].connectionName : ''; |
|
|
|
} |
|
|
|
} |
|
|
|
api.shutdownConnectionStatus(name); |
|
|
|
api.shutdownConnectionStatus(name); |
|
|
|
}); |
|
|
|
}); |
|
|
|