Skip to content

Commit

Permalink
Merge pull request #138 from nocodb/chore/pull-upstream-2
Browse files Browse the repository at this point in the history
Sync with nocodb
  • Loading branch information
mustafapc19 committed Feb 20, 2023
2 parents 88bb849 + 11b5476 commit 784ec6c
Show file tree
Hide file tree
Showing 103 changed files with 680 additions and 912 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-executables.yml
Expand Up @@ -87,7 +87,7 @@ jobs:
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=musl
# clean up code to optimize size
npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,nocodb/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
# build executables
npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-timely-executables.yml
Expand Up @@ -103,7 +103,7 @@ jobs:
# clean up code to optimize size
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,nocodb-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
# build executables
npm run build
Expand Down
1 change: 0 additions & 1 deletion packages/nc-gui/components.d.ts
Expand Up @@ -256,7 +256,6 @@ declare module '@vue/runtime-core' {
MdiMagnify: typeof import('~icons/mdi/magnify')['default']
MdiMapMarkerOutline: typeof import('~icons/mdi/map-marker-outline')['default']
MdiMenu: typeof import('~icons/mdi/menu')['default']
MdiMenuArrowDown: typeof import('~icons/mdi/menu-arrow-down')['default']
MdiMenuDown: typeof import('~icons/mdi/menu-down')['default']
MdiMenuUp: typeof import('~icons/mdi/menu-up')['default']
MdiMicrosoftTeams: typeof import('~icons/mdi/microsoft-teams')['default']
Expand Down
8 changes: 6 additions & 2 deletions packages/nc-gui/components/dashboard/settings/AuditTab.vue
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
import type { AuditType } from 'nocodb-sdk'
import { h, onMounted, timeAgo, useI18n, useNuxtApp, useProject } from '#imports'
import { h, onMounted, timeAgo, useGlobal, useI18n, useNuxtApp, useProject } from '#imports'
const { $api } = useNuxtApp()
Expand All @@ -16,8 +16,11 @@ let audits = $ref<null | Array<AuditType>>(null)
let totalRows = $ref(0)
const currentPage = $ref(1)
const currentLimit = $ref(25)
const { appInfo } = useGlobal()
async function loadAudits(page = currentPage, limit = currentLimit) {
try {
if (!project.value?.id) return
Expand Down Expand Up @@ -86,9 +89,10 @@ const columns = [

<template>
<div class="flex flex-col gap-4 w-full">
<div v-if="!appInfo.auditEnabled" class="text-red-500">Audit logs are currently disabled by administrators.</div>
<div class="flex flex-row justify-between items-center">
<a-button class="self-start" @click="loadAudits">
<!-- Reload -->
<!-- Reload -->
<div class="flex items-center gap-2 text-gray-600 font-light">
<MdiReload :class="{ 'animate-infinite animate-spin !text-success': isLoading }" />

Expand Down
8 changes: 6 additions & 2 deletions packages/nc-gui/components/template/Editor.vue
Expand Up @@ -12,6 +12,7 @@ import {
computed,
createEventHook,
extractSdkResponseErrorMsg,
fieldLengthValidator,
fieldRequiredValidator,
getDateFormat,
getDateTimeFormat,
Expand Down Expand Up @@ -110,12 +111,15 @@ const data = reactive<{
})
const validators = computed(() =>
data.tables.reduce<Record<string, [ReturnType<typeof fieldRequiredValidator>]>>((acc, table, tableIdx) => {
data.tables.reduce<Record<string, [ReturnType<typeof fieldRequiredValidator>]>>((acc: Record<string, any>, table, tableIdx) => {
acc[`tables.${tableIdx}.table_name`] = [fieldRequiredValidator()]
hasSelectColumn.value[tableIdx] = false
table.columns?.forEach((column, columnIdx) => {
acc[`tables.${tableIdx}.columns.${columnIdx}.column_name`] = [fieldRequiredValidator()]
acc[`tables.${tableIdx}.columns.${columnIdx}.column_name`] = [
fieldRequiredValidator(),
fieldLengthValidator(project.value?.bases?.[0].type || ClientType.MYSQL),
]
acc[`tables.${tableIdx}.columns.${columnIdx}.uidt`] = [fieldRequiredValidator()]
if (isSelect(column)) {
hasSelectColumn.value[tableIdx] = true
Expand Down
4 changes: 3 additions & 1 deletion packages/nc-gui/composables/useColumnCreateStore.ts
Expand Up @@ -27,7 +27,8 @@ interface ValidationsObj {

const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState(
(meta: Ref<TableType | undefined>, column: Ref<ColumnType | undefined>) => {
const { sqlUis, isMysql: isMysqlFunc, isPg: isPgFunc, isMssql: isMssqlFunc } = useProject()
const { project, sqlUis, isMysql: isMysqlFunc, isPg: isPgFunc, isMssql: isMssqlFunc } = useProject()

const { $api } = useNuxtApp()

const { getMeta } = useMetas()
Expand Down Expand Up @@ -93,6 +94,7 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
})
},
},
fieldLengthValidator(project.value?.bases?.[0].type || ClientType.MYSQL),
],
uidt: [
{
Expand Down
1 change: 1 addition & 0 deletions packages/nc-gui/composables/useGlobal/state.ts
Expand Up @@ -96,6 +96,7 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State {
oneClick: false,
projectHasAdmin: false,
teleEnabled: true,
auditEnabled: true,
type: 'nocodb',
version: '0.0.0',
ncAttachmentFieldSize: 20,
Expand Down
1 change: 1 addition & 0 deletions packages/nc-gui/composables/useGlobal/types.ts
Expand Up @@ -18,6 +18,7 @@ export interface AppInfo {
oneClick: boolean
projectHasAdmin: boolean
teleEnabled: boolean
auditEnabled: boolean
type: string
version: string
ee?: boolean
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/ar.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "إعادة تسمية الجدول",
"deleteTable": "حذف الجدول",
"addField": "إضافة حقل جديد إلى هذا الجدول",
"setDisplay": "Set as Display value",
"addRow": "إضافة صف جديد",
"saveRow": "حفظ الصف",
"saveAndExit": "Save & Exit",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "هل أنت متأكد من أنك تريد حذف هذا العرض؟",
"deleteTableConfirmation": "هل تريد حذف الجدول",
"showM2mTables": "إظهار جداول M2M",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Deleting this stack will also remove the select option `{stackToBeDeleted}` from the `{groupingField}`. The records will move to the uncategorized stack.",
"computedFieldEditWarning": "Computed field: contents are read-only. Use column edit menu to reconfigure",
"computedFieldDeleteWarning": "Computed field: contents are read-only. Unable to clear content.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/bn_IN.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "টেবিল নাম পরিবর্তন",
"deleteTable": "टेबल मिटाये",
"addField": "এই টেবিলে নতুন ক্ষেত্র যুক্ত করুন",
"setDisplay": "Set as Display value",
"addRow": "নতুন সারি যুক্ত করুন",
"saveRow": "সারি সংরক্ষণ করুন",
"saveAndExit": "Save & Exit",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Are you sure you want to delete this view?",
"deleteTableConfirmation": "Do you want to delete the table",
"showM2mTables": "Show M2M Tables",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Deleting this stack will also remove the select option `{stackToBeDeleted}` from the `{groupingField}`. The records will move to the uncategorized stack.",
"computedFieldEditWarning": "Computed field: contents are read-only. Use column edit menu to reconfigure",
"computedFieldDeleteWarning": "Computed field: contents are read-only. Unable to clear content.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/cs.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "Přejmenování tabulky",
"deleteTable": "Tabulka Odstranit",
"addField": "Přidání nového pole do této tabulky",
"setDisplay": "Set as Display value",
"addRow": "Přidat nový řádek",
"saveRow": "Uložit řádek",
"saveAndExit": "Uložit a odejít",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Opravdu chcete toto zobrazení odstranit?",
"deleteTableConfirmation": "Chcete odstranit tabulku",
"showM2mTables": "Zobrazit tabulky M2M",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Odstraněním tohoto zásobníku se také odstraní možnost výběru `{stackToBeDeleted}` z `{groupingField}`. Záznamy se přesunou do zásobníku nezařazených záznamů.",
"computedFieldEditWarning": "Vypočtené pole: obsah je určen pouze pro čtení. Ke změně konfigurace sloupce použijte nabídku úprav sloupce",
"computedFieldDeleteWarning": "Vypočtené pole: obsah je určen pouze pro čtení. Nelze vymazat obsah.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/da.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "Bord omdøb",
"deleteTable": "TABEL DELETE.",
"addField": "Tilføj nyt felt til denne tabel",
"setDisplay": "Set as Display value",
"addRow": "Tilføj ny række",
"saveRow": "Gem ro",
"saveAndExit": "Gem og afslutning",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Er du sikker på, at du vil slette denne visning?",
"deleteTableConfirmation": "Ønsker du at slette tabellen",
"showM2mTables": "Vis M2M-tabeller",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Hvis du sletter denne stak, fjernes også valgmuligheden `{stackToBeDeleted}` fra `{groupingField}`. Posterne vil blive flyttet til stakken \"uncategorized\".",
"computedFieldEditWarning": "Beregnet felt: indholdet er skrivebeskyttet. Brug kolonne-redigeringsmenuen til at omkonfigurere",
"computedFieldDeleteWarning": "Beregnet felt: indholdet er skrivebeskyttet. Det er ikke muligt at slette indholdet.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/de.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "Tabelle umbenennen",
"deleteTable": "Tabelle löschen",
"addField": "Neues Feld zu dieser Tabelle hinzufügen",
"setDisplay": "Set as Display value",
"addRow": "Neue Zeile hinzufügen",
"saveRow": "Zeile speichern",
"saveAndExit": "Speichern & Verlassen",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Sind Sie sicher, dass Sie diese Ansicht löschen möchten?",
"deleteTableConfirmation": "Möchten Sie die Tabelle löschen",
"showM2mTables": "M2M Tabellen anzeigen",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Wenn Sie diesen Stapel löschen, wird auch die Auswahloption \"{stackToBeDeleted}\" von der Seite \"{groupingField}\" entfernt. Die Datensätze werden in den nicht kategorisierten Stapel verschoben.",
"computedFieldEditWarning": "Berechnetes Feld: Der Inhalt ist schreibgeschützt. Verwenden Sie das Menü \"Spalten bearbeiten\", um das Feld neu zu konfigurieren.",
"computedFieldDeleteWarning": "Berechnetes Feld: Inhalt ist schreibgeschützt. Inhalt kann nicht gelöscht werden.",
Expand Down
1 change: 1 addition & 0 deletions packages/nc-gui/lang/en.json
Expand Up @@ -693,6 +693,7 @@
"nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _",
"followingCharactersAreNotAllowed": "Following characters are not allowed",
"columnNameRequired": "Column name is required",
"columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters",
"projectNameExceeds50Characters": "Project name exceeds 50 characters",
"projectNameCannotStartWithSpace": "Project name cannot start with space",
"requiredField": "Required field",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/es.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "Cambiar el nombre de la tabla",
"deleteTable": "Borrar tabla",
"addField": "Añadir nuevo campo a esta tabla",
"setDisplay": "Set as Display value",
"addRow": "Añadir nueva fila",
"saveRow": "Grabar la fila",
"saveAndExit": "Guardar y salir",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "¿Está seguro de que desea eliminar esta vista?",
"deleteTableConfirmation": "¿Desea eliminar la tabla",
"showM2mTables": "Mostrar tablas M2M",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Al eliminar esta pila también se eliminará la opción de selección `{stackToBeDeleted}` de la `{groupingField}`. Los registros pasarán a la pila de no categorizados.",
"computedFieldEditWarning": "Campo calculado: el contenido es de sólo lectura. Utilice el menú de edición de columnas para reconfigurar",
"computedFieldDeleteWarning": "Campo calculado: el contenido es de sólo lectura. No se puede borrar el contenido.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/eu.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "Table Rename",
"deleteTable": "Table Delete",
"addField": "Add new field to this table",
"setDisplay": "Set as Display value",
"addRow": "Add new row",
"saveRow": "Save row",
"saveAndExit": "Save & Exit",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Are you sure you want to delete this view?",
"deleteTableConfirmation": "Do you want to delete the table",
"showM2mTables": "Show M2M Tables",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Deleting this stack will also remove the select option `{stackToBeDeleted}` from the `{groupingField}`. The records will move to the uncategorized stack.",
"computedFieldEditWarning": "Computed field: contents are read-only. Use column edit menu to reconfigure",
"computedFieldDeleteWarning": "Computed field: contents are read-only. Unable to clear content.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/fa.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "تغییر نام جدول",
"deleteTable": "حذف جدول",
"addField": "اضافه کردن فیلد جدید به این جدول",
"setDisplay": "Set as Display value",
"addRow": "اضافه کردن ردیف جدید",
"saveRow": "دخیره ردیف",
"saveAndExit": "Save & Exit",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Are you sure you want to delete this view?",
"deleteTableConfirmation": "Do you want to delete the table",
"showM2mTables": "Show M2M Tables",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Deleting this stack will also remove the select option `{stackToBeDeleted}` from the `{groupingField}`. The records will move to the uncategorized stack.",
"computedFieldEditWarning": "Computed field: contents are read-only. Use column edit menu to reconfigure",
"computedFieldDeleteWarning": "Computed field: contents are read-only. Unable to clear content.",
Expand Down
6 changes: 6 additions & 0 deletions packages/nc-gui/lang/fi.json
Expand Up @@ -380,6 +380,7 @@
"renameTable": "Taulukko uudelleen",
"deleteTable": "Taulukko poistaa",
"addField": "Lisää uusi kenttä tähän taulukkoon",
"setDisplay": "Set as Display value",
"addRow": "Lisää uusi rivi",
"saveRow": "Tallenna rivi",
"saveAndExit": "Tallenna & poistu",
Expand Down Expand Up @@ -630,6 +631,11 @@
"deleteViewConfirmation": "Haluatko varmasti poistaa tämän näkymän?",
"deleteTableConfirmation": "Haluatko poistaa taulukon",
"showM2mTables": "Näytä M2M-taulukot",
"showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.",
"showNullInCells": "Show NULL in Cells",
"showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.",
"showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter",
"showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.",
"deleteKanbanStackConfirmation": "Tämän pinon poistaminen poistaa myös valintavaihtoehdon `{stackToBeDeleted}` valikosta `{groupingField}`. Tietueet siirtyvät luokittelemattomaan pinoon.",
"computedFieldEditWarning": "Laskettu kenttä: sisältö on vain luettavissa. Käytä sarakkeen muokkausvalikkoa uudelleenmäärittämiseen",
"computedFieldDeleteWarning": "Laskettu kenttä: sisältö on vain luettavissa. Sisältöä ei voi tyhjentää.",
Expand Down

0 comments on commit 784ec6c

Please sign in to comment.