fixed generage sensor config
This commit is contained in:
parent
ad83a17835
commit
db7244a85e
|
@ -153,7 +153,7 @@ public class SensorService {
|
|||
|
||||
target.setConnection(connection);
|
||||
|
||||
Map<String, Object> auth = this.getAuth(infraService);
|
||||
Map<String, Object> auth = this.getAuth(dbSensor.getCrawler(), infraService);
|
||||
|
||||
target.setAuth(auth);
|
||||
|
||||
|
@ -202,7 +202,7 @@ public class SensorService {
|
|||
private void setQueryAndMapping(MetaCrawler metaCrawler, List<Keys> keysList, QueryInfo queryInfo, MappingInfo mappingInfo) {
|
||||
|
||||
switch (metaCrawler.getId()) {
|
||||
case 11:
|
||||
case 11: // mysql
|
||||
{
|
||||
String query = "show status where ";
|
||||
// queryInfo.setQuery("show status where ");
|
||||
|
@ -228,7 +228,7 @@ public class SensorService {
|
|||
|
||||
mappingInfo.setKeyColumns(keyColumns);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -251,12 +251,19 @@ public class SensorService {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
private Map<String, Object> getAuth(com.loafle.overflow.module.infra.model.InfraService infraService) {
|
||||
private Map<String, Object> getAuth(MetaCrawler metaCrawler, com.loafle.overflow.module.infra.model.InfraService infraService) {
|
||||
|
||||
Map<String, Object> auth = new HashMap<>();
|
||||
auth.put("url", "jdbc:mysql://"+StringConvertor.intToIp(infraService.getHost().getIp())+":"+String.valueOf(infraService.getPort()));
|
||||
auth.put("id", "docker"); // FIXME: Auth Info
|
||||
auth.put("pw", "qwer5795QWER"); // FIXME: Auth Info
|
||||
|
||||
switch (metaCrawler.getId()) {
|
||||
case 11: // mysql
|
||||
{
|
||||
auth.put("url", "jdbc:mysql://"+StringConvertor.intToIp(infraService.getHost().getIp())+":"+String.valueOf(infraService.getPort()));
|
||||
auth.put("id", "docker"); // FIXME: Auth Info
|
||||
auth.put("pw", "qwer5795QWER"); // FIXME: Auth Info
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return auth;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user