2022-11-30 05:59:45 +00:00
|
|
|
export const TEMP_DATASOURCE_ID = "temp-id-0";
|
2023-05-19 18:37:06 +00:00
|
|
|
export const DATASOURCE_NAME_DEFAULT_PREFIX = "Untitled datasource ";
|
feat: gsheet disable new query when no files selected (#21912)
## Description
This PR adds:
- When gsheet datasource is created with "Selected Sheets" Modality, and
if user fails to select any files from file picker
- we should disable new query creation
- we should show error message banner on datasource review page
**How to test:**
- Create google sheet datasource, break the authorisation flow, check
review page, error message like "Data source is not authorized, please
authorize to continue." would be shown.
- Edit datasource, complete the authorisation but do not pick any files
from file picker, error message like "Datasource does not have access to
any files, please authorize google sheets to use this data source" would
be shown
Fixes #20290
Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
## Type of change
> Please delete options that are not relevant.
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manual
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-04-06 14:12:34 +00:00
|
|
|
export const GOOGLE_SHEET_SPECIFIC_SHEETS_SCOPE =
|
|
|
|
|
"https://www.googleapis.com/auth/drive.file";
|
2023-05-03 06:43:27 +00:00
|
|
|
export const GOOGLE_SHEET_FILE_PICKER_OVERLAY_CLASS = "overlay";
|
2023-05-22 08:44:06 +00:00
|
|
|
|
|
|
|
|
export const DatasourceCreateEntryPoints = {
|
|
|
|
|
PROPERTY_PANE_CONNECT_DATA: "PROPERTY_PANE_CONNECT_DATA",
|
|
|
|
|
GENERATE_CRUD: "GENERATE_CRUD",
|
|
|
|
|
ENTITY_EXPLORER_ADD_DS: "ENTITY_EXPLORER_DATASOURCE_PLUS_ICON",
|
|
|
|
|
ENTITY_EXPLORER_NEW_DATASOURCE: "ENTITY_EXPLORER_NEW_DATASOURCE",
|
|
|
|
|
ENTITY_EXPLORER_ADD_DS_CTA: "ENTITY_EXPLORER_ADD_DS_CTA",
|
|
|
|
|
ACTIVE_DATASOURCE: "ACTIVE_DATASOURCE",
|
2023-06-01 17:26:05 +00:00
|
|
|
CREATE_NEW_DATASOURCE: "CREATE_NEW_DATASOURCE",
|
2023-05-22 08:44:06 +00:00
|
|
|
QUERY_EDITOR: "QUERY_EDITOR",
|
|
|
|
|
ONBOARDING: "ONBOARDING",
|
|
|
|
|
NEW_APP_CHECKLIST: "NEW_APP_CHECKLIST",
|
|
|
|
|
CODE_EDITOR_SLASH_COMMAND: "CODE_EDITOR_SLASH_COMMAND",
|
|
|
|
|
OMNIBAR: "OMNIBAR",
|
|
|
|
|
SUBMENU: "SUBMENU",
|
2023-06-01 17:26:05 +00:00
|
|
|
ONE_CLICK_BINDING: "ONE_CLICK_BINDING",
|
2023-05-22 08:44:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const DatasourceEditEntryPoints = {
|
|
|
|
|
DATASOURCE_CARD_EDIT: "DATASOURCE_CARD_EDIT",
|
|
|
|
|
DATASOURCE_FORM_EDIT: "DATASOURCE_FORM_EDIT",
|
2023-07-12 06:42:16 +00:00
|
|
|
QUERY_EDITOR_DATASOURCE_SCHEMA: "QUERY_EDITOR_DATASOURCE_SCHEMA",
|
2023-05-22 08:44:06 +00:00
|
|
|
};
|
feat: query creation dumb templates replaced with smart templates (#24234)
## Description
This PR replaces dumb template that is shown on new query creation with
smart templates. With current implementation whenever we create a new DB
query, we see this template before writing the query, when we select any
of the template options, it shows us template query like `SELECT * FROM
users ORDER BY id LIMIT 10;` Since its a template query, users table may
not exist in user's actual database, thus leading them to error results.
<img width="1174" alt="Screenshot 2023-06-09 at 2 45 40 PM"
src="https://github.com/appsmithorg/appsmith/assets/30018882/4dede184-439f-4064-abe0-faf7b236748e">
With new implementation, we are removing this template page, instead if
we have the structure of the datasource available, we would simply get
the first table from the structure, and create select query using that.
This way we are populating query editor with user's actual table names
rather than dumb table name like `users`. Thus leading users to create
successful query
Note: This change is done only for sql plugins like MySQL, MSSQL,
PostgreSQL, Redshift, Oracle, Snowflake.
#### PR fixes following issue(s)
Fixes #23960
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
- New feature (non-breaking change which adds functionality)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] Jest
- [x] Cypress
>
>
#### Test Plan
> Create a Connection on the DB
> Create a Query from the established Query
> Ensure the 1st table data is placed when Add Query button is clicked
from the Review page
> If the query is created from Entity explorer ensure the right table
name is been added
#### Issues raised during DP testing
> Link issues raised during DP testing for better visibility and
tracking (copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [x] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [x] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [x] Cypress test cases have been added and approved by SDET/manual QA
- [x] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
---------
Co-authored-by: “sneha122” <“sneha@appsmith.com”>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-06-19 09:53:34 +00:00
|
|
|
|
|
|
|
|
export const DB_QUERY_DEFAULT_TABLE_NAME = "<<your_table_name>>";
|
|
|
|
|
export const DB_QUERY_DEFAULT_TEMPLATE_TYPE = "SELECT";
|