Commit graph

45 commits

Author SHA1 Message Date
Arpit
f0a403e619
Release : Appbuilder - appdefinition architecture revamp (#7448)
* importing service: updated

* import service, categorize and update events with associations

* fix: deleting events associated with pages on page delete

* handle app version: creation, updates, switching versions from app builder

* on version switch: no updates should be triggeted to server

* versioning for query events

* fixes: new components db transaction fails for newly created pages

* fixes: query chaining with events

* map older query ids to new for event action: run query

* fixes: multi-editor support

* fixes/multi-editor: users should be able to edit different version of the app at real time without sync

* minor fixes

* fixes: undo/redo savings with latest app def updates

* fixes: execution of page switch action

* fixes: csa events

* fixes: csa selection dropdown

* fixes: on csa action changed, the action params should also be updated correctly

* fixes: event rendering actions

* fixes: table event - row hovered

* fixes: table event - on search

* fixes: table event - onNewRowsAdded

* fixes: table event - onBulkUpdate

* fixes: table column updates

* fixes: table column updates to component definition

* re-order events

* handle adding widgets to sub containers

* fixes: csa for modals

* fixes: deletes children components on deleting parent

* fixes: components with default children

* fixed events for imported app

* gs- crash fix

* fixes: global settings UI

* fixes: header and user

* fixes: page switch event

* fixes: adapts to new event manager ui

* import app

* add event index for creating app versions

* fixes: table rendering on viewer

* fixes: event execution for viewer

* fixes: loading app with slug

* fixes: Page side bar is not rendered in viewer

* fixes: version manager ui for released versions

* fixes: tabs default children saving

* fixes: app resource mapping for parent-child components

* fixes: duplicate pages

* fixes: page load events for viewer

* fixes: enable and disable pages

* fixes: hide and show pages

* fixes: on maintaince toggle button

* fixes: new version child components are not tied to its parent

* fixes: redo breaks- on deleting a component and undo then redo (editor)

* new export schema and handling apps impport with new and older schemas

* table events: column and actions events

* fixes: query confirmations popup

* fixes: copy/paste

* fixes: cut/paste

* fixes: event mapping for newer versions for new components, pages and queries id

* fixes: app resource mapping for imported apps

* fixes: cascade events for table actions and colulmns

* Migrates the existing JSON-based app definition schema to a structured table-based architecture. This enhancement introduces component and page-specific permissions, improves data organization, and enables fine-grained access control. Additionally, it adds the 'globalSettings' column to the 'appVersion' table.

* cleanup

* fixes: enable and disable pages

* fixes: hide/show page and set saving state for cloning pages

* cleanup

* fixes: page disable menu

* fixes: migrations for data query events

* fixes: switching app version from version creation modal results in editor loading state

* fixes: setting up the page title

* fixes: Page duplication has same page handler name.

* fixes: updating general styles of a component

* fixes: delete component should trigger confirmations box for one widget and for multiple should process deletion

* fixes: CSA for button(component) does not work for page event handler.

* fixes: component name update [calendar]

* fixes: Duplicating pages do not create child components

* improves copy-paste mechanism of widgets

* fix: calendar subcontainer components comes out of the parent container on copy/paste

* fix:Form properties, no option for selecting submit button.

* fixes: Dark mode issue with event handler.

* fixes: display preferences for components

* fixes:have to select the selected version again to create a new

* fixes: Pages menu is not getting disabled when enabled and vice-versa

* fixes: correct naming of duplicating pages

* fixes: 2 action button even with no event attached to one, it gets attached to both.

* fixes: event deletion for action btn removal

* fixes: Keyboard action to move component is not saving

* reduce outbound calls when widget re-positioned with keyboard

* fixes: Not able to delete component from Inspector

* fixes: cloning of widgets

* fixes: Request confirmation before query run toggle is not visible on viewer mode. (can't run query if confirmation toggle is on)

* fixes: event sorting

* fixes: events mapping for versioning: queries and components

* fixes: importing app bug - query running issue when importing apps

* [appdef-2.0] fixes: event action linking for imported apps (#7627)

* fixes: event action linking for imported apps

* cleanup

* fixes: Toggling display preferences is not saving for components. (#7629)

* fixes: dnd issue for mobile view (#7632)

* default page menu settings should be true

* [appdef-2] event manager selector bug (#7631)

* fixes: on selecting query - 3 outbound calls are done to the server, and event manager re-renders 3times resulting in flikering ui

* reduces outbound calls for updating csa actions to 1

* [appdef] - copy associated events for cloned components (#7634)

* fixes: Copying  component is not coping the events associated with the component.

* cleanup

* [appdef-2] : Fixes frontend issues (#7636)

* Fix UI issues

* Fix Scrollbar is not available after we pin the inspector.

* Fix button  jumping places if switched from extended monitor to laptop.

* Fix white background around canvas

* fixes: Component inspector go blank after switching to different pages after dropping components (#7637)

* fixes: general properties of widgets are not getting saved (#7638)

* fixes: selecting the components via selecto (#7653)

* fixes: multiple undo-redo simlut. (#7656)

* fixes: copy associated events for cloned queries (#7657)

* Fixes not able toggle of Listview pagination toggle (#7701)

* Fix UI issues

* Fix Scrollbar is not available after we pin the inspector.

* Fix button  jumping places if switched from extended monitor to laptop.

* fix enable pagination not getting toggled in listview

* Fix form children not being displayed

* fixes: dnd fix for widgets dropped inside subcontainer (#7691)

* [Appdef-2] copy-paste, cut and  clone fix for widgets (#7687)

* fixes: copy/cut/paste and cloning of widgets

* cleanup

* can copy/paste-clone in listview

* fixes: on mulit-widget selected via mouse area selection: widget manager should be rendered (#7688)

* fixes: on deleting tabs widgets should delete its children (#7692)

* fixes: column data generated from restapi does not render correct columns in viewer (#7695)

* [appdef-2] fixes: multiple query confirmations trigger (#7704)

* fixes: multiple query confirmations trigger

* fixes: multiple outbound calls in the inital load, run queries on app load with confirmations:editor&viewer

* fixes: correct confirmations list to the stote

* [appdef-2] fixes:Event handler are running twice for page load (#7705)

* fixes:Event handler are running twice for page load(eg- add 2 show alert and change the page).

* fixes: for viewer page events

* fixes: container widget is not getting saved on drop (#7718)

* fixes: Create app version from is empty if we delete another version. (#7720)

* [appdef-2] fixes: on versioned app (switching or creating) version, the componet layout is wrongly updated to the container dnd (#7721)

* fixes: on versioned app (switching or creating) version, the component layout is wrongly updated to the container dnd

* fixes: container widget is not saving

* fixes: triggering confirmation box for every query with on load trigger (#7728)

* Fixes canvas background and go to app crashing (#7725)

* Fix UI issues

* Fix Scrollbar is not available after we pin the inspector.

* Fix button  jumping places if switched from extended monitor to laptop.

* fix enable pagination not getting toggled in listview

* Fix form children not being displayed

* Fix Go to app is crashing the application.

* Fix fx for canvas background color is not working.

* fixes: cloned/copied table with actions (#7758)

* fixes: calendar and form widgets (#7735)

* fixes: rendering of components in viewer for mobile (#7759)

* fixes: toggling, resizing, dropping widgets in both display preferences (#7760)

* fixes: page switch action via runjs actions (#7762)

* fixes: component validations do not get saved (#7766)

* [appdef-2] subcontainer dnd height outbound fix (#7767)

* fixes: listview children can be dragged outside its outbound limit

* cleanup

* fixes: widget inspector going to empty component (#7768)

* fixes: goToApp not running from runjs in viewer mode (#7770)

* fixes: multi-components cloning or copy/paste have same name (#7761)

* Fix disabled page is being displayed on switch page event dropdown (#7769)

* Fix kanban rendering leading to infinite look

* Fix disabled page is being displayed on switch page event dropdown

* Fix Kanban widget getting into infinite loop (#7808)

* Fix kanban rendering leading to infinite look

* Fix disabled page is being displayed on switch page event dropdown

* Fix kanban getting into infinite loop

* adds support of constants to current state of the ediotr (#7821)

* removes loader added for testing (#7822)

* [appdef] fixes - dnd container cloning edge cases (#7820)

* fixes: copy/pasting components updating wrong display preferences

* fixes: copy/pasting tabs and cloning components inside tabs

* fixes: duplication of calendar component bug

* if components in subcontainer(children) are selected via selecto along with its parent, children should not be going through duplication

* if components in subcontainer(children) are selected via selecto along with its parent, children should not be going through duplication

* fixes: Resolving App Version and Timestamp Update Challenges (#7863)

* Fixes query confirmation issue on viewer (#7862)

* [appdef ]fixes: components copied from template app to a new page or app do not render in canvas (#7867)

* fixes: components copied from template app to a new page or app does not render in canvas

* fixes: table crash on coping from other pages with columns

* adds the column exists check

* fixes: tables crash for imported apps with auto generated cols

* appdefinition refactor/cleanup (#7872)

* cleanup controllers and request calls from frontend

* removing unwanted console logs and unused variables

* revering v1 apis og

* adding length validation for page dto

* adding dtos for components

* updated dtos for components and pages

* added dto for event handlers

* fixes event handler dto

* fixes: page dto

* adds/fixes event handlers creating dtp

* fixes: event handler service and dtos

* [appdef] fixes: Creating page not changing the slug (#7873)

* fixes: Creating page not changing the slug

* removes extra whitespace

* [appdef] fixes: on importing a exported app child components are not present in the parent component (#7864)

* fixes: on importing a exported app child components are not present in the parent component

* handles parent component mapping for tabs and calendar component

* handles parent component mapping for tabs and calendar component for new versions

* [appdef] api endpoint fixes (#7888)

* fixes: moved fetching app version to v2 api

* fixes: app slug api

* Fixes CurrentUser & Mode not present in globals in inspector (#7812)

* Fix current user not being present in inspector

* Add Mode in globas in inspector

* Fix creating page not changing the slug.

* Revert "Fix creating page not changing the slug."

This reverts commit 0ff9c18ab8.

* Fixes  on adding query params in event handler, breaking the app (#7889)

* Fix on version change if left sidebar is open canvas not scrolling right

* Fix on adding query params in event handler, breaking the app

* Fix

* Fix on version change if left sidebar is open canvas not scrolling right (#7884)

* fixes: fixes on on app load switch page action via run queires (#7858)

* fixes: fixes on on app load switch page action via run queires

* Fix

* refactor

* Fix on load event not appearing on viewer

---------

Co-authored-by: Nakul Nagargade <nakul@tooljet.com>

* [appdef] fixes: event actions mapping for import-export (#7895)

* fixes: event actions mapping for import-export

* fixes: updates organisation id

* fixes: templates event mapping

* do not app again for not normalized apps

* [appdef]migrations fix (#7910)

* fixes: page attributes

* fixes: table action and column events for imported apps (prev) and app migrations

* adds processDataInBatches

* fixes: app data migrations

* create a new queryBuilder instance for each batch to ensure that there's no interference between batches

* fix: app migration

* cleanup

* cleanup

* fixes: table column data not updated on boxes changes in container (#7919)

* fixes: creating all pages from all versions (#7905)

* Fix state not changing in chart (#7900)

* Fix in chart, toggles are not working

* Update Chart.jsx

---------

Co-authored-by: Arpit <arpitnath42@gmail.com>

* fix event param not updating (#7902)

* [appdef] Pages attributes are missing on versioning or imported app (#7904)

* fixes: on creating new version pages attributes are not copied

* fixes: on importing apps with  pages attributes are not copied

* fixes: component double duplication issues

* fixes: deleting children components via selecto (#7915)

* fixes: component deletion fixes

* fixes: cloning components to a new version should also create associated events

* fixes: creating components on cloning with general styles or properties

* fixes: creatinng general properties on version

* fixes: imported app

* fixes added to app migrations

* fixes: mobile view

* fixes: Created a new version with multiple pages from second page, the new version shows the homepage with second page URL

* fixes: table crash due to columnDeletionHistory saved as an object instead of an array

* fixes: on creating new version, data_queries should be created (#7975)

* [appdef] fixes: migrations  (#7951)

* refactor migrations with batching

* event actions: switch page should be mapped to correct new page id

* fixes: importing json-schema app with multiple version: same components do not get render in the canvas

* fixes: import/export of legecy apps

* event actions mapping to correct page ids: migrations

* fixes: migrations  children not rendered in subcontainer components

* adapts to main/viewer changes

* fixes: viewer with #6698

* fixes: viewer route

* fixes: page switch via validateRoutes

* fixes: on delete version fetchApp fails

* handle error on saving changes

* skip name opts

* typo fix

* Instead of relying on the schema, we choose to use the Tooljet version as the determining factor for decoupling import flows

* fixes: slug updates from global settings

* fixes: slug app link (#8008)

* fixes: on version changed the preview link should also update (#8009)

* fixes: on cut and paste events should not cascade (#8010)

* fixes: query options to new mapped ids

* [appdef] fixes: cloning apps (#8012)

* fixes: cloning apps

* fixes: slug status from share modal

* fixes: query confirmations list on viewer (#8017)

* undo-fix

* fixes: updates current state with page data on creating new page

* Fix failing specs (#8031)

* [appdef] fixes : ghost child components are being created on imported/cloned apps and while migrating (#8026)

* fixes: ignore ghost components while importing

* added the fix in migrations

* fixes: adding other components

* fixes: table column resizes

* updates layout dto

* update component dto

* fixes: tabs children are not rendered as the are not in their repsective parent container (#8036)

* moving editorFunc to Editor.jsx

* cleanup

* fixes: e2e test for clone

* cleanup

* fixes: toggle maintaince

* bumping version

* multi-edit: ymap-fix-1

* Revert "multi-edit: ymap-fix-1"

This reverts commit 8b799c3c51.

* [appdef] fixes: viewer route: keeps on reloading for private apps (#8051)

* fixes: viewer route: keeps on reloading for pribate apps

* should return the response

* test: ymap updates-1

* fixes: v1 apps with dq queries resuts in app crash

* Updated import spec

* Revert "Updated import spec"

This reverts commit 802136cdc3.

* Fixed failed platform test cases for app desinition re-design (#8053)

* Fix failed platform test cases

* Modify user permission test cases

* fixes: trial-5: fixing vanishing of components

* Revert "fixes: trial-5: fixing vanishing of components"

This reverts commit a22aec12c7.

* fixes: trail-6: fix

* fixes: trail-7: fix

* Revert "fixes: trail-7: fix"

This reverts commit 08f373c415.

* Revert "fixes: trail-6: fix"

This reverts commit c4e19b5d05.

* multi-edit: ymap-fix

* Revert "multi-edit: ymap-fix"

This reverts commit 92f49c0cde.

* fixes: multi-user updates: adding or removing

* event handlers sycned for multi-user

* should take slug instead of appid if slug is present

* updating adding ymap logic

* versioning with multi-user

* fixes: saving issue

* dont skip ymap

* adds delay to ymap

* ymap-update-order-fixed

* ymap-update-order-fixed-1.1

* ymap-update-order-fixed-1.2

* test=fix

* Updated import spec (#8061)

* cleanup

* lint fixed

* fixes: cloning apps with tabs

* veiwer on event should return

* fixes: event should map with show/hide modal component id

* Fix failing appbuilder specs (#8117)

* cherrypicked ee/00195c064

* bumping version to v2.24.0

* fixed modal actionid typo

* fixes: slugs issues for released an public apps (#8119)

* Fix failed test cases (#8121)

* reverting global slug input

* fixes: versioning with cloned page and ghost components (#8122)

---------

Co-authored-by: Nakul Nagargade <133095394+nakulnagargade@users.noreply.github.com>
Co-authored-by: Kavin Venkatachalam <50441969+kavinvenkatachalam@users.noreply.github.com>
Co-authored-by: Nakul Nagargade <nakul@tooljet.com>
Co-authored-by: Midhun Kumar E <midhun752@gmail.com>
Co-authored-by: nandinisaha13 <nandinisaha13@gmail.com>
Co-authored-by: Mekhla Asopa <dadhichmekhla@gmail.com>
Co-authored-by: Ajith KV <ajith.jaban@gmail.com>
Co-authored-by: Mekhla Asopa <59684099+Mekhla-Asopa@users.noreply.github.com>
2023-11-08 11:09:47 +05:30
Anantshree Chandola
03e3fd950b
New Improved App creation flow (#7209)
* App creation flow

* Add separate footer and divider

* added create app dto, updated tests

* update test

* Update server/src/dto/app-create.dto.ts

Co-authored-by: Midhun G S <gsmithun4@gmail.com>

* Update server/src/dto/app-create.dto.ts

Co-authored-by: Midhun G S <gsmithun4@gmail.com>

* updates

* Removed comments

* small updates

* rename app flow

* Import App, Create App From Template, Clone App (BE+FE)

* Edit app updates

* remove comments

* updates

* updates

* styling updates

* handle spaces in app name

* update

* styling updates

* Update permissions

* updates

* don't show toast failure message

* Update frontend/src/Editor/Header/EditAppName.jsx

Co-authored-by: Muhsin Shah C P  <muhsinshah21@gmail.com>

* styling updates

* Update server/src/controllers/app_import_export.controller.ts

Co-authored-by: Muhsin Shah C P  <muhsinshah21@gmail.com>

* remove comments

* remove comments and small corrections

* removed logs and deleted unwanted files

* correct lint error

* resolve failing tests + handled trimmed app names

* resolve failing tests + handle trimmed app names

* updates

* duplicate imports removed

* updates

* Rebase corrections and updates

* update

* resolve failing e2e test

* fix error

* fix

* length fix

* fix

---------

Co-authored-by: Midhun G S <gsmithun4@gmail.com>
Co-authored-by: Muhsin Shah C P <muhsinshah21@gmail.com>
2023-10-17 13:18:18 +05:30
Muhsin Shah C P
4331b40869
[Improvements] Environment changes (#6762)
* Added priority, enabled, current_environment_id columns
- added data-migrations to backfill the priority and current environment id for each version

* working on multi environments improvement
- added checks for promoted env
- promote env feature
- released app & production env check
- promoted version definition check

* added import support

* working on migration issues

* fixed failing migration

* fixed failing migration once again

* Fixed possible bugs
- seed
- test case helpers
- app version release

* fixed migration bug

* working on migration progress

* working on migration progress class

* added migration progress

* fixed unit tests

* fixed e2e cases

* added default priority

* added PR changes

* changed import logic

* added global datasource design and api changes

* changed default env if the id is null

* added unique constraint and a bug fix

* changed app versions api
- added current environment id to the where conditions

* fixed failing test cases

* added new test cases

* added new api changes

* added back the enabled check

* fixed test case

* change: added environment to create versions dto

* typo: environmentId

* added new api for fetching versions

* added appVersions count changes to CE

* Changed app versions by environmentid logic

* added PR changes for EE

* fixed wrong promoted env id issue

* fix: can't switch to staging

* added import export changes
- update delete modal text

* added EE import export code, modal updated text

* added common migration code for CE and EE

* fixes
- enable run button for released version
- disable change datasource for queries

* changed released version popup design to new EE design

* add: hide delete icons for released version
2023-07-11 10:10:03 +05:30
Muhsin Shah C P
e7bb22e649
[enhancement] Sanitising app name while creating or editing an app (#6423)
* working on app name unique migrationworking on app name unique migration

* Added checks and conditions

* change: remove staring and ending spaces

* fix: error management

* fix: regex

* working on app name generation

* app name:fixing bugs

* app name: fixing and refactoring code

* app name: fixed test cases

* updated app name constraints and default name

* fix: apps.e2e tests case

* fix: added app name to the prompt

* added app input tooltip

* removed unwanted code

* added tooltip close code

* fixed auto generated name issue

* merging develop

* code refactoring

---------

Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2023-06-06 14:12:36 +05:30
Muhsin Shah C P
f215d1df96
App version creation flow enhancement - New released version warning popup - Current version issues (#5947)
* current version issue

* working on modal design

* Added released version popup and shake animation

* refactoring the code

* improved the experience

* extra changes

* css revert

* fix: disable components & properties

* fix: switched released version saving & create version modal input value retain issues

* fix: retained values issues

* fix: edit version modal current name issue
- disabled comment's icon

* override grayed out effect for preview

* fix: text overflow issue

* css fix: overflow

* added check for sub-containers

* fixed and added specs

* UI and UX fixes

* lint fix

* added clearInternal fn

* change:added clearInternal fn

* refactoring the code

* removed the comments

* added some code that were missing after the merge

* fixed merge issues

* fixed undo redo

* reverted the store changes
2023-05-11 12:32:21 +05:30
Muhsin Shah C P
32740743e1
[Improvement] URLs scoped with workspace id (#5487)
* add: new URL prefix

* fix: working on home page

* add: profile path

* playing with rxjs

* removed context part

* working on path changes

* changing routes
- TODO: replace the workspaceId with actual id

* redo: public apps path

* initial commit

* added authorize API

* remove privileges from auth response

* fixed some api issue
- added subscriptions

* fix: redirect url workspace-id null issue

* fix: switch workspace

* fix: organization list mapping
- menu item paths

* fix: preview url
- editor, viewer permission mapping

* jwt fix

* fix: some url issue
- permission mappings
- workspace login

* fixed some issues
- user invite workspace-id
- org settings menu item default selected item issue

* app viewer fixes

* fixing workspace login issues

* fix

* fixing issues
- tooljet db
- path issues
- refatoring the code

* fix: workspace vars permissions

* fix: multi-page handle

* fix: create app from template

* fix: bulk user upload

* fix: import app
- clone app
- upload profile image

* fix: onboarding

* fix: log out

* fixed multi-workspace logout issue

* fix: launch btn

* fix: oauth2

* fixes

* fix: sso login

* fix: workspace sso login

* fixing sso issues

* fix: moved list of orgs to rxjs
- fixed switching issues

* reverting some changes

* fixed some minor bugs

* fixing sso redirect url issues

* fix: switching network timing issues

* fix: back to workspace-id

* fix: tj-database
- refactored the code - removed org id from some pages
- will get the org id from the service file only

* fix: multi-pages

* fix: infinite loop issue

* fixing workspace switching issue

* fixes
- comment link
- logout & private route redirect url

* fix: wrong uuid error

* fixing subpath
- fixed most of the places
- need to test & fix workspace login, sso, new account

* fix: subpath workspace login

* fix: rxjs handle bug

* Revert "fix: tj-database"

This reverts commit 9632ec2ff0.

* fix: reverted tj-db changes

* fix: subpath sso

* typo fix

* fix: existing session issues

* new: switch workspace page

* fix: modal dark-mode

* added default sso support

* fixes
- subpath workspace switching
- handle wrong routes

* fix: manager user button
- refactored the code

* removed SINGLE Workspace feature

* rebase

* add: change modal text

* fix: added validation

* fixed private app 401 issue

* initial commit

* fix: logged out session multi-tab issue

* refactoring the code

* fix: redirect url issue

* added auth-token in cookies

* Fix: failing e2e specs

* added session API

* fix: backend session guard

* fix: removing user details from local storage

* fix: null wid

* undo and redo

* fix: login page

* fix: viewer login redirection

* fix: login page redirection

* fix: public apps logout issue

* added session storage and scheduler

* added profile api

* fix: sso login
- switch workspace
- login page
- setup admin

* working on fixes

* fix: socket issue

* fix: setup admin api

* connected profile & logout apis

* fix: malfunctioned auth token case

* fix: realtime avatar

* fix: profile avatar

* fix: Realtime cursors avatar

* setting max age for auth token cookie

* add: Go to login page if logout api returns 401

* fix: subpath login

* fix

* fix: app logout [viewer]

* fix: authorize page

* remove expiry from jwt

* fix: integrations route
- session api

* small fix

* fix: updated profile

* fix: workspace login [logged user]

* fix: oauth and another workspace page issue

* fixed app preview logout issue

* subpath fix

* fix: subpath app id

* fix: selected state didnt change for apps page [subpath]

* fix

* add cookie parser to test app

* specs added

* increased user session expiry time

* test: session & new apis

* working on test cases

* fix: onboarding issue

* fixing specs

* fix: test cases

* fix: removing profile api calls

* some fixes

* fixing rebase issues

* fix: global ds issues

* fix: app is crashing

* fix: back to text

* fix: oauth test cases

* fix: test-helper

* fix: onboarding test cases

* fix: tests again

* refactoring the code

* latest develop merging precautions
- fixed a minor null issue

* fix: typo

* fix :menu issues due to the merging

* fix: - clicking on tooljet logo didnt redirect to login page for public apps
- private app preview doesnt load after login

* subpath fixes

* fixed back to issue

* PR changes

* fix: spec fixes for EE

* doc: URL scoped for workspace

---------

Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
Co-authored-by: Shubhendra <withshubh@gmail.com>
2023-04-06 16:42:58 +05:30
vjaris42
bb9a211e55
[Feature] :: Global datasources (#5504)
* add: columns and migrations for data queries and sources

* add: migrations for app environments

* fix: datasources and queries api

* fix: import apis

* add: radixui colors

* create: global datasource page

* fix: version creation not including global datasources queries

* fix: version deletion failure

* fix: ui and other bugs

* add: check for abilities on global ds

* fix: bugs

* fix: existing test cases

* fix: migration and bugs

* fix: rest api oauthorize bugs

* hide: add button for local ds

* fix: query bugs

* fix: new organization environment creation

* fix: local ds label showing for new apps

* fix: on page load queries for preview app and published app

* fix: import bugs from v1

* fix: merge conflicts

* fix: import apis

* fix: apss with mulit envs

* fix: ui bugs

* fix: environments not being created on db:seed

* fix: ui bugs

* fix: route settings for global datasources

* fix: customer dashboard template

* fix: local ds queries not being saved

* fix: runpy issues

* changes: ui

* fix: migration issues

* fix: ui

* hide datasources when no local datasources

* fix: test cases

* fix: unit test cases and global queries on app import/export

* cleanup

* add: package-lock file

* undo: migration rename

* cleanup

* fix: ui bugs

* migration fixes

* fix: dark mode issues

* fix: change datasource failing on query create mode

* fix: workspace selector issues

* fix: clickoutside for change scope option

* migration changes

* fix: open api issue

* reverting configs changes

* [Fix] Global datasources & Environment Id issue (#5830)

* fix: oauth env id issue

* code changes

---------

Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
Co-authored-by: Muhsin Shah <muhsinshah21@gmail.com>
2023-03-24 21:41:21 +05:30
gsmithun4
0fe7dda015 e2e test case fixes 2023-03-02 19:48:20 +05:30
Suraj Rane
fda6de4a0c
Fixed version name sanitization on editing versions (#4570)
* Fixed Version name sanitization on editing versions

* Fixed linting errors

* Fixed definition type for version edit DTO

* Fixed e2e tests for version edit

---------

Co-authored-by: Midhun G S <gsmithun4@gmail.com>
2023-02-13 15:35:22 +05:30
Midhun G S
699f28f318
fixes for e2e test cases (#5451) 2023-01-31 17:13:04 +05:30
Muhsin Shah C P
ff4822c397
Fix: v2-beta test cases (#5221)
* stashed from multi-env-cases

* fixed new issues

* skip: tooljet_db specs

* added comment

* typo

* fix: fixing errors after merging with v2-beta
2023-01-09 17:30:32 +05:30
Akshay
cc516b9ddc
Feature: Versioned exports (#4140)
* add ability to export app versions

* remove console.log

* add spec

* [ Enhancement ]: Ability to export versioned apps ( frontend ) (#4271)

* added basic UI and functionality

* added functionality to export all versions or selected versions of app

* added UI

* refactored the code

* refactored code

* use custom hook for checking if component is mounted or not and accessing  darkMode from props

* showing current version first

* added spacing between container and input tag and input tag and text

* added cursor pointer on the version container

* removed use mount to avoid extra re-rendering component

* fixed typo request

* update permissions

* fix permissions

Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-12-02 14:13:28 +05:30
Midhun G S
b0e6a34f18
[Fix] Delete app not working if any user mentioned in comments (#4161)
* Fix for app delete issue

* fix

* fix

* added dbTransactionWrap for more functions

* reuse dbTransactionWrap

* onboarding changes

* SSO fix

* fix

* added test cases

* changed threads comments relation

* added test cases
2022-10-17 23:04:06 +05:30
Muhsin Shah C P
cf5a37c56a
[bugfix] Now users can't create multiple versions with the same name for an app (#3342)
* Created a new migration file

* Added the migration

* added the failing error

* Fixed failing specs

* Working on PR changes
- error messages

* edited the migration

* added existed check

* Changed some variable names and error messages

* Resolved PR changes
- Typo
- Removed useless code
2022-06-28 12:36:28 +05:30
Midhun G S
0545528504
Support for multiple workspaces 🚀 (#2778)
* multi org changes

* Initial changes

* changes

* manage sso page

* Multi-organization changes

* Multi organization changes

* multi-org changes

* multi-org changes

* multi-org changes

* multi-org fixes

* env variables app.json changes

* multi-org-fix

* user invitation token fix

* multi-org group permission fix

* multi-org app privilege

* google oauth fix

* Remove enable signup for form login

* Multi organization fixes

* multi-org user invite flow changes

* multi-org sign up fix

* rebase and multi-org fixes

* revert testing logs

* test logs revert

* migration changes

* migration file fix

* error message changes

* git login for private email fix

* dropdown fix

* test cases

* e2e test cases added

* test cases fix

* documentation changes

* testcases fix

* testcases added

* replace findOne with findOneOrFail

* accept invite testcases

* login page fixes

* added encrypted tag

* review comments

* migration fixes

* improvements

* manage sso loading fix

* review comments

* migration file changes

* new organization creation bug fix

* added e2e testcases

* added testcases

* Update data_sources.controller.ts
2022-05-05 12:38:42 +05:30
Akshay
971db32540
add backend validation to prevent editing released version (#2926) 2022-04-28 17:00:58 +05:30
Akshay
841710aa9b
Fix: Version creation on empty/invalid version from id (#2510)
* fix version creation on empty/invalid version from id

* fix spec

* hotfix: Edited changes not shown when switching versions (#2386)

* fix edited changes not shown when switching versions

* fix version create from not picking editing version

* fix version switch not updated on editing version save
2022-03-15 15:12:43 +05:30
Akshay
8bfd814b3a
Feature: Version deletion (#2492)
* add ability to delete versions

* add specs for version delete

* add check for preventing released version deletion
2022-03-11 01:44:37 +05:30
Akshay
e81c7cdf93
fixes failing spec (#2425) 2022-03-03 22:05:19 +05:30
Akshay Sasidharan
7c0ca61012 Merge branch 'main' into develop 2022-01-31 12:16:12 +05:30
Akshay
fa78963ec2
Fix: Folder and app scopes on homepage (#2004)
* fix folder scope on homepage

* bump up version
2022-01-31 11:15:44 +05:30
Midhun G S
486b8625c3
[BUG-1941] typeorm findone fix (#1973)
* BUG-1941 typeorm fineOne fix

* e2e test case failure
2022-01-28 11:44:44 +05:30
Akshay
4f70e0b3f8
Fix: version find getting latest rec when not found (#1927)
* fixes version find getting latest rec when not found

* remove old spec

* fix e2e test
2022-01-25 13:09:50 +05:30
Akshay
56826c3183
Feature: Auto save editor and version management revamp (#1784)
* add modal to create init version

* add init version and ability to auto save

* auto save only when editing version is set

* Feature: App version management ui revamp (#1873)

* add modal to create init version

* add init version and ability to auto save

* auto save only when editing version is set

* revamp version switching on editor

* skip save on app definition load

* handle click outside dropdown

* fix remove component and update styling

* fix auto save detail

* change wording of deployed to released

* remove console.log

* add spec for version creation from another version

* update version create model and hide save detail after shown
2022-01-24 11:21:54 +05:30
Midhun G S
1e103ad4b7
[Home Page Design Changes] Update icon API (#1787)
* Feature-1786 Update Icon API

* Update Folders.jsx
2022-01-12 18:04:39 +05:30
Akshay
823833b12e
Feature: Versioning data sources & queries (#1620)
* add migrations for versioning datasources and dataqueries

* eslint migrations folder

* update ormconfig to use app context in migrations

* make app to make use versioned data sources and queries in editor

* app import should honor data source and query versioning

* register ts-node path on running migrations

* load data queries when finding versions

* update e2e tests

* handle for invalid oauth2 datasources

* update e2e tests

* introduce db migrations access lock to handle concurrent backfill

* scope migrations by missing version id

* fix import export without data source/query versions

* fix import

* fix spec

* handle invalid data on migration

* fix import

* remove console logs

* handle new app imports

* fix version check

* fix async creation

* explicitly add timestamps on version import
2022-01-04 13:34:12 +05:30
Midhun G S
5bdd0fd6bf
Home Page Application search box (#1603)
* feature-1567 initial commit

* feature-1567

* freture-1567 App search box

* added default value for search key

* Loading fix

* Review comments

* Separated like query

* feature-1567 e2e testcases

* feature-1567 Fix

* feature-1567 fix

* feature-1567 fix
2021-12-22 14:37:37 +05:30
Akshay
a7f36f77f6
Chore: Revise and add specs for folders (#1391)
* revise and add specs for folders

* Feature: Folder create permission (#1394)

* add migration for folder create permission

* add backfill migration for folder create permission on admin group

* adds permission for folder creation

* refactor function

* select distinct folders
2021-11-15 11:43:48 +05:30
Akshay
a958b37cef
Feature: Group level permissions and related fixes (#1204)
* add column app_create to group_permissions table

* add app create column to group permission entity

* backfill app_create permission as true for admin group

* add app delete permissions to group permissions

* update group permissions entity for app delete

* add ability to set group level permission for app creation

* refactor and fix app clone and imports

* fix created by user on homepage

* fix spinner on import

* update seeds service to set group level permission

* fix rollback query

* fix imported/cloned app timestamps

* honor logged in user permissions at UI

* remove console log

* fix data query id being replaced on import

* replace data query id within app versions on import
2021-10-25 14:05:32 +05:30
Akshay
b0208c553a
Feature: Add ability to import and export apps (#1138)
* add ability to import and export apps

* copy credentials on imports if it already exists

* authorize exports for public apps with only authenticated users

* remove app auth guard for export

* make import as a separate button

* update import button styling

* handle prexisting slug while import

* set file input as null when file has been read

* add fix for slug updation on import
2021-10-19 16:52:00 +05:30
Akshay
799bef0138
fix public app view and data query run (#1082) 2021-10-15 14:35:11 +05:30
Akshay
7023f72d1d
Feature: User access management 🔥 (#918)
* create migrations for group permissions setup

* define new entities and relationships

* revise migrations

* rename columns

* add migration to populate permission groups for existing users

* Feature: User access permission group usage (#883)

* create migrations for group permissions setup

* define new entities and relationships

* revise migrations

* rename columns

* add migration to populate permission groups for existing users

* revise migrations

* hide roles usage

* setup group permissions for apps and users

* fix defaultChecked

* fix update permission checkbox

* fix casl ability check to have params passed

* fix casl apps abilities to check with app specific permission

* add ability to delete groups

* conditionally render edit and delete options for all and admin users

* fix user role to group migration

* revise group management pages to disallow updating default group

* move manage users and groups to navbar dropdown

* show only addable apps and users on dropdowns

* rename header as profile settings

* scope addable apps and users by organization

* scope viewable apps on homepage

* hide manage groups link from non admins

* make permissions to be used with radio input

* add loading state for add apps/users buttons

* revise unit tests

* revise migrations

* fix e2e tests

* comment out dead code

* fix seeds script

* handle folder count

* captalize error toast

* hide manage users dropdown for non admins

* show fobidden error on blank homepage

* fix folder app count

* fix invalid state set

* make group name clickable for edit instead

* users with edit permission can deploy apps

* not show edit link on homepage if user dont have update permission

* remove unused entity from merge

* remove roles usage from manage org users page

* fix folder count and blank slate on homepage

* disable add buttons if there is no selections

* humanize default groups on view

* make app added onto groups have read permission by default

* not show app menu if user is not admin

* remove admin users from group user addition dropdown

* create default permissions for app cloned

* fix querying index page without page params

* fix admin scoped out from group add

* remove apps from header

* fix invitation url not shown

* scope admin deletion check by org

* scope public apps by organization

* add specs for group permissions e2e

* removed unused entity and add group permissions spec

* remove console logs

* remove unused permission

* scope public app count by org

* remove console log

* refactor manage group permission resources component

* update group permssion in org scope
2021-10-11 20:45:58 +05:30
Arpit
26c9cc655c
Fix linting errors across the app (#785)
* eslint-setup: rules for frontend and server

* setup pre-commit:hook

* frontend:eslint fixes

* frontend eslint errors and warning fixed

* eslint:fix for ./server

* fix server/test: expectatin string lint/error

* pre-commit:updated

* removed unwanted install cmd from docker file

* recommended settings and extension for vscode

* husky prepare script added

* updated extension recommendations

* added prettier as recommended extension

* added pre-commit to package.json

* remove .prettierrc file

* resolve changes

* resolve changes
2021-09-21 19:18:28 +05:30
Akshay
52cbec3d4c
Add ability to clone from existing apps (#743)
* add ability to clone from existing apps

* make use of clone ability to authorize clone requests

* refactor to use seperate service for cloning apps
2021-09-15 21:17:44 +05:30
Akshay
762773770c
Fixes app creation authorization (#757) 2021-09-15 21:12:04 +05:30
Akshay
82f76e2799
Feature: app version preview & edit (#639)
* add ability to preview and edit versions

* add specs for get app versions

* create new app versions from prev definition

* fixes

* move default slug creation outside typeorm transaction

* set slug as app id when null

* fix app creation response

* fix entities not loading on test env

* add e2e test for version creation scenarios

Co-authored-by: navaneeth <navaneethpk@outlook.com>
2021-08-30 17:13:27 +05:30
Sherfin Shamsudeen
5e266f9606
Delete 'AppUser's before App is deleted (#490)
* Delete 'AppUser's before App is deleted

This commit ensures that all the corresponding entries of AppUser
are deleted before an App is deleted. This is done so to prevent
pre-existing foreign keys from halting the deletion.

* Delete all One-To-Many associated entities when app is deleted

This commit makes the App service's delete action delete all the
related entities of types: FolderApps, DataSources, DataQueries,
AppUsers and AppVersions, before deleting the app itself.

* Set currentVersionId to null before deleting app
2021-08-11 15:36:28 +05:30
Sherfin Shamsudeen
54a40176ea
Feature: Ability to delete apps (#486)
* Add end-point that deletes an application

Deleting an application will also delete its corresponding
data sources, data queries and app versions.

* Add unit test for app deletion end-point

* Additional e2e test for delete app end-point

This test ensures that non-admin user cannot delete apps.
2021-08-10 19:36:37 +05:30
navaneeth
3c24d8a6c5 Endpoints for app viewer 2021-07-24 09:43:45 +05:30
navaneeth
59e0cd62c2 Endpoint for saving app versions 2021-07-23 22:27:59 +05:30
navaneeth
d5dda41c79 Endpoint to create app versions 2021-07-23 21:29:01 +05:30
navaneeth
70546845be Endpoint for fetching app versions 2021-07-23 20:21:24 +05:30
navaneeth
a003d24e97 Endpoint to create app users 2021-07-23 12:13:50 +05:30
navaneeth
41cca1e60c App users endpoint & e2e tests 2021-07-23 11:02:49 +05:30
navaneeth
ad3e627b9c Endpoint for updating app params 2021-07-22 19:54:18 +05:30