mirror of
https://github.com/dadosfera/maestro.git
synced 2026-08-31 19:58:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb2c0ab23e | ||
|
|
feec48114c | ||
|
|
7bee8d83a9 | ||
|
|
84b2dbd178 | ||
|
|
36706ff3dd | ||
|
|
0164e6978a | ||
|
|
7d371926f5 | ||
|
|
75e9e97f04 | ||
|
|
b5f58b99fd | ||
|
|
503293439f | ||
|
|
eed57ff039 | ||
|
|
ef2a24a0c3 | ||
|
|
8a31e11445 | ||
|
|
2013e97e20 | ||
|
|
dd271205ba | ||
|
|
a1f9f14897 | ||
|
|
b7efa2f58d | ||
|
|
395e36581d | ||
|
|
97a54f9267 | ||
|
|
00b0e00bd0 | ||
|
|
9188536161 | ||
|
|
1ae8151184 | ||
|
|
3d77980dd2 | ||
|
|
fc784e2d6d |
@@ -1,4 +1,4 @@
|
||||
<p align="center">
|
||||
<image src="./assets/maestro.svg" style="width:10rem">
|
||||
<h1 align="center">Maestro</h1>
|
||||
</p>
|
||||
</p>
|
||||
Generated
+16
-9220
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -30,7 +30,7 @@
|
||||
"@nestjs/microservices": "^8.4.3",
|
||||
"@nestjs/platform-express": "^8.4.3",
|
||||
"@nestjs/swagger": "^5.2.1",
|
||||
"@victorradael/protospack": "^1.5.5",
|
||||
"@victorradael/protospack": "^1.6.1",
|
||||
"axios": "^0.25.0",
|
||||
"dotenv": "^14.2.0",
|
||||
"helmet": "^5.0.2",
|
||||
|
||||
@@ -182,22 +182,31 @@ export class PipelinesClientService implements OnModuleInit {
|
||||
return logsPipelineResponse;
|
||||
}
|
||||
|
||||
async getPipelineStatus(data: IIdRequest) {
|
||||
async getPipelineStatus(data) {
|
||||
console.log('PipelinesClientService', 'GetPipelineStatus');
|
||||
|
||||
const statusPipelineResponse = await new Promise((resolve, reject) => {
|
||||
this.pipelineService.getPipelineStatus(data).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
error(err) {
|
||||
console.log('Observable Error');
|
||||
reject(err);
|
||||
},
|
||||
complete() {
|
||||
console.log('done');
|
||||
},
|
||||
});
|
||||
this.pipelineService
|
||||
.getPipelineStatus(objectSnakeToCamel(data))
|
||||
.subscribe({
|
||||
next(x) {
|
||||
const statusArray = x.status.sort((a, b) => {
|
||||
if (a.id < b.id) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
});
|
||||
resolve({ status: statusArray });
|
||||
},
|
||||
error(err) {
|
||||
console.log('Observable Error');
|
||||
reject(err);
|
||||
},
|
||||
complete() {
|
||||
console.log('done');
|
||||
},
|
||||
});
|
||||
})
|
||||
.then((res) => res)
|
||||
.catch((err) => {
|
||||
@@ -214,6 +223,11 @@ export class PipelinesClientService implements OnModuleInit {
|
||||
.triggerPipeline(objectSnakeToCamel({ id, info }))
|
||||
.subscribe({
|
||||
next(x) {
|
||||
if (x.status == false) {
|
||||
reject(
|
||||
'This pipeline is not ready yet to execute, Try again later!',
|
||||
);
|
||||
}
|
||||
resolve(x);
|
||||
},
|
||||
error(err) {
|
||||
|
||||
@@ -96,12 +96,12 @@ export class CatalogController {
|
||||
}
|
||||
|
||||
@Get('column-metadata')
|
||||
async getOneColumnMetadata(@Body() body) {
|
||||
async getOneColumnMetadata(@Body() body, @Query() params) {
|
||||
console.log(`/catalog`, 'ON GET ONE COLUMN METADATA ROUTE');
|
||||
|
||||
const catalogService = new CatalogService();
|
||||
|
||||
const res = await catalogService.getOneColumnMetadata(body);
|
||||
const res = await catalogService.getOneColumnMetadata(body, params);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -119,12 +119,12 @@ export class CatalogController {
|
||||
}
|
||||
|
||||
@Get('data-preview')
|
||||
async getOneDataPreview(@Body() body) {
|
||||
async getOneDataPreview(@Body() body, @Query() params) {
|
||||
console.log(`/catalog`, 'ON GET ONE DATAPREVIEW ROUTE');
|
||||
|
||||
const catalogService = new CatalogService();
|
||||
|
||||
const res = await catalogService.getOneDataPreview(body);
|
||||
const res = await catalogService.getOneDataPreview(body, params);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -140,6 +140,17 @@ export class CatalogController {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Get('data-status')
|
||||
async createDataStatus(@Body() body) {
|
||||
console.log(`/catalog`, 'ON CREATE DATA STATUS ROUTE');
|
||||
|
||||
const catalogService = new CatalogService();
|
||||
|
||||
const res = await catalogService.createDataStatus(body);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@Get('data-description')
|
||||
async getDataDescription(@Body() body) {
|
||||
console.log(`/catalog`, 'ON GET DATA DESCRIPTION ROUTE');
|
||||
@@ -151,6 +162,17 @@ export class CatalogController {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Post('data-description')
|
||||
async createDataDescription(@Body() body) {
|
||||
console.log(`/catalog`, 'ON CREATE DATA DESCRIPTION ROUTE');
|
||||
|
||||
const catalogService = new CatalogService();
|
||||
|
||||
const res = await catalogService.createDataDescription(body);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@Get('data-docs')
|
||||
async getDataDocs(@Body() body) {
|
||||
console.log(`/catalog`, 'ON GET DATA DOCS ROUTE');
|
||||
@@ -162,6 +184,17 @@ export class CatalogController {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Post('data-docs')
|
||||
async createDataDocs(@Body() body) {
|
||||
console.log(`/catalog`, 'ON CREATE DATA DOCS ROUTE');
|
||||
|
||||
const catalogService = new CatalogService();
|
||||
|
||||
const res = await catalogService.createDataDocs(body);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@Get('data-rating')
|
||||
async getDataRating(@Body() body) {
|
||||
console.log(`/catalog`, 'ON GET DATA RATING ROUTE');
|
||||
@@ -219,12 +252,12 @@ export class CatalogController {
|
||||
}
|
||||
|
||||
@Get('data-review')
|
||||
async getDataReview(@Body() body) {
|
||||
async getDataReview(@Body() body, @Query() params) {
|
||||
console.log(`/catalog`, 'ON GET DATA REVIEW ROUTE');
|
||||
|
||||
const catalogService = new CatalogService();
|
||||
|
||||
const res = await catalogService.getDataReview(body);
|
||||
const res = await catalogService.getDataReview(body, params);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,14 @@ class CatalogService {
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/all/`,
|
||||
);
|
||||
console.log(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/all/`,
|
||||
);
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/all/`);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -21,9 +23,12 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data_apps/`,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data_apps/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -33,9 +38,15 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.delete(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data_apps/${id}/`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/data_apps/${id}/`,
|
||||
);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -45,8 +56,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/dashboard-metabase/`,
|
||||
`${nimbusUrl}/api/catalog/dashboard-metabase/`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -57,9 +73,20 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/dashboard-metabase/${id}`,
|
||||
`${nimbusUrl}/api/catalog/dashboard-metabase/${id}`,
|
||||
);
|
||||
console.log(data);
|
||||
|
||||
// const [, path] = data.iframe_url.split('.dadosfera');
|
||||
// const host = `httpss://metabase-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
// data.iframe_url = host + path;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -69,8 +96,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-metadata/`,
|
||||
`${nimbusUrl}/api/catalog/table-metadata/`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -81,8 +113,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-metadata/`,
|
||||
`${nimbusUrl}/api/catalog/table-metadata/`,
|
||||
{ params: params },
|
||||
);
|
||||
return data;
|
||||
@@ -94,20 +131,31 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.delete(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-metadata/${id}`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-metadata/${id}`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
async getOneColumnMetadata(body) {
|
||||
async getOneColumnMetadata(body, params) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/column-metadata/`,
|
||||
`${nimbusUrl}/api/catalog/column-metadata/`,
|
||||
{ params: params },
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -118,21 +166,31 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.delete(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/column-metadata/${id}/`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/column-metadata/${id}/`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
async getOneDataPreview(body) {
|
||||
async getOneDataPreview(body, params) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-preview/`,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-preview/`, {
|
||||
params: params,
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -142,8 +200,29 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-status/`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-status/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
async createDataStatus(body) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-status/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -154,8 +233,31 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-description/`,
|
||||
`${nimbusUrl}/api/catalog/data-description/`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
async createDataDescription(body) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-description/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -166,8 +268,29 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-docs/`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-docs/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
async createDataDocs(body) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-docs/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -178,9 +301,12 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-rating/`,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-rating/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -190,8 +316,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-rating/`,
|
||||
`${nimbusUrl}/api/catalog/data-rating/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
@@ -202,8 +333,14 @@ class CatalogService {
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/summary-rating/${id}`,
|
||||
`${nimbusUrl}/api/catalog/summary-rating/${id}`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -214,9 +351,12 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-comment/`,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-comment/`);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -226,22 +366,32 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-comment/`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/data-comment/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
async getDataReview(body) {
|
||||
async getDataReview(body, params) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-review/`,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/data-review/`, {
|
||||
params: params,
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -251,10 +401,12 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/tags/`,
|
||||
body,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -264,10 +416,12 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/tags/`,
|
||||
body,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -277,8 +431,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-tags/`,
|
||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
@@ -290,9 +449,12 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.delete(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/tags/${id}`,
|
||||
);
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/${id}`);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -302,8 +464,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.post(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-tags/`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
@@ -315,8 +482,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.delete(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-tags/${id}`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-tags/${id}`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -327,8 +499,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-rules/`,
|
||||
`${nimbusUrl}/api/catalog/table-rules/`,
|
||||
body,
|
||||
);
|
||||
return data;
|
||||
@@ -340,8 +517,13 @@ class CatalogService {
|
||||
? ``
|
||||
: `-${body.info.customer.toLowerCase()}`;
|
||||
|
||||
const { data } = await axios.delete(
|
||||
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/table-rules/${id}`,
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
`${nimbusUrl}/api/catalog/table-rules/${id}`,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user