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