Browse Source

Merge pull request #8850 from nocodb/fix/db-icon-alignment

fix: DB icon alignment in treeview
pull/8852/head
Pranav C 5 months ago committed by GitHub
parent
commit
5224269a40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  2. 173
      packages/nocodb-sdk/src/lib/Api.ts

1
packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

@ -780,6 +780,7 @@ async function openAudit(source: SourceType) {
:mouse-leave-delay="0.3" :mouse-leave-delay="0.3"
placement="topLeft" placement="topLeft"
trigger="hover" trigger="hover"
class="flex items-center"
> >
<template #title> <template #title>
<component :is="getSourceTooltip(source)" /> <component :is="getSourceTooltip(source)" />

173
packages/nocodb-sdk/src/lib/Api.ts

@ -278,6 +278,10 @@ export interface SourceType {
is_meta?: BoolType; is_meta?: BoolType;
/** Is the data source minimal db */ /** Is the data source minimal db */
is_local?: BoolType; is_local?: BoolType;
/** Is the data source schema readonly */
is_schema_readonly?: BoolType;
/** Is the data source data readonly */
is_data_readonly?: BoolType;
/** /**
* The order of the list of sources * The order of the list of sources
* @example 1 * @example 1
@ -335,6 +339,10 @@ export interface BaseReqType {
is_meta?: boolean; is_meta?: boolean;
/** Is the data source minimal db */ /** Is the data source minimal db */
is_local?: boolean; is_local?: boolean;
/** Is the data source schema readonly */
is_schema_readonly?: BoolType;
/** Is the data source data readonly */
is_data_readonly?: BoolType;
/** DB Type */ /** DB Type */
type?: type?:
| 'mssql' | 'mssql'
@ -1190,6 +1198,11 @@ export interface GridColumnType {
* @example asc * @example asc
*/ */
group_by_sort?: StringOrNullType; group_by_sort?: StringOrNullType;
/**
* Aggregation Type
* @example sum
*/
aggregation?: StringOrNullType;
} }
/** /**
@ -1222,6 +1235,11 @@ export interface GridColumnReqType {
* @example asc * @example asc
*/ */
group_by_sort?: StringOrNullType; group_by_sort?: StringOrNullType;
/**
* Aggregation
* @example sum
*/
aggregation?: StringOrNullType;
} }
/** /**
@ -5426,9 +5444,21 @@ export class Api<
query?: { query?: {
/** @min 0 */ /** @min 0 */
offset?: number; offset?: number;
/** @max 1 */ /** @min 1 */
limit?: number; limit?: number;
sourceId?: string; sourceId?: string;
orderBy?: {
/**
* Sort direction
* @example desc
*/
created_at?: 'asc' | 'desc';
/**
* Sort direction
* @example desc
*/
user?: 'asc' | 'desc';
};
}, },
params: RequestParams = {} params: RequestParams = {}
) => ) =>
@ -9261,6 +9291,46 @@ export class Api<
...params, ...params,
}), }),
/**
* @description Read aggregated data from a given table
*
* @tags Public
* @name DataTableAggregate
* @summary Read Shared View Aggregated Data
* @request GET:/api/v2/public/shared-view/{sharedViewUuid}/aggregate
* @response `200` `object` OK
* @response `400` `{
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
msg: string,
}`
*/
dataTableAggregate: (
sharedViewUuid: string,
query?: {
/** Extra filtering */
where?: string;
/** Used for multiple filter queries */
filterArrJson?: string;
/** List of fields to be aggregated */
aggregation?: object[];
},
params: RequestParams = {}
) =>
this.request<
object,
{
/** @example BadRequest [Error]: <ERROR MESSAGE> */
msg: string;
}
>({
path: `/api/v2/public/shared-view/${sharedViewUuid}/aggregate`,
method: 'GET',
query: query,
format: 'json',
...params,
}),
/** /**
* @description List Shared View Grouped Data * @description List Shared View Grouped Data
* *
@ -9974,6 +10044,64 @@ export class Api<
...params, ...params,
}), }),
/**
* @description List all audit data in the given project
*
* @tags Utils
* @name ProjectAuditList
* @summary List Audits in Project
* @request GET:/api/v1/db/meta/projects/audits
* @response `200` `{
list: (AuditType)[],
\** Model for Paginated *\
pageInfo: PaginatedType,
}` OK
* @response `400` `{
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
msg: string,
}`
*/
projectAuditList: (
query?: {
/** @min 0 */
offset?: number;
/** @min 1 */
limit?: number;
orderBy?: {
/**
* Sort direction
* @example desc
*/
created_at?: 'asc' | 'desc';
/**
* Sort direction
* @example desc
*/
user?: 'asc' | 'desc';
};
},
params: RequestParams = {}
) =>
this.request<
{
list: AuditType[];
/** Model for Paginated */
pageInfo: PaginatedType;
},
{
/** @example BadRequest [Error]: <ERROR MESSAGE> */
msg: string;
}
>({
path: `/api/v1/db/meta/projects/audits`,
method: 'GET',
query: query,
format: 'json',
...params,
}),
/** /**
* @description Update Audit Row * @description Update Audit Row
* *
@ -11225,6 +11353,49 @@ export class Api<
...params, ...params,
}), }),
}; };
dbDataTableAggregate = {
/**
* @description Read aggregated data from a given table
*
* @tags DB Data Table Aggregate
* @name DbDataTableAggregate
* @summary Read Aggregated Data
* @request GET:/api/v2/tables/{tableId}/aggregate
* @response `200` `object` OK
* @response `400` `{
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
msg: string,
}`
*/
dbDataTableAggregate: (
tableId: string,
query: {
/** View ID is required */
viewId: string;
/** List of fields to be aggregated */
aggregation?: object[];
/** Extra filtering */
where?: string;
/** Used for multiple filter queries */
filterArrJson?: string;
},
params: RequestParams = {}
) =>
this.request<
object,
{
/** @example BadRequest [Error]: <ERROR MESSAGE> */
msg: string;
}
>({
path: `/api/v2/tables/${tableId}/aggregate`,
method: 'GET',
query: query,
format: 'json',
...params,
}),
};
dbDataTableRow = { dbDataTableRow = {
/** /**
* @description List all table rows in a given table * @description List all table rows in a given table

Loading…
Cancel
Save