|
|
|
@ -53,6 +53,8 @@ import java.util.Set;
|
|
|
|
|
import java.util.UUID; |
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
|
|
import static com.fr.base.ConnectionLogHelper.logDesignerConnectionOperateMessage; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Connection List Pane. |
|
|
|
|
*/ |
|
|
|
@ -354,22 +356,20 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
|
|
|
|
|
return Configurations.modify(new WorkerFacade(ConnectionConfig.class) { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
removedConnNames.forEach(n -> { |
|
|
|
|
MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Data_Connection", "Dec-Data_Connection_Design", |
|
|
|
|
n, OperateConstants.DELETE, InterProviderFactory.getProvider().getLocText("Dec-Designer_User"), null, null)); |
|
|
|
|
ConnectionConfig.getInstance().removeConnection(n); |
|
|
|
|
}); |
|
|
|
|
removedConnNames.forEach(n -> ConnectionConfig.getInstance().removeConnection(n)); |
|
|
|
|
logDesignerConnectionOperateMessage(removedConnNames, OperateConstants.DELETE); |
|
|
|
|
int innerRemaining = remaining; |
|
|
|
|
List<String> addConnNames = new ArrayList<>(); |
|
|
|
|
for (ConnectionBean cb : addedOrUpdatedConnections) { |
|
|
|
|
if (innerRemaining > 0) { |
|
|
|
|
MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Data_Connection", "Dec-Data_Connection_Design", |
|
|
|
|
cb.getName(), OperateConstants.ADD, InterProviderFactory.getProvider().getLocText("Dec-Designer_User"), null, null)); |
|
|
|
|
ConnectionConfig.getInstance().addConnectionWithoutCheck(cb.getName(), cb.getConnection()); |
|
|
|
|
innerRemaining--; |
|
|
|
|
addConnNames.add(cb.getName()); |
|
|
|
|
} else { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
logDesignerConnectionOperateMessage(addConnNames, OperateConstants.ADD); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|