mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-29 00:30:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74c27d9637 | ||
|
|
216c83d7fa |
@@ -214,10 +214,18 @@ export class ConnectionClientService implements OnModuleInit {
|
|||||||
this.INTERNAL_getAllConnections({ customer_name }).then((res) => ({
|
this.INTERNAL_getAllConnections({ customer_name }).then((res) => ({
|
||||||
customer_name,
|
customer_name,
|
||||||
customer_id,
|
customer_id,
|
||||||
platformConnections: JSON.parse(res.platformConnections),
|
platformConnections: res.platformConnections
|
||||||
productConnections: JSON.parse(res.productConnections),
|
? JSON.parse(res.platformConnections)
|
||||||
productNetworkConfigs: JSON.parse(res.productNetworkConfigs),
|
: [],
|
||||||
platformNetworkConfigs: JSON.parse(res.platformNetworkConfigs),
|
productConnections: res.productConnections
|
||||||
|
? JSON.parse(res.productConnections)
|
||||||
|
: [],
|
||||||
|
productNetworkConfigs: res.productNetworkConfigs
|
||||||
|
? JSON.parse(res.productNetworkConfigs)
|
||||||
|
: [],
|
||||||
|
platformNetworkConfigs: res.platformNetworkConfigs
|
||||||
|
? JSON.parse(res.platformNetworkConfigs)
|
||||||
|
: [],
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -235,20 +243,22 @@ export class ConnectionClientService implements OnModuleInit {
|
|||||||
customer_id,
|
customer_id,
|
||||||
} = cc;
|
} = cc;
|
||||||
|
|
||||||
platformConnections.forEach((plc) => {
|
platformConnections &&
|
||||||
const productConnection = productConnections.find(
|
platformConnections.forEach((plc) => {
|
||||||
(prc) => prc.id === plc.config_id,
|
const productConnection = productConnections.find(
|
||||||
);
|
(prc) => prc.id === plc.config_id,
|
||||||
if (!productConnection) productConnectionsMissing.push(plc);
|
);
|
||||||
});
|
if (!productConnection) productConnectionsMissing.push(plc);
|
||||||
|
});
|
||||||
|
|
||||||
platformNetworkConfigs.forEach((platNetConfig) => {
|
platformNetworkConfigs &&
|
||||||
const productNetworkConfig = productNetworkConfigs.find(
|
platformNetworkConfigs.forEach((platNetConfig) => {
|
||||||
(prodNetConfig) => prodNetConfig.id === platNetConfig.config_id,
|
const productNetworkConfig = productNetworkConfigs.find(
|
||||||
);
|
(prodNetConfig) => prodNetConfig.id === platNetConfig.config_id,
|
||||||
if (!productNetworkConfig)
|
);
|
||||||
productNetworkConfigsMissing.push(platNetConfig);
|
if (!productNetworkConfig)
|
||||||
});
|
productNetworkConfigsMissing.push(platNetConfig);
|
||||||
|
});
|
||||||
|
|
||||||
const updatePromises: Promise<any>[] = [];
|
const updatePromises: Promise<any>[] = [];
|
||||||
for (const network_config of productNetworkConfigsMissing) {
|
for (const network_config of productNetworkConfigsMissing) {
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export class ConnectorController {
|
|||||||
@Headers('dadosfera-lang') language,
|
@Headers('dadosfera-lang') language,
|
||||||
@Query() queries: GetAllDto,
|
@Query() queries: GetAllDto,
|
||||||
) {
|
) {
|
||||||
this.logger.info('/upload - Upload Connector Route');
|
this.logger.info('/GET - getAllConnectors Route');
|
||||||
if (!language) language = 'en-us';
|
if (!language) language = 'en-us';
|
||||||
|
|
||||||
const { search, size, page, ...filters } = queries;
|
const { search, size, page, ...filters } = queries;
|
||||||
@@ -120,7 +120,7 @@ export class ConnectorController {
|
|||||||
page: page || 1,
|
page: page || 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
const connectors = JSON.parse(response.connectors).connectors;
|
const connectors = JSON.parse(response.connectors);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
message: response.message,
|
message: response.message,
|
||||||
@@ -153,7 +153,7 @@ export class ConnectorController {
|
|||||||
@Param('plugin') plugin: string,
|
@Param('plugin') plugin: string,
|
||||||
@Query('version') version: string,
|
@Query('version') version: string,
|
||||||
) {
|
) {
|
||||||
this.logger.info('/upload - Upload Connector Route');
|
this.logger.info('/GET/:plugin - getConnector Route');
|
||||||
if (!language) language = 'en-us';
|
if (!language) language = 'en-us';
|
||||||
|
|
||||||
const pluginId = `${plugin}-${version}`;
|
const pluginId = `${plugin}-${version}`;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user