Commit Graph

56 Commits

Author SHA1 Message Date
Hetu Nandu
6c681ef98c
Fix initial value check for action form config (#4080) 2021-04-21 13:18:24 +05:30
Trisha Anand
eaa24ca894
[Bug Fix] : Fetch actions by id during refactor action name to solve IncorrectResultSizeDataAccessException for pages where duplicate action names exist (#4030)
* New dto for refactoring action name which includes actionId as well

* Refactor action name now also takes actionId as payload and fetches the action from db by id instead of name to solve for the scenario where the action names could be duplicated.

* Adding actionId to QP of action refactor API.

* WIP : test for asserting the bug fix

* WIP test

* Fixed the test case asserting refactoring works for an action when there are duplicate action names in the page.

Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
2021-04-19 12:35:10 +05:30
Hetu Nandu
363bee8ec9
Fix action field evaluation for editor (#3701) 2021-03-30 10:59:03 +05:30
Hetu Nandu
2dd1791810
Refactor and add unit tests to API interceptors (#3647) 2021-03-22 14:52:24 +05:30
Hetu Nandu
40e42b296d
Fix for timeout being sent in a different location (#2708) 2021-01-26 08:42:52 +05:30
Piyush Mishra
148497a1bc
Refactor datasources and actions for stronger type checking (#2167) 2021-01-12 09:47:28 +05:30
Piyush Mishra
1521f7445c
Fix eslint warnings (#2510) 2021-01-12 06:52:31 +05:30
Hetu Nandu
4387200262
Sub tree evaluation (#1841)
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Piyush Mishra <piyush@codeitout.com>
Co-authored-by: Nikhil Nandagopal <nikhil@appsmith.com>
Co-authored-by: Akash N <akash@codemonk.in>
2021-01-04 15:46:08 +05:30
akash-codemonk
1a35bb1e75
Onboarding flow (#2311) 2020-12-30 13:01:20 +05:30
Arpit Mohan
a942dc198e Revert "Onboarding flow (#1960)"
This reverts commit e84699e7ba.

Reverting this commit because this flow requires more changes before it's ready for prime-time.
Will continue development on this feature in a different branch
2020-12-22 13:02:02 +05:30
akash-codemonk
e84699e7ba
Onboarding flow (#1960)
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
2020-12-18 18:48:47 +05:30
Abhinav Jha
543b7ec72d
Entity Explorer Render (#1354)
* WIP: Performance improvements in entity explorer

* WIP: Achieve feature parity for entity explorer with release

* Update unit tests

* Add sentry profiling to current page entity properties component

* Fix page add/delete not showing up on entity explorer issue. Update memoization logic for pagegroup entity

* Deal with the ban-ts-ignore eslint issues

* Update unit tests

* Fix widget entity children visibility

* Fix tests and code

* Fix tests for scenarios where the collapsed entities are unmount, as this is a part of the performance optimization

* Filter undefined children when generating structureDSL

* Remove rule from eslintrc

Consolidate createPage test command

* Update CreatePage tests to remove redundant dsl updates

* Revert CreatePage test changes, as adding more checks within this command globally causes other tests to have issues.

* re-enable eslint rule, as without it CI tests fail

* Revert to ban-ts-comment

* Fix typescript ban-ts-ignore issue by upgrading react-scripts and fixing typescript issue across the application

* Typescript errors handled

Co-authored-by: vicky-primathon.in <vicky.bansal@primathon.in>
2020-11-03 18:35:40 +05:30
Trisha Anand
fc9ea45e3b
[API breaking change : Automated Tests Will Fail] Page And Action Refactor (#549)
* Introduced new page which stores the published and unpublished pages as separate.

* Mid level commit to save the state.

* Parity of new page repository with old page repository (custom functions)

* WIP : Delete a page. This requires changes across application structure as well.

* Added publishedPages construct inside application to store the pages in the deployed view as well as isDefault so that the same changes (delete or isDefault) in unpublished view doesn't alter these fields for the published application

* Parity reached with PageService.

* Minor ActionService refactor to remove unnecessary code.
ApplicationPageService, LayoutActionService, LayoutService use the new page service to fetch the pages
Minor corrections in fetching the page from new page service in tests

* New save function which sets the PageDTO for unpublished page and then saves the new page into repository.

* Migration of page service functions to new page service functions across other services/tests/controller

* Finished migrating all the page service functions to the new page service functions

* Application Service Tests have been fixed.

* All the existing test cases are working now.

* Publish application implemented to store published pages as well. Added a basic test case to check that published pages is being set and that page's publishedPageDTO is being set accordingly.

* Minor TODOs added to add test cases for published application.

* A few tests to ascertain that published application page fields (deleted, isDefault) does not get changed when these statuses are changed for a page in edit mode.

* Added a new controller end point to fetch application in view mode.

* Added new endpoint for fetching an application in view mode on the client.

* Bug fix where get application in view mode API was not getting called.

* Fixed the get page names by application & archive pages which have been deleted in edit mode during publishing of application.

* During delete page, if a page was never published and it was deleted during edit, delete the entire page instead of just deleting the unpublished PageDTO

* Minor formatting.

* Non working client side code to fetch page list using view mode.

* revert unnecassary changes and streamlined view and edit actions

* Fix missed import

* Fixed a bug where if a page is not published, it should not be returned in view mode in list of page names api.

* Fixed update for a page which was not working in integration test.

* ActionDTO added.

* Solidified the new action structure.

* Migration added for NewAction index creation and NewAction per Action insertion in the database.

* Basic file structure added the new repository, custom repository, service, etc.

* Delete OldPage.java

* Repo functions added - TODO : Haven;t handled the published/edited views

* Helper functions added to convert Action to NewAction and vice-versa. Removed unused currentUserMono usage.

* Create & update action functionality added.

* Execute Action refactored. Removed dry run specific code.

* Repository migrated to handle new data structure. Execute action refactored to no longer support dry runs of actions.

* TODO added for special handling of change view of application to handle edge cases of pages/actions which either exist in published mode but don't exist in unpublished mode or vice versa.

* Migrated finding on load actions from spring repository to custom repository.

* In view mode, now actions are being fetched by application id directly instead of first fetching application and then using the page ids, fetching the actions. This reduces the db calls from 2 to 1 per fetch actions in view mode api call.

* Delete action and get all actions (used in edit mode on the client side) implemented.

* Updated CollectionService and ActionCollectionService to use the new action service instead of the old one.

* LayoutActionService refactored to now use the new service functions.

* ActionController now no longer used ActionService. The remaining service functions have been migrated to the new action service.

* Refactor across ACL code for addition/removal of policies during addition/removal of users to organization, making app public, refactor for services like policy utils, item service, etc.

* Removed the last of action repository and action service and replaced with new action repo and new action service.

* Compile and run time issues fixed. The server is coming up without any spring dependency errors.

* WIP in fixing fetching actions by page id.

* Finally!!! Fixed the fetch actions (both published and unpublished actions) by page id repository function.

* Fixed create action bug where null datasource in published actiondto (inside newly created action) leads to error.

* Fixed the execute action issues :
1. Removed the dry runs from the tests
2. Fixed the null pointer error in variable substituted action and datasource configurations.

* 1. Fixed the custom action repository field names.
2. Fixed the data structures used in ExamplesOrganizationClonerTests

* Fixed countByDatasourceId repository function which was querying the actions incorrectly.

* Fixed the clone example organization error where the id of the action was not getting updated in the page correctly. Yay!

* Fixed post merge compilation failure.

* Fixed more compilation time failures in ActionServiceTest

* Fixed failing test case for fetching actions in view mode.

* Minor changes to resolve merge changes and incorporate in the new refactored code.

* 1. Fixed compile time errors on Client code.
2. Fixed fetching of actions in view mode by application id. The repository function did not need name parameter. Removed the same.

* [Integration Testing Error Fix] : Added a new test case for refactor action name.

* Instead of fetching actions in the page, mistakenly used the base service which was fetching all the actions in the repository, barring none which led to the name refactor being blocked even though no action in the current page exists with the new proposed name,

* Added delete functionality to action service.

* Minor code cleanup

* Adding viewMode to action execution

* Replacing action with actionId.

* 1. Bug fix for deletion of unpublished action. In case of never published action, the entire action should be deleted. In case an action was published, only the unpublished action should be deleted.
2. In case of DB actions (external datasources), only the bare minimum fields should be stored inside the action (datasource id and datasource plugin id). The other fields should not be duplicated across code.

* Fixed yarn build compilation issues.

* Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ActionController.java

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>

* Changed the API path for GET applications in view mode. Some minor code formatting.

* Incorporated review comments.

* Some more unnecessary code removed.

* Instead of returning Page, now the interface object between client and server for Pages is PageDTO

* Migrated Page and Action to PageDTO and ActionDTO
Fixed the compilation issues.
TODO : Fix the test compilation issues.

* Fixed compilation time issues with all the tests by migrating Page and Action to PageDTO and ActionDTO respectively

* Action Controller and Page Controller no longer extend Base Controller. All the required functions have now been implemented and no base line API end points are being re-used from the base.

* Test case fixes.

* Bug Fix : Updating an action was not updating execute on load. Fixed the data flow leading to the error.

* Deprecating Page and Action domain objects. This is to ensure no new code is written with these till we remove this old code.

* Cloned example applications are now published before returning. This is to ensure that the applications are in ready to view mode when the new user signs up.

* Added a function comment to expand on the usage of new param introduced.

* When cloning a page, new actions were not being stored. Added that. Also updated the clonePage test to assert that the actions are also cloned when the pages are cloned.

* Updated a Api call

* removed extra slash

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Satbir Singh <satbir121@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: nandan.anantharamu <nandan@thinkify.io>
2020-10-26 18:04:23 +05:30
Nikhil Nandagopal
0a149f9e54
added cancel request logic for update layout, api and action (#1224) 2020-10-15 20:58:54 +05:30
akash-codemonk
dbfd986d0e
Add action settings tab to api and query pane (#434)
* Add action settings tab to api and query pane

- Ask for confirmation before running an action

* Update  property of actions basedon the updateLayout response

Prevent confirmation dialog for Action run, until  property of action is true

Send an API Request when the user toggles the  property of an Action

* update http method to toggle executeOnLoad for an action to PUT

* Fix save layout response type

* Remove console.log

* If updating executeOnLoad, avoid calling update action API

Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
2020-08-27 21:09:16 +05:30
akash-codemonk
3f6b6da0e5
Use isExecutionSuccess for showing error response as status code string does not appear in query response (#226) 2020-08-05 15:53:07 +05:30
Hetu Nandu
70955de703
Create fetch actions workflow for view mode (#102)
* Create fetch actions workflow for view mode

* Remove config from autocomplete results
2020-07-15 18:31:35 +05:30
Hetu Nandu
13e173fa77
Action save fixes (#33)
- Increased timeout for move action
- Table header typescript fix
- Fix data tree selectors for better performance
- Debounce update action saga by 500 ms
- Query delete fix
- Query save fix
2020-07-06 19:05:31 +05:30
Satbir Singh
6def10319e Adding type for request. 2020-06-19 23:03:02 +05:30
Satbir Singh
bf0c0d737f Changing response request structure. 2020-06-19 21:57:12 +05:30
Satbir Singh
7e3df81302 Api name editable. 2020-06-16 10:23:19 +00:00
Hetu Nandu
d9540f8927 Evaluated value popup 2020-06-04 13:49:22 +00:00
Akash N
1850b8f6b3 Bug fixes
- Show request body instead of request headers
- Get httpMethod directly.
- Add padding at the right for tabs
2020-05-22 03:43:01 +00:00
Hetu Nandu
859abb0443 Action execution success is determined by "data.isExecutionSuccess" field 2020-05-14 06:33:23 +00:00
Hetu Nandu
8572d02b91 Api timeout changes 2020-05-07 08:07:29 +00:00
Hetu Nandu
63dacf7346 Merge branch 'fix/increase-request-timeout' into 'release'
Increase timeout of execute action

See merge request theappsmith/internal-tools-client!538
2020-05-05 08:13:40 +00:00
Hetu Nandu
7b6fad5259 Increase timeout of execute action 2020-05-05 08:13:39 +00:00
Hetu Nandu
0bdb9bea4c feat: dynamic post body in api form
- add info icon
- display helper text and placeholders dynamically
2020-05-05 07:50:30 +00:00
Hetu Nandu
f0d805cf52 Adding pluginId in datasource instead of action 2020-04-17 16:05:36 +05:30
Hetu Nandu
af3b5d212f fix: ui fixes and type defination fixes
- avoid using any or undefined types in the code
- fix ui issues for api home screen
- update naming convensions
- remove unwanted code
- use color variables
2020-04-14 12:34:14 +00:00
Hetu Nandu
1bd5a8c5e7 fix page load actions issues 2020-03-13 01:57:39 +05:30
Abhinav Jha
8024fe5131 Feature - update widget name 2020-02-21 12:16:49 +00:00
Satbir Singh
84d35aced6 Feature/server side pagination 2020-02-07 02:32:52 +00:00
Satbir Singh
6987b392d7 Revert "Merge branch 'feature/server-side-pagination' into 'release'"
This reverts merge request !271
2020-02-04 09:41:12 +00:00
Satbir Singh
7edad01821 Server side pagination 2020-02-04 08:59:46 +00:00
Hetu Nandu
729599009a Api page association 2020-01-24 09:54:40 +00:00
Hetu Nandu
0f908de645 Feature/api cached response autocomplete 2020-01-02 13:46:36 +00:00
Hetu Nandu
e82f5f3988 Sync path and params in api pane 2019-12-23 12:12:58 +00:00
Abhinav Jha
ed2ecadbc4 User Auth Flow 2019-12-16 08:49:10 +00:00
Hetu Nandu
dd03093834 Execute page load actions when loading page 2019-12-11 15:24:27 +00:00
Hetu Nandu
fbb7742f0e moved to absolute paths for all fiels 2019-11-25 10:37:27 +05:30
Hetu Nandu
7beb7fa40c Fixes for dry run 2019-11-20 10:57:05 +00:00
Hetu Nandu
c9914c4246 Api Dry Run 2019-11-12 09:43:13 +00:00
Hetu Nandu
7687d68b61 Rename "resources" to "datasources" 2019-11-07 09:32:38 +00:00
Hetu Nandu
e380c489fb Dynamic binding scaffold 2019-11-01 07:11:32 +00:00
Hetu Nandu
4c5850499d Few more api pane fixes
Fixes: #165 #164 #163 #162 #161 #160 #157 #133 #119 #118 #115 #114
2019-10-29 12:02:58 +00:00
Hetu Nandu
1c0854ac02 Fix key value field (#105) 2019-10-22 14:54:23 +00:00
Hetu Nandu
e0348cc1f3 API form 2019-10-21 15:12:45 +00:00
Abhinav Jha
92eb493d62 Fixes for code review comments 2019-09-24 18:06:03 +05:30
Nikhil Nandagopal
60714e19f2 made binding optional
re-added mock response
2019-09-18 19:40:57 +05:30