mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-02 02:47:29 +00:00
Merge branch 'develop' into refactor/nocodb-project-structure
This commit is contained in:
@@ -203,23 +203,17 @@ watch(view, async (nextView) => {
|
||||
<MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" />
|
||||
</template>
|
||||
|
||||
<div
|
||||
v-for="col in fieldsWithoutCover"
|
||||
:key="`record-${record.row.id}-${col.id}`"
|
||||
class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full"
|
||||
>
|
||||
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
|
||||
<div class="w-full text-gray-600">
|
||||
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
|
||||
<div v-for="col in fieldsWithoutCover" :key="`record-${record.row.id}-${col.id}`">
|
||||
<div v-if="!isRowEmpty(record, col)" class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full">
|
||||
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
|
||||
<div class="w-full text-gray-600">
|
||||
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
|
||||
|
||||
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
|
||||
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
|
||||
<div v-if="isRowEmpty(record, col)" class="h-3 bg-gray-200 px-5 rounded-lg"></div>
|
||||
|
||||
<template v-else>
|
||||
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
|
||||
<LazySmartsheetVirtualCell
|
||||
v-if="isVirtualCol(col)"
|
||||
v-model="record.row[col.title]"
|
||||
@@ -234,7 +228,7 @@ watch(view, async (nextView) => {
|
||||
:edit-enabled="false"
|
||||
:read-only="true"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
@@ -106,10 +106,10 @@
|
||||
"commenter": "评论者",
|
||||
"viewer": "浏览者"
|
||||
},
|
||||
"sqlVIew": "SQL View"
|
||||
"sqlVIew": "SQL 视图"
|
||||
},
|
||||
"datatype": {
|
||||
"ID": "ID",
|
||||
"ID": "编号",
|
||||
"ForeignKey": "外键",
|
||||
"SingleLineText": "单行文本",
|
||||
"LongText": "长文本",
|
||||
@@ -189,7 +189,7 @@
|
||||
"resetPassword": "重置密码",
|
||||
"teamAndSettings": "团队和设置",
|
||||
"apiDocs": "API 文档",
|
||||
"importFromAirtable": "Import From Airtable",
|
||||
"importFromAirtable": "从 Airtable 导入",
|
||||
"generateToken": "Generate Token",
|
||||
"APIsAndSupport": "APIs & Support",
|
||||
"helpCenter": "Help center",
|
||||
|
||||
@@ -113,6 +113,9 @@ const onSSLModeChange = ((mode: SSLUsage) => {
|
||||
delete connection.ssl
|
||||
break
|
||||
case SSLUsage.Allowed:
|
||||
connection.ssl = 'no-verify'
|
||||
break
|
||||
case SSLUsage.Preferred:
|
||||
connection.ssl = 'true'
|
||||
break
|
||||
default:
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface DefaultConnection {
|
||||
user: string
|
||||
password: string
|
||||
port: number | string
|
||||
ssl?: Record<CertTypes, string> | 'true'
|
||||
ssl?: Record<CertTypes, string> | 'no-verify' | 'true'
|
||||
}
|
||||
|
||||
export interface SQLiteConnection {
|
||||
|
||||
@@ -322,4 +322,24 @@ npm run cypress:open
|
||||
|
||||
# run test script
|
||||
# - quickTest.js
|
||||
```
|
||||
```
|
||||
|
||||
## Accessing CI-CD CY Screenshots
|
||||
|
||||
1. On Jobs link, click on `Summary`
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
2. Click on `Artifacts`
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
3. Download logs for desired suite
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ const pg = {
|
||||
MIN: 'least',
|
||||
MAX: 'greatest',
|
||||
CEILING: 'ceil',
|
||||
ROUND: 'round',
|
||||
POWER: 'pow',
|
||||
SQRT: 'sqrt',
|
||||
SEARCH: (args: MapFnArgs) => {
|
||||
@@ -35,6 +34,13 @@ const pg = {
|
||||
.raw(`CAST(${fn(pt.arguments[0])} as DOUBLE PRECISION)${colAlias}`)
|
||||
.wrap('(', ')');
|
||||
},
|
||||
ROUND: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
|
||||
return knex.raw(
|
||||
`ROUND((${fn(pt.arguments[0])})::numeric, ${
|
||||
pt?.arguments[1] ? fn(pt.arguments[1]) : 0
|
||||
}) ${colAlias}`
|
||||
);
|
||||
},
|
||||
DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
|
||||
return knex.raw(
|
||||
`${fn(pt.arguments[0])} + (${fn(pt.arguments[1])} ||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class Backblaze implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -121,7 +121,7 @@ export default class Backblaze implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import { Storage, StorageOptions } from '@google-cloud/storage';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class Gcs implements IStorageAdapterV2 {
|
||||
private storageClient: Storage;
|
||||
@@ -87,7 +87,7 @@ export default class Gcs implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class LinodeObjectStorage implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -111,7 +111,7 @@ export default class LinodeObjectStorage implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import { Client as MinioClient } from 'minio';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class Minio implements IStorageAdapterV2 {
|
||||
private minioClient: MinioClient;
|
||||
@@ -75,7 +75,7 @@ export default class Minio implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class OvhCloud implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -111,7 +111,7 @@ export default class OvhCloud implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class S3 implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -114,7 +114,7 @@ export default class S3 implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -3,6 +3,7 @@ import fs from 'fs';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import AWS from 'aws-sdk';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class ScalewayObjectStorage implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -30,7 +31,7 @@ export default class ScalewayObjectStorage implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class Spaces implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -119,7 +119,7 @@ export default class Spaces implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class UpoCloud implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -109,7 +109,7 @@ export default class UpoCloud implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import AWS from 'aws-sdk';
|
||||
import { IStorageAdapterV2, XcFile } from 'nc-plugin';
|
||||
import request from 'request';
|
||||
import { waitForStreamClose } from '../../utils/pluginUtils';
|
||||
|
||||
export default class Vultr implements IStorageAdapterV2 {
|
||||
private s3Client: AWS.S3;
|
||||
@@ -111,7 +111,7 @@ export default class Vultr implements IStorageAdapterV2 {
|
||||
try {
|
||||
const tempFile = path.join(process.cwd(), 'temp.txt');
|
||||
const createStream = fs.createWriteStream(tempFile);
|
||||
createStream.end();
|
||||
await waitForStreamClose(createStream);
|
||||
await this.fileCreate('nc-test-file.txt', {
|
||||
path: tempFile,
|
||||
mimetype: '',
|
||||
|
||||
16
packages/nocodb/src/lib/utils/pluginUtils.ts
Normal file
16
packages/nocodb/src/lib/utils/pluginUtils.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import fs from 'fs';
|
||||
|
||||
export async function waitForStreamClose(
|
||||
stream: fs.WriteStream
|
||||
): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
stream
|
||||
.once('finish', () => {
|
||||
resolve();
|
||||
})
|
||||
.once('error', (err) => {
|
||||
reject(err);
|
||||
});
|
||||
stream.end();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user