mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-10 21:44:48 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f677f0376 | ||
|
|
bb2c0ab23e | ||
|
|
feec48114c | ||
|
|
7bee8d83a9 | ||
|
|
84b2dbd178 | ||
|
|
36706ff3dd | ||
|
|
0164e6978a | ||
|
|
7d371926f5 |
@@ -1,4 +1,4 @@
|
||||
<p align="center">
|
||||
<image src="./assets/maestro.svg" style="width:10rem">
|
||||
<h1 align="center">Maestro</h1>
|
||||
</p>
|
||||
</p>
|
||||
Generated
+13
-9217
File diff suppressed because it is too large
Load Diff
@@ -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');
|
||||
|
||||
@@ -9,7 +9,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/`);
|
||||
@@ -25,7 +25,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/`);
|
||||
@@ -40,12 +40,13 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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;
|
||||
}
|
||||
|
||||
@@ -57,7 +58,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -74,16 +75,17 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/dashboard-metabase/${id}`,
|
||||
);
|
||||
console.log(data);
|
||||
|
||||
const [, path] = data.iframe_url.split('.dadosfera');
|
||||
const host = `https://metabase-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
data.iframe_url = host + path;
|
||||
// const [, path] = data.iframe_url.split('.dadosfera');
|
||||
// const host = `httpss://metabase-${body.info.customer.toLowerCase()}.dadosfera.ai`;
|
||||
// data.iframe_url = host + path;
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -96,7 +98,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -113,7 +115,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -131,7 +133,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -148,7 +150,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -166,7 +168,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -183,7 +185,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/`, {
|
||||
@@ -200,13 +202,31 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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;
|
||||
}
|
||||
|
||||
async getDataDescription(body) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
@@ -215,7 +235,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -224,6 +244,24 @@ class CatalogService {
|
||||
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;
|
||||
}
|
||||
|
||||
async getDataDocs(body) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
@@ -232,13 +270,31 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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;
|
||||
}
|
||||
|
||||
async getDataRating(body) {
|
||||
const customer =
|
||||
body.info.customer.toLowerCase() === 'dadosfera'
|
||||
@@ -247,7 +303,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/`);
|
||||
@@ -262,10 +318,10 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-rating/`,
|
||||
body,
|
||||
);
|
||||
@@ -280,7 +336,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -297,7 +353,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/`);
|
||||
@@ -312,10 +368,10 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/data-comment/`,
|
||||
body,
|
||||
);
|
||||
@@ -330,7 +386,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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/`, {
|
||||
@@ -347,10 +403,10 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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);
|
||||
const { data } = await axios.post(`${nimbusUrl}/api/catalog/tags/`, body);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -362,7 +418,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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);
|
||||
@@ -377,7 +433,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -395,7 +451,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `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}`);
|
||||
@@ -410,10 +466,10 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
const { data } = await axios.post(
|
||||
`${nimbusUrl}/api/catalog/table-tags/`,
|
||||
body,
|
||||
);
|
||||
@@ -428,7 +484,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -445,7 +501,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
@@ -463,7 +519,7 @@ class CatalogService {
|
||||
|
||||
const nimbusUrl =
|
||||
process.env.ENV === 'prd'
|
||||
? `http://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
|
||||
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
|
||||
|
||||
const { data } = await axios.get(
|
||||
|
||||
Reference in New Issue
Block a user