Compare commits

...
Author SHA1 Message Date
Guilherme Maioli 003c9b176c UPDATE: return variable to stg. 2025-03-31 14:04:34 -03:00
Marcos Rodrigues Silva 1e5fe59d9c Merge pull request #271 from dadosfera/feature/new-mixpanel-properties
Add new mixpanel properties
2025-03-14 15:20:42 -03:00
Jonathan Witkosky 1a2b9617fe Add new mixpanel properties 2025-03-14 13:57:31 -03:00
Guilherme Maioli 1f92510a43 Merge pull request #270 from dadosfera/bugfixes/13-03
Bugfixes/13 03
2025-03-13 17:59:32 -03:00
marcos-silva-rodrigues f7fceb1ea2 Merge branch 'fix/white-label' into bugfixes/13-03 2025-03-13 17:41:12 -03:00
Marcos Rodrigues Silva 9bc42a4af0 Merge pull request #269 from dadosfera/fix/private-route
FIX: cors list
2025-02-26 17:15:03 -03:00
marcos-silva-rodrigues 5c98cc1748 FIX: cors list 2025-02-26 17:13:57 -03:00
Marcos Rodrigues Silva 9ae14ab04a Merge pull request #268 from dadosfera/fix/private-route
FIX: correct ip
2025-02-26 16:00:20 -03:00
marcos-silva-rodrigues 5d014f4669 FIX: correct ip 2025-02-26 15:57:07 -03:00
Marcos Rodrigues Silva 5e8dea7255 Merge pull request #267 from dadosfera/fix/private-route
FIX: add ip range and domain list to route /open-data
2025-02-26 08:49:40 -03:00
marcos-silva-rodrigues 38fc9f521b FIX: add ip range and domain list to route /open-data 2025-02-25 17:10:39 -03:00
Marcos Rodrigues Silva 80d7ac6ff9 Merge pull request #264 from dadosfera/fix/white-label
Fix/white label
2025-02-24 09:35:37 -03:00
marcos-silva-rodrigues 9bacd7a0f5 UPDATE: merge with beta branch 2025-02-24 09:28:03 -03:00
Aldemir Humberto Soares Neto c89ac40039 Merge pull request #266 from dadosfera/fixing-build-ecr
FEAT: fixing package-lock
2025-02-22 07:42:46 -03:00
aldemirneto 6d6cf590ee FEAT: fixing package-lock 2025-02-22 07:39:41 -03:00
Aldemir Humberto Soares Neto f063a8f30e Merge pull request #265 from dadosfera/UNIVR-PII-FACILITIES
Univr pii facilities
2025-02-22 07:29:14 -03:00
aldemirneto 03536a2180 FEAT: ensuring compatibility with ^ in the version 2025-02-22 07:28:30 -03:00
aldemirneto 0efd5cc257 FEAT: Changing protospack version
PII enabling
2025-02-22 07:23:34 -03:00
marcos-silva-rodrigues 9439f13b7b UPdATE: new displayName prop 2025-02-21 17:31:49 -03:00
Rafael Santana d936806406 Merge pull request #262 from dadosfera/beta
[PRD] Enable Dataset Registration via API for External Sources
2025-02-20 14:03:56 -03:00
Rafael Santana 9d7ccd4201 Merge pull request #263 from dadosfera/feat/catalog-external-datasets-using-api-call
UPDATE: migrating maestro to backend nodepool
2025-02-20 13:47:44 -03:00
Rafael Santana 406db7ccff Merge pull request #261 from dadosfera/feat/catalog-external-datasets-using-api-call
UPDATE: improve logging for table metadata
2025-02-20 08:52:15 -03:00
Rafael Santana 8d25df74b7 Merge pull request #260 from dadosfera/feat/catalog-external-datasets-using-api-call
UPDATE: updating protospack for add table_schema for /catalog/registe…
2025-02-19 12:25:10 -03:00
Marcos Rodrigues Silva a631338599 Merge pull request #259 from dadosfera/feat/update-customer-dash
UPDATE: customer dash
2025-02-17 19:02:52 -03:00
Marcos Rodrigues Silva d943721b4a Merge pull request #258 from dadosfera/feat/update-customer-dash
Feat/update customer dash
2025-02-17 18:47:11 -03:00
Rafael Santana 1bbf978cc4 Merge pull request #257 from dadosfera/feat/catalog-external-datasets-using-api-call
FEAT: Enable dataset registration via API for external sources
2025-02-14 16:57:58 -03:00
marcos-silva-rodrigues d03dd6129a UPDATE: customer dash 2025-02-13 12:20:04 -03:00
Marcos Rodrigues Silva 96c20995a3 Merge pull request #255 from dadosfera/beta
Beta
2025-02-03 18:22:05 -03:00
9 changed files with 72 additions and 16 deletions
+12
View File
@@ -5489,6 +5489,14 @@
"schema": { "schema": {
"type": "string" "type": "string"
} }
},
{
"name": "origin",
"required": true,
"in": "header",
"schema": {
"type": "string"
}
} }
], ],
"responses": { "responses": {
@@ -5643,6 +5651,9 @@
"name": { "name": {
"type": "string" "type": "string"
}, },
"displayName": {
"type": "string"
},
"tier": { "tier": {
"type": "string" "type": "string"
}, },
@@ -5663,6 +5674,7 @@
"modules", "modules",
"id", "id",
"name", "name",
"displayName",
"tier", "tier",
"scheduleLimit", "scheduleLimit",
"links", "links",
+3 -3
View File
@@ -9,11 +9,11 @@ charts:
- name: hostname - name: hostname
value: maestro.stg.dadosfera.ai value: maestro.stg.dadosfera.ai
- name: maestro.pi_factory_url - name: maestro.pi_factory_url
value: pi-factory.dadosfera.ai value: pi-factory.stg.dadosfera.ai
- name: maestro.in_factory_url - name: maestro.in_factory_url
value: in-factory.dadosfera.ai value: in-factory.stg.dadosfera.ai
- name: maestro.tr_factory_url - name: maestro.tr_factory_url
value: in-factory.dadosfera.ai value: in-factory.stg.dadosfera.ai
- name: maestro.open_customer_id - name: maestro.open_customer_id
value: b3e3dfe5-b992-4586-a73c-c0b0c00f615d value: b3e3dfe5-b992-4586-a73c-c0b0c00f615d
- name: maestro.open_group_id - name: maestro.open_group_id
+28
View File
@@ -0,0 +1,28 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "69.49.241.121/32" # hostgator ip
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/server-snippet: |
underscores_in_headers on;
ignore_invalid_headers on;
generation: 1
labels:
app: maestro
name: open-data
namespace: applications
spec:
ingressClassName: nginx
rules:
- host: {{ .Values.hostname }}
http:
paths:
- backend:
service:
name: maestro
port:
number: {{ .Values.ingress.port }}
path: /open-data/sharing-ocean-data
pathType: Prefix
+4 -4
View File
@@ -12,7 +12,7 @@
"@aws-sdk/client-secrets-manager": "^3.414.0", "@aws-sdk/client-secrets-manager": "^3.414.0",
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
"@dadosfera/protospack": "2.5.3", "@dadosfera/protospack": "2.5.3",
"@dadosfera/protospack-v2": "3.37.0-beta.7", "@dadosfera/protospack-v2": "^3.37.0-beta.10 ",
"@grpc/grpc-js": "^1.9.3", "@grpc/grpc-js": "^1.9.3",
"@grpc/proto-loader": "^0.7.9", "@grpc/proto-loader": "^0.7.9",
"@nestjs/cli": "^9.5.0", "@nestjs/cli": "^9.5.0",
@@ -1298,9 +1298,9 @@
} }
}, },
"node_modules/@dadosfera/protospack-v2": { "node_modules/@dadosfera/protospack-v2": {
"version": "3.37.0-beta.7", "version": "3.37.0-beta.10",
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.37.0-beta.7.tgz", "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.37.0-beta.10.tgz",
"integrity": "sha512-XGaDw6mICM1/qI0ZfQZaWpRHmAaOi3ufIUmrpfsTiW40oeWGW+DLLAsmbACgt34j4cpJ5Yt0AURsXagtmUgBmw==", "integrity": "sha512-nKSu9VpOPFSTeX0yN4aEY0HjvGxgbLPYXl217NHgLm+a/+i01USDaxjwIOqP5hhDvhnMNaiCq5awiQTYbhF/7A==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@grpc/grpc-js": "^1.9.3", "@grpc/grpc-js": "^1.9.3",
+1 -1
View File
@@ -30,7 +30,7 @@
"@aws-sdk/client-secrets-manager": "^3.414.0", "@aws-sdk/client-secrets-manager": "^3.414.0",
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
"@dadosfera/protospack": "2.5.3", "@dadosfera/protospack": "2.5.3",
"@dadosfera/protospack-v2": "3.37.0-beta.7", "@dadosfera/protospack-v2": "^3.37.0-beta.10 ",
"@grpc/grpc-js": "^1.9.3", "@grpc/grpc-js": "^1.9.3",
"@grpc/proto-loader": "^0.7.9", "@grpc/proto-loader": "^0.7.9",
"@nestjs/cli": "^9.5.0", "@nestjs/cli": "^9.5.0",
+2
View File
@@ -72,6 +72,8 @@ export class AuthCustomer {
@ApiProperty() @ApiProperty()
name: string; name: string;
@ApiProperty() @ApiProperty()
displayName: string;
@ApiProperty()
tier: string; tier: string;
@ApiProperty() @ApiProperty()
scheduleLimit: string; scheduleLimit: string;
+1 -1
View File
@@ -145,7 +145,7 @@ export class CustomersService implements OnModuleInit {
const res = await lastValueFrom( const res = await lastValueFrom(
this.pipelineReadService.PipelineV2GetDashboardUrl( this.pipelineReadService.PipelineV2GetDashboardUrl(
{ {
dashboard_id: '45', dashboard_id: '98',
exp: '15m', exp: '15m',
metabase_customer_name: 'dadosferatech', metabase_customer_name: 'dadosferatech',
}, },
+11 -3
View File
@@ -1,4 +1,4 @@
import { Body, Controller, Inject, Param, Post } from '@nestjs/common'; import { Body, Controller, Inject, Param, Post, Req } from '@nestjs/common';
import { init } from 'mixpanel'; import { init } from 'mixpanel';
import { Authenticated } from 'src/decorators/authentication.decorator'; import { Authenticated } from 'src/decorators/authentication.decorator';
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator'; import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
@@ -13,7 +13,12 @@ export class MixpanelController {
private readonly mixpanelToken: string, private readonly mixpanelToken: string,
) {} ) {}
@Post(':id') @Post(':id')
async trackEvent(@Param('id') id, @Body() body, @User() user: RequestUser) { async trackEvent(
@Param('id') id,
@Body() body,
@User() user: RequestUser,
@Req() request
) {
delete body.info; delete body.info;
const mixpanel = init(this.mixpanelToken); const mixpanel = init(this.mixpanelToken);
@@ -66,13 +71,16 @@ export class MixpanelController {
$email: user.username.includes('@') $email: user.username.includes('@')
? user.username ? user.username
: user.username + '@dadosfera.ai', : user.username + '@dadosfera.ai',
customer_name: user.customer_name, customer_name: user.customer_name
}); });
await mixpanel.track(id, { await mixpanel.track(id, {
distinct_id: user.username, distinct_id: user.username,
customer: user.customer_name, customer: user.customer_name,
env: process.env.ENV, env: process.env.ENV,
$ip: request.ip,
$os: request.headers['sec-ch-ua-platform'] || '',
$browser: request.headers['user-agent'],
...body, ...body,
}); });
+10 -4
View File
@@ -1,5 +1,5 @@
import DadosferaLogger from '@dadosfera/dadosfera-logs'; import DadosferaLogger from '@dadosfera/dadosfera-logs';
import { Body, Controller, ForbiddenException, Header, HttpCode, Inject, Param, Post, Query, Req, UseFilters, UseGuards, UseInterceptors } from '@nestjs/common'; import { Body, Controller, ForbiddenException, Header, Headers, HttpCode, HttpException, Inject, Param, Post, Query, Req, Res, UseFilters, UseGuards, UseInterceptors } from '@nestjs/common';
import { ApiCreatedResponse, ApiHeaders, ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { ApiCreatedResponse, ApiHeaders, ApiOkResponse, ApiTags } from '@nestjs/swagger';
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator'; import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter'; import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
@@ -40,17 +40,23 @@ export class OpenDataController {
language: string, language: string,
@Req() @Req()
request: Request, request: Request,
@Headers('origin')
origin: string
) { ) {
this.logger.info('createUser for open data'); this.logger.info('createUser for open data' + JSON.stringify(request.headers));
this.logger.info('user-agent', request.headers['user-agent']); const corslist = ["https://devsbm.dadosfera.io", "https://sharingoceandata.com"];
if (!corslist.includes(origin)) {
this.logger.info('block request by cors list: '+ origin);
throw new ForbiddenException();
}
const OPENDATA_CUSTOMER_ID = process.env.OPEN_CUSTOMER_ID; const OPENDATA_CUSTOMER_ID = process.env.OPEN_CUSTOMER_ID;
const OPENDATA_GROUP_ID = process.env.OPEN_GROUP_ID; const OPENDATA_GROUP_ID = process.env.OPEN_GROUP_ID;
const roles = [process.env.OPEN_GROUP_ID]; const roles = [process.env.OPEN_GROUP_ID];
const metadata = PackTheMetadata({ const metadata = PackTheMetadata({
language: language || 'en-us' language: language || 'en-us'
}); });
const data = {} const data = {}