ToolJet/frontend/src/Editor/QueryManager/QueryManager.jsx

816 lines
33 KiB
React
Raw Normal View History

import React from 'react';
import { dataqueryService } from '@/_services';
2021-12-30 11:57:02 +00:00
import { toast } from 'react-hot-toast';
import ReactTooltip from 'react-tooltip';
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
import { allSources, source } from './QueryEditors';
import { Transformation } from './Transformation';
import { previewQuery, getSvgIcon } from '@/_helpers/appUtils';
import { EventManager } from '../Inspector/EventManager';
import { CodeHinter } from '../CodeBuilder/CodeHinter';
import { DataSourceTypes } from '../DataSourceManager/SourceComponents';
import RunjsIcon from '../Icons/runjs.svg';
import Preview from './Preview';
import DataSourceLister from './DataSourceLister';
import _, { isEmpty, isEqual } from 'lodash';
import { Button, ButtonGroup, Dropdown } from 'react-bootstrap';
// eslint-disable-next-line import/no-unresolved
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
import { withTranslation } from 'react-i18next';
import cx from 'classnames';
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
2021-04-30 06:31:32 +00:00
const queryNameRegex = new RegExp('^[A-Za-z0-9_-]*$');
const staticDataSources = [
{ kind: 'restapi', id: 'null', name: 'REST API' },
{ kind: 'runjs', id: 'runjs', name: 'Run JavaScript code' },
];
2021-04-04 17:07:03 +00:00
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
class QueryManagerComponent extends React.Component {
2021-04-30 06:31:32 +00:00
constructor(props) {
super(props);
this.state = {
options: {},
selectedQuery: null,
selectedDataSource: null,
dataSourceMeta: {},
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
dataQueries: [],
theme: {},
isSourceSelected: false,
isFieldsChanged: false,
paneHeightChanged: false,
showSaveConfirmation: false,
restArrayValuesChanged: false,
nextProps: null,
buttonText: '',
};
this.previewPanelRef = React.createRef();
this.queryManagerPreferences = JSON.parse(localStorage.getItem('queryManagerPreferences'));
if (localStorage.getItem('queryManagerButtonConfig') === null) {
this.buttonConfig = this.queryManagerPreferences?.buttonConfig ?? {};
} else {
this.buttonConfig = JSON.parse(localStorage.getItem('queryManagerButtonConfig'));
localStorage.setItem(
'queryManagerPreferences',
JSON.stringify({ ...this.queryManagerPreferences, buttonConfig: this.buttonConfig })
);
localStorage.removeItem('queryManagerButtonConfig');
}
2021-04-30 06:31:32 +00:00
}
setStateFromProps = (props) => {
const selectedQuery = props.selectedQuery;
const dataSourceId = selectedQuery?.data_source_id;
const source = props.dataSources.find((datasource) => datasource.id === dataSourceId);
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
let dataSourceMeta;
if (selectedQuery?.pluginId) {
dataSourceMeta = selectedQuery.manifestFile.data.source;
} else {
dataSourceMeta = DataSourceTypes.find((source) => source.kind === selectedQuery?.kind);
}
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
const paneHeightChanged = this.state.queryPaneHeight !== props.queryPaneHeight;
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
const dataQueries = props.dataQueries?.length ? props.dataQueries : this.state.dataQueries;
const queryPaneDragged = this.state.isQueryPaneDragging !== props.isQueryPaneDragging;
2021-04-30 06:31:32 +00:00
this.setState(
{
appId: props.appId,
dataSources: props.dataSources,
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
dataQueries: dataQueries,
appDefinition: props.appDefinition,
2021-04-30 06:31:32 +00:00
mode: props.mode,
currentTab: 1,
addingQuery: props.addingQuery,
editingQuery: props.editingQuery,
queryPanelHeight: props.queryPanelHeight,
isQueryPaneDragging: props.isQueryPaneDragging,
2021-05-22 11:29:27 +00:00
currentState: props.currentState,
selectedSource: source,
options: props.options ?? {},
dataSourceMeta,
paneHeightChanged,
isSourceSelected: paneHeightChanged || queryPaneDragged ? this.state.isSourceSelected : props.isSourceSelected,
selectedDataSource:
paneHeightChanged || queryPaneDragged ? this.state.selectedDataSource : props.selectedDataSource,
queryPreviewData: this.state.selectedQuery?.id !== props.selectedQuery?.id ? undefined : props.queryPreviewData,
selectedQuery: props.mode === 'create' && selectedQuery,
theme: {
scheme: 'bright',
author: 'chris kempson (http://chriskempson.com)',
base00: props.darkMode ? '#272822' : '#000000',
base01: '#303030',
base02: '#505050',
base03: '#b0b0b0',
base04: '#d0d0d0',
base05: '#e0e0e0',
base06: '#f5f5f5',
base07: '#ffffff',
base08: '#fb0120',
base09: '#fc6d24',
base0A: '#fda331',
base0B: '#a1c659',
base0C: '#76c7b7',
base0D: '#6fb3d2',
base0E: '#d381c3',
base0F: '#be643c',
},
buttonText:
props.mode === 'edit'
? this.buttonConfig?.editMode?.text ?? 'Save & Run'
: this.buttonConfig?.createMode?.text ?? 'Create & Run',
shouldRunQuery:
props.mode === 'edit'
? this.buttonConfig?.editMode?.shouldRunQuery ?? true
: this.buttonConfig?.createMode?.shouldRunQuery ?? true,
2021-04-30 06:31:32 +00:00
},
() => {
if (this.props.mode === 'edit') {
let source = props.dataSources.find((datasource) => datasource.id === selectedQuery.data_source_id);
if (selectedQuery.kind === 'restapi') {
if (!selectedQuery.data_source_id) {
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
source = { kind: 'restapi', id: 'null', name: 'REST API' };
}
}
if (selectedQuery.kind === 'runjs') {
if (!selectedQuery.data_source_id) {
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
source = { kind: 'runjs', id: 'runjs', name: 'Run JavaScript code' };
}
}
2021-04-30 06:31:32 +00:00
this.setState({
options:
paneHeightChanged || this.state.selectedQuery?.id === selectedQuery?.id
? this.state.options
: selectedQuery.options,
2021-04-30 06:31:32 +00:00
selectedDataSource: source,
selectedQuery,
queryName: selectedQuery.name,
2021-04-30 06:31:32 +00:00
});
}
2021-04-30 06:31:32 +00:00
}
);
};
componentWillReceiveProps(nextProps) {
if (nextProps.loadingDataSources) return;
2022-05-31 16:22:21 +00:00
// const themeModeChanged = this.props.darkMode !== nextProps.darkMode;
// if (!nextProps.isQueryPaneDragging && !this.state.paneHeightChanged && !themeModeChanged) {
// if (this.props.mode === 'create' && this.state.isFieldsChanged) {
// this.setState({ showSaveConfirmation: true, nextProps });
// return;
// } else if (this.props.mode === 'edit') {
// if (this.state.selectedQuery) {
// const isQueryChanged = !_.isEqual(
// this.removeRestKey(this.state.options),
// this.removeRestKey(this.state.selectedQuery.options)
// );
// if (this.state.isFieldsChanged && isQueryChanged) {
// this.setState({ showSaveConfirmation: true, nextProps });
// return;
// } else if (
// !isQueryChanged &&
// this.state.selectedQuery.kind === 'restapi' &&
// this.state.restArrayValuesChanged
// ) {
// this.setState({ showSaveConfirmation: true, nextProps });
// return;
// }
// }
// }
// }
if (this.props.showQueryConfirmation && !nextProps.showQueryConfirmation) {
if (this.state.isUpdating) {
this.setState({
isUpdating: false,
});
}
if (this.state.isCreating) {
this.setState({
isCreating: false,
});
}
}
if (!isEmpty(this.state.updatedQuery)) {
const query = nextProps.dataQueries.find((q) => q.id === this.state.updatedQuery.id);
if (query) {
const isLoading = nextProps.currentState?.queries[query.name]
? nextProps.currentState?.queries[query.name]?.isLoading
: false;
const prevLoading = this.state.currentState?.queries[query.name]
? this.state.currentState?.queries[query.name]?.isLoading
: false;
if (!isEmpty(nextProps.selectedQuery) && !isEqual(this.state.selectedQuery, nextProps.selectedQuery)) {
if (query && !isLoading && !prevLoading) {
this.props.runQuery(query.id, query.name);
}
} else if (!isLoading && prevLoading) {
this.state.updatedQuery.updateQuery
? this.setState({ updatedQuery: {}, isUpdating: false })
: this.setState({ updatedQuery: {}, isCreating: false });
}
}
}
2021-04-30 06:31:32 +00:00
this.setStateFromProps(nextProps);
}
removeRestKey = (options) => {
options?.arrayValuesChanged && delete options.arrayValuesChanged;
return options;
};
handleBackButton = () => {
this.setState({
isSourceSelected: true,
options: {},
queryPreviewData: undefined,
});
};
2021-04-30 06:31:32 +00:00
changeDataSource = (sourceId) => {
const source = [...this.state.dataSources, ...staticDataSources].find((datasource) => datasource.id === sourceId);
const isSchemaUnavailable = ['restapi', 'stripe', 'runjs'].includes(source.kind);
const schemaUnavailableOptions = {
restapi: {
method: 'get',
url: null,
url_params: [],
headers: [],
body: [],
},
stripe: {},
runjs: {},
};
2021-04-30 06:31:32 +00:00
this.setState({
selectedDataSource: source,
selectedSource: source,
queryName: this.computeQueryName(source.kind),
...(isSchemaUnavailable && {
options: schemaUnavailableOptions[source.kind],
}),
2021-04-30 06:31:32 +00:00
});
};
switchCurrentTab = (tab) => {
this.setState({
currentTab: tab,
2021-04-30 06:31:32 +00:00
});
};
validateQueryName = () => {
const { queryName, mode, selectedQuery } = this.state;
const { dataQueries } = this.props;
2021-04-30 06:31:32 +00:00
if (mode === 'create') {
return dataQueries.find((query) => query.name === queryName) === undefined && queryNameRegex.test(queryName);
}
const existingQuery = dataQueries.find((query) => query.name === queryName);
if (existingQuery) {
return existingQuery.id === selectedQuery.id && queryNameRegex.test(queryName);
}
return queryNameRegex.test(queryName);
2021-04-30 06:31:32 +00:00
};
computeQueryName = (kind) => {
const { dataQueries } = this.props;
2021-04-30 06:31:32 +00:00
const currentQueriesForKind = dataQueries.filter((query) => query.kind === kind);
let found = false;
let newName = '';
2021-04-30 06:31:32 +00:00
let currentNumber = currentQueriesForKind.length + 1;
while (!found) {
newName = `${kind}${currentNumber}`;
if (dataQueries.find((query) => query.name === newName) === undefined) {
2021-04-30 06:31:32 +00:00
found = true;
}
currentNumber += 1;
2021-04-04 06:26:23 +00:00
}
return newName;
2021-04-30 06:31:32 +00:00
};
createOrUpdateDataQuery = () => {
const { appId, options, selectedDataSource, mode, queryName, shouldRunQuery } = this.state;
const appVersionId = this.props.editingVersionId;
2021-04-30 06:31:32 +00:00
const kind = selectedDataSource.kind;
2021-07-24 06:13:21 +00:00
const dataSourceId = selectedDataSource.id === 'null' ? null : selectedDataSource.id;
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
const pluginId = selectedDataSource.plugin_id;
2021-04-30 06:31:32 +00:00
const isQueryNameValid = this.validateQueryName();
if (!isQueryNameValid) {
toast.error('Invalid query name. Should be unique and only include letters, numbers and underscore.');
2021-04-30 06:31:32 +00:00
return;
}
2021-04-30 06:31:32 +00:00
if (mode === 'edit') {
this.setState({ isUpdating: true });
dataqueryService
.update(this.state.selectedQuery.id, queryName, options)
.then((data) => {
this.setState({
isUpdating: shouldRunQuery ? true : false,
isFieldsChanged: false,
restArrayValuesChanged: false,
updatedQuery: shouldRunQuery ? { ...data, updateQuery: true } : {},
});
this.props.dataQueriesChanged();
this.props.setStateOfUnsavedQueries(false);
localStorage.removeItem('transformation');
})
.catch(({ error }) => {
this.setState({ isUpdating: false, isFieldsChanged: false, restArrayValuesChanged: false });
this.props.setStateOfUnsavedQueries(false);
toast.error(error);
});
2021-04-30 06:31:32 +00:00
} else {
this.setState({ isCreating: true });
dataqueryService
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
.create(appId, appVersionId, queryName, kind, options, dataSourceId, pluginId)
.then((data) => {
toast.success('Query Added');
this.setState({
isCreating: shouldRunQuery ? true : false,
isFieldsChanged: false,
restArrayValuesChanged: false,
updatedQuery: shouldRunQuery ? { ...data, updateQuery: false } : {},
});
this.props.dataQueriesChanged();
this.props.setStateOfUnsavedQueries(false);
})
.catch(({ error }) => {
this.setState({ isCreating: false, isFieldsChanged: false, restArrayValuesChanged: false });
this.props.setStateOfUnsavedQueries(false);
toast.error(error);
});
}
2021-04-30 06:31:32 +00:00
};
validateNewOptions = (newOptions) => {
const headersChanged = newOptions.arrayValuesChanged ?? false;
let isFieldsChanged = false;
if (this.state.selectedQuery) {
const isQueryChanged = !_.isEqual(
this.removeRestKey(newOptions),
this.removeRestKey(this.state.selectedQuery.options)
);
if (isQueryChanged) {
isFieldsChanged = true;
} else if (this.state.selectedQuery.kind === 'restapi' && headersChanged) {
isFieldsChanged = true;
}
} else if (this.props.mode === 'create') {
isFieldsChanged = true;
}
if (isFieldsChanged) this.props.setStateOfUnsavedQueries(true);
this.setState({
options: { ...this.state.options, ...newOptions },
isFieldsChanged,
restArrayValuesChanged: headersChanged,
});
};
2021-04-30 06:31:32 +00:00
optionchanged = (option, value) => {
const newOptions = { ...this.state.options, [option]: value };
this.validateNewOptions(newOptions);
2021-04-30 06:31:32 +00:00
};
optionsChanged = (newOptions) => {
this.validateNewOptions(newOptions);
2021-04-30 06:31:32 +00:00
};
toggleOption = (option) => {
const currentValue = this.state.options[option] ? this.state.options[option] : false;
this.optionchanged(option, !currentValue);
};
// Here we have mocked data query in format of a component to be usable by event manager
// TODO: Refactor EventManager to be generic
mockDataQueryAsComponent = () => {
const dataQueryEvents = this.state.options?.events || [];
return {
component: { component: { definition: { events: dataQueryEvents } } },
componentMeta: {
events: {
onDataQuerySuccess: { displayName: 'Query Success' },
onDataQueryFailure: { displayName: 'Query Failure' },
},
},
};
};
eventsChanged = (events) => {
this.optionchanged('events', events);
};
updateButtonText = (text, shouldRunQuery) => {
if (this.state.mode === 'edit') {
this.buttonConfig = { ...this.buttonConfig, editMode: { text: text, shouldRunQuery: shouldRunQuery } };
localStorage.setItem(
'queryManagerPreferences',
JSON.stringify({ ...this.queryManagerPreferences, buttonConfig: this.buttonConfig })
);
} else {
this.buttonConfig = { ...this.buttonConfig, createMode: { text: text, shouldRunQuery: shouldRunQuery } };
localStorage.setItem(
'queryManagerPreferences',
JSON.stringify({ ...this.queryManagerPreferences, buttonConfig: this.buttonConfig })
);
}
this.setState({ buttonText: text, shouldRunQuery: shouldRunQuery });
};
2021-04-30 06:31:32 +00:00
render() {
const {
dataSources,
selectedDataSource,
mode,
2021-05-22 11:50:55 +00:00
options,
2021-04-30 06:31:32 +00:00
currentTab,
isUpdating,
isCreating,
addingQuery,
editingQuery,
selectedQuery,
currentState,
2021-05-22 11:29:27 +00:00
queryName,
previewLoading,
queryPreviewData,
dataSourceMeta,
2021-04-30 06:31:32 +00:00
} = this.state;
let ElementToRender = '';
if (selectedDataSource) {
const sourcecomponentName = selectedDataSource.kind.charAt(0).toUpperCase() + selectedDataSource.kind.slice(1);
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
ElementToRender = allSources[sourcecomponentName] || source;
2021-04-04 17:07:03 +00:00
}
let dropDownButtonText = mode === 'edit' ? 'Save' : 'Create';
2021-04-30 06:31:32 +00:00
const buttonDisabled = isUpdating || isCreating;
const mockDataQueryComponent = this.mockDataQueryAsComponent();
const iconFile = this?.state?.selectedDataSource?.plugin?.icon_file?.data ?? undefined;
const Icon = () => getSvgIcon(this?.state?.selectedDataSource?.kind, 18, 18, iconFile, { marginLeft: 7 });
2021-04-30 06:31:32 +00:00
return (
<div
className={cx('query-manager', { 'd-none': this.props.loadingDataSources })}
key={selectedQuery ? selectedQuery.id : ''}
>
2021-04-30 06:31:32 +00:00
<ReactTooltip type="dark" effect="solid" delayShow={250} />
2022-05-31 16:22:21 +00:00
{/* <Confirm
show={this.state.showSaveConfirmation}
message={'Query is unsaved, save or leave without saving. Do you want to save?'}
onConfirm={() => this.createOrUpdateDataQuery()}
onCancel={() => {
this.setState({ showSaveConfirmation: false, isFieldsChanged: false });
this.setStateFromProps(this.state.nextProps);
this.props.setStateOfUnsavedQueries(false);
}}
queryConfirmationData={this.state.queryConfirmationData}
2022-05-31 16:22:21 +00:00
/> */}
2021-04-30 06:31:32 +00:00
<div className="row header">
<div className="col">
{(addingQuery || editingQuery) && selectedDataSource && (
2021-04-30 06:31:32 +00:00
<div className="nav-header">
<ul className="nav nav-tabs query-manager-header" data-bs-toggle="tabs">
2021-04-30 06:31:32 +00:00
<li className="nav-item">
<a
onClick={() => this.switchCurrentTab(1)}
className={currentTab === 1 ? 'nav-link active' : 'nav-link'}
data-cy={'query-tab-general'}
2021-04-30 06:31:32 +00:00
>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
&nbsp; {this.props.t('editor.queryManager.general', 'General')}
2021-04-30 06:31:32 +00:00
</a>
</li>
<li className="nav-item">
<a
onClick={() => this.switchCurrentTab(2)}
className={currentTab === 2 ? 'nav-link active' : 'nav-link'}
data-cy={'query-tab-advanced'}
2021-04-30 06:31:32 +00:00
>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
&nbsp; {this.props.t('editor.queryManager.advanced', 'Advanced')}
2021-04-30 06:31:32 +00:00
</a>
</li>
</ul>
</div>
)}
</div>
{(addingQuery || editingQuery) && selectedDataSource && (
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
<div className="col-2 query-name-field">
<input
type="text"
onChange={(e) => this.setState({ queryName: e.target.value })}
className="form-control-plaintext form-control-plaintext-sm mt-1"
value={queryName}
autoFocus={false}
data-cy={'query-label-input-field'}
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
/>
2021-04-30 06:31:32 +00:00
</div>
)}
<div className="col-auto px-1 m-auto">
{selectedDataSource && (addingQuery || editingQuery) && (
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
<button
onClick={() => {
const _options = { ...options };
const query = {
data_source_id: selectedDataSource.id === 'null' ? null : selectedDataSource.id,
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
pluginId: selectedDataSource.plugin_id,
options: _options,
kind: selectedDataSource.kind,
};
previewQuery(this, query, this.props.editorState)
.then(() => {
this.previewPanelRef.current.scrollIntoView();
})
.catch(({ error, data }) => {
console.log(error, data);
});
}}
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
className={`btn button-family-secondary m-1 float-right1 ${previewLoading ? 'button-loading' : ''} ${
this.props.darkMode ? 'dark' : ''
} ${this.state.selectedDataSource ? '' : 'disabled'}`}
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
style={{ width: '72px', height: '28px' }}
data-cy={'query-preview-button'}
2021-05-22 11:29:27 +00:00
>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t('editor.queryManager.preview', 'Preview')}
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
</button>
2021-05-22 11:29:27 +00:00
)}
{selectedDataSource && (addingQuery || editingQuery) && (
<Dropdown as={ButtonGroup} className={'m-1 float-right'} style={{ display: 'initial', height: '28px' }}>
<Button
className={`btn btn-primary ${isUpdating || isCreating ? 'btn-loading' : ''} ${
this.state.selectedDataSource ? '' : 'disabled'
}`}
style={{ height: '28px', zIndex: 10 }}
onClick={this.createOrUpdateDataQuery}
disabled={buttonDisabled}
data-cy={'query-create-and-run-button'}
>
{this.state.buttonText}
</Button>
<Dropdown.Toggle
split
className="btn btn-primary d-none d-lg-inline create-save-button-dropdown-toggle"
style={{ height: '28px', paddingTop: '5px' }}
data-cy={'query-create-dropdown'}
/>
<Dropdown.Menu className="import-lg-position">
<Dropdown.Item
onClick={() => {
this.updateButtonText(dropDownButtonText, false);
}}
data-cy={`query-${String(dropDownButtonText).toLocaleLowerCase()}-option`}
>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t(`editor.queryManager.${dropDownButtonText}`, dropDownButtonText)}
</Dropdown.Item>
<Dropdown.Item
onClick={() => {
this.updateButtonText(`${dropDownButtonText} & Run`, true);
}}
data-cy={`query-${String(dropDownButtonText).toLocaleLowerCase()}-and-run-option`}
>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t(`editor.queryManager.${dropDownButtonText} & Run`, `${dropDownButtonText} & Run`)}
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
2021-04-30 06:31:32 +00:00
)}
<span onClick={this.props.toggleQueryEditor} className="cursor-pointer m-3" data-tip="Hide query editor">
<svg width="18" height="10" viewBox="0 0 18 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 1L9 9L17 1" stroke="#61656F" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</span>
2021-04-30 06:31:32 +00:00
</div>
</div>
{(addingQuery || editingQuery) && (
<div className="py-2">
2021-04-30 06:31:32 +00:00
{currentTab === 1 && (
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
<div className="row row-deck px-2 mt-0 query-details">
2021-04-30 06:31:32 +00:00
{dataSources && mode === 'create' && (
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
<div className="datasource-picker mt-1 mb-2">
<div className="datasource-heading ">
{this.state.selectedDataSource !== null && (
<p
onClick={() => {
this.setState({
isSourceSelected: false,
selectedDataSource: null,
options: {},
});
}}
style={{ marginTop: '-7px' }}
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="icon icon-tabler icon-tabler-arrow-left"
width="44"
height="44"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="#9e9e9e"
fill="none"
strokeLinecap="round"
strokeLinejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="5" y1="12" x2="19" y2="12" />
<line x1="5" y1="12" x2="11" y2="18" />
<line x1="5" y1="12" x2="11" y2="6" />
</svg>
</p>
)}
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{!this.state.isSourceSelected && (
<label className="form-label col-md-3" data-cy={'label-select-datasource'}>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t('editor.queryManager.selectDatasource', 'Select Datasource')}
</label>
)}{' '}
{this?.state?.selectedDataSource?.kind && (
<div className="header-query-datasource-card-container">
<div
className="header-query-datasource-card badge "
style={{
background: this.props.darkMode ? '#2f3c4c' : 'white',
color: this.props.darkMode ? 'white' : '#3e525b',
}}
>
{this.state?.selectedDataSource?.kind === 'runjs' ? (
<RunjsIcon style={{ height: 18, width: 18, marginTop: '-3px' }} />
) : (
<Icon />
)}
<p
className="header-query-datasource-name"
data-cy={`${this.state.selectedDataSource.kind}`}
>
{' '}
{this.state?.selectedDataSource?.kind && this.state.selectedDataSource.kind}
</p>
</div>{' '}
</div>
)}
</div>
{!this.state.isSourceSelected && (
<DataSourceLister
dataSources={dataSources}
staticDataSources={staticDataSources}
changeDataSource={this.changeDataSource}
handleBackButton={this.handleBackButton}
darkMode={this.props.darkMode}
dataSourceModalHandler={this.props.dataSourceModalHandler}
/>
)}
2021-04-30 06:31:32 +00:00
</div>
)}
{selectedDataSource && (
<div>
<ElementToRender
[Feature] Make plugins installable (#3069) * feat: add user avatar * update: @nest/platform-express from 8.0.0 to 8.4.4 * add avatar_id in login response * add user avatar upload in frontend * align cross divider with layout icons' * generate nest model - extensions * Add extensions module * Add extension to datasouce * add not implemented check * create extension * refactor * cleanup * fix tests * reduce the avatar size on homepage * poc: run js code from string * resolve conflicts * fix conflicts * add globals * add new route * add icon, manifest file upload * complete user flow * add flow for data queries * add dynamic manifest instead of local datasource types * add version attr * remove unused code * add version * rename extension(s) -> plugins(s) * add test connection method * feat: add marketplace listing page * Add install plugin cmd + missing attrs {name, repo, desc} to plugin * add missing icon * - Add npm workspaces for marketplace monorepo - Added cassandra datasource plugin - Created upload to s3 script - Created plugins.json entry file * install plugin from s3 bucket * cleanup * update pkg locks * fix icon render * cleanup * marketplace changes * ui changes * operations file load fix + revert vm2 * update module from string to 3.2.1 * load plugins.json from local file instead of remote * install plugin from local file if not production environment * add sqlite * feat: add plivo api plugin * exp: add heroku 22 stack * update assets include path * Revert "exp: add heroku 22 stack" This reverts commit a8926b36e116fb76cd3b6d0aa41778779c9273c8. * add integrations link * Add casl ability for plugin * load host from env else fallback to default * update imports * remove sqlite * typo * add marketplace flag to cli command * move ts and ncc to devDep * add hygen templates for marketplace * cli tree-node path fix * template indent fix * TOOLJET_URL -> MARKETPLACE_TOOLJET_URL * add tests * refactor: move to plugins.helper for get-service helper utility * fix; typo * update package-lock.json * review changes * remove a href * remove bg color + redirect issue due to href * add test url * fix crash on search * remove extra slash * feat: allow plugin to be installed from github repository * remove unwanted args from cli command * add repo attr while save * feat: add feature toggle for marketplace feature * fix: make default config as false * chore: remove hyperlink * fix: failing build * chore: update s3 url to point to prod * fix failing test * fix test * fix: test case * update module from string pkg * update env * fix test * fix test * add readme file * Update README.md Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-10-27 11:29:43 +00:00
pluginSchema={this.state.selectedDataSource?.plugin?.operations_file?.data}
selectedDataSource={selectedDataSource}
options={this.state.options}
optionsChanged={this.optionsChanged}
optionchanged={this.optionchanged}
currentState={currentState}
darkMode={this.props.darkMode}
isEditMode={this.props.mode === 'edit'}
queryName={this.state.queryName}
/>
{!dataSourceMeta?.disableTransformations && selectedDataSource?.kind != 'runjs' && (
<div>
[improvement] Query panel redesign (#1947) * query panel headers styles * create query button style update * create query button style update * create query button style update: mixins * querypanel header nav-links updated * querypanel header buttons * restapi: url hinter styles * fixes querypane header width, undo prev styles applied * querypanel header icons margin fix * restapi: header tab * restapi: params tab * restapi: body tab * base url style fixed * added alert component to @/_ui * adds margin top to query-panel tabs * bumped font weight of preview * on hover query style updated * selected query style update and along with dark themed * adds new searchbox component, added search queries * fixes query panel query lists icons margin * query selected hover bg * back icon should not be render if callback is a function * airtable: queries redesigned * stripe: queries redesigned * fixed query-pane header responsiveness * fixes tab title typo * undp/redo select datasource only when mode='create' * removes comments * refactor restapi url codehinter styles * fixes white spaces in query pane and query pane header * minor updates for restapi query options styles * removes tool-tip for lens svg icon for search: query-pane header * adds button loading spinner with primary color * fixes hover bg color for queries * update: query hover bg color to lighter tint * update query list icons: trash and play svgs * adds icons to the selection component * fixes tabs alignments restapi * fixes codehonter text margin: restapi url * fixes advanced-options-container margintop * new UI query: dynamodb * new UI query: elasticsearch * new UI query: firestore * new UI query: mongodb * new UI query: mysql * new UI query: psql * new UI query: typesenseapi * new UI query: gsheet * new UI query: sendgrid * new UI query: twillio * new UI query: gcs * new UI query: minio * new UI query: aws * update query bg color and hover bg color * fixes run query icon for dark theme * fixes input query title text alignment * update query header title * adds search queries placeholder and add icon when search box is displayed * updated No results query text * undo/redo rest-api tabs: fixes whote spaces * undo/redo: rest-api tabs conde hinter placeholder paddinleft * adding new queries when search box component is mounted:fix * fixes creating a new query after filtering queries * fixes dark theme for select search components * reverts query pane header search box with add icon * fixes input left margin * fixes bottom padding rest api tabs * fixes toggle button:not selected in dark theme * fixes typos * fixes preview button spinner size * undo/redo: query-trash-icon.svg for queries and trash.svg for components * query icons badge bg update[options] * icon badge fix * move static styles to theme.scss * restapi: url field height increment * fixes query name when adding a new query with filtered querylist * fixes alignment issues of the query header icon * revert back to 32px code hinter height * adds apdding to code mirror line * updates to react-select * remove component unmounts and mounts side effect
2022-02-02 16:59:57 +00:00
<div className="mb-3 mt-4">
<Transformation
changeOption={this.optionchanged}
options={options ?? {}}
currentState={currentState}
darkMode={this.props.darkMode}
queryId={selectedQuery?.id}
/>
</div>
</div>
)}
<Preview
previewPanelRef={this.previewPanelRef}
previewLoading={previewLoading}
queryPreviewData={queryPreviewData}
theme={this.state.theme}
darkMode={this.props.darkMode}
/>
2021-04-30 06:31:32 +00:00
</div>
)}
</div>
)}
{currentTab === 2 && (
<div className="advanced-options-container m-2">
<div className="form-check form-switch">
2021-04-30 06:31:32 +00:00
<input
className="form-check-input"
type="checkbox"
onClick={() => this.toggleOption('runOnPageLoad')}
checked={this.state.options.runOnPageLoad}
data-cy={'toggle-run-query-on-page-load'}
2021-04-30 06:31:32 +00:00
/>
<span className="form-check-label" data-cy={'label-run-query-on-page-load'}>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t('editor.queryManager.runQueryOnPageLoad', 'Run this query on page load?')}
</span>
</div>
<div className="form-check form-switch">
2021-04-30 06:31:32 +00:00
<input
className="form-check-input"
type="checkbox"
onClick={() => this.toggleOption('requestConfirmation')}
checked={this.state.options.requestConfirmation}
data-cy={'toggle-request-confirmation-on-run'}
2021-04-30 06:31:32 +00:00
/>
<span className="form-check-label" data-cy={'label-request-confirmation-on-run'}>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t(
'editor.queryManager.confirmBeforeQueryRun',
'Request confirmation before running query?'
)}
</span>
</div>
2021-04-30 06:31:32 +00:00
<div className="form-check form-switch">
2021-04-30 06:31:32 +00:00
<input
className="form-check-input"
type="checkbox"
onClick={() => this.toggleOption('showSuccessNotification')}
checked={this.state.options.showSuccessNotification}
data-cy={'toggle-show-notification'}
2021-04-30 06:31:32 +00:00
/>
<span className="form-check-label" data-cy={'label-show-notification'}>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t('editor.queryManager.notificationOnSuccess', 'Show notification on success?')}
</span>
</div>
{this.state.options.showSuccessNotification && (
<div>
<div className="row mt-3">
<div className="col-auto">
<label className="form-label p-2" data-cy={'label-success-message-input'}>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t('editor.queryManager.successMessage', 'Success Message')}
</label>
</div>
<div className="col">
<CodeHinter
currentState={this.props.currentState}
initialValue={this.state.options.successMessage}
height="36px"
theme={this.props.darkMode ? 'monokai' : 'default'}
onChange={(value) => this.optionchanged('successMessage', value)}
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
placeholder={this.props.t(
'editor.queryManager.queryRanSuccessfully',
'Query ran successfully'
)}
cyLabel={'success-message'}
/>
</div>
</div>
2021-04-30 06:31:32 +00:00
<div className="row mt-3">
<div className="col-auto">
<label className="form-label p-2" data-cy={'label-notification-duration-input'}>
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
{this.props.t('editor.queryManager.notificationDuration', 'Notification duration (s)')}
</label>
</div>
<div className="col">
<input
type="number"
disabled={!this.state.options.showSuccessNotification}
onChange={(e) => this.optionchanged('notificationDuration', e.target.value)}
placeholder={5}
className="form-control"
value={this.state.options.notificationDuration}
data-cy={'notification-duration-input-field'}
/>
</div>
</div>
2021-04-30 06:31:32 +00:00
</div>
)}
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
<div className="hr-text hr-text-left">{this.props.t('editor.queryManager.events', 'Events')}</div>
<div className="query-manager-events">
<EventManager
eventsChanged={this.eventsChanged}
component={mockDataQueryComponent.component}
componentMeta={mockDataQueryComponent.componentMeta}
currentState={this.props.currentState}
dataQueries={this.props.dataQueries}
components={this.props.allComponents}
apps={this.props.apps}
popoverPlacement="top"
/>
</div>
2021-04-30 06:31:32 +00:00
</div>
)}
</div>
)}
</div>
);
}
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
}
[Feature]: Added Localisation (#3746) * Added localisation * Closed modal after language selection * updated transaltaion setup * Updated language tooltip * Added fallback language support * Adding english library resource for translation (#3844) * Adding English dictionary for the widget lists in the inspector * added leftSideBar object in en.json and implemented it for leftSidebar icon text * renamed leftSideBar to leftSidebar and added resources for tip in the left side bar * added english translation resources for leftsidebar debugger * added english language resources for the global settings * added english language resources for data sources in left sidebar * added english language resources for the share button and share modal in the editor * added english language resources for release button, manageOrgUsers, appVersionManager * added english language resources for Queries and Please select a widget to inspect in the editor * added english language resources for data source list , data source manager, and query manager(partially) * added english language resources for queryManager, transformation, preview * added english language resources for dark mode toggle in the headers inside homepage * added fallback message for dark mode toggle * added resources for language change in the headers inside homepage * added resources for notification center in the header inside homepage * added resources for organization and manage users components in header inside homepage * added resources in manageGroupPermission * added resources for manageGroupPermissionsResources component * added resources for manageSSO and generalSettings components * added resources for google sso * added resources for github sso * added resources for environment variables in manageSSO * added resources for profile and setting page * added resources for app card and app card menu * added resources for folder section and app list in homepage * added resources for header section in the homepage * added resources for pagination in homepage * added resources for modals in the homepage * added resources for blank page * added resources for login page * added resources for forgot password page * added resources for sign up page * added resources for onBoarding component * added resources for reset password page * deleted duplicate key for readDocumentation * deleted duplicate key for cancel in en.json and added translation for cancel at few places * removing duplicate copy of save key in en.json * added translation for CommentActions.jsx components * deleted duplicate copy of search key in en.json and added resources for create and search queries , select keys * fix typo errors * fixed typo errors * shorten the key for loginAndSignUpAndForgotPassword to loginSignupPage in en.json file and related files * shorten the key noLoginMethodsEnabledForThisWorkspace to noLoginMethodsEnabled * shorten the key pleaseCheckYourEmailForConfirmationLink to emailConfirmLink * shorten the key dontHaveAccountYet to dontHaveAccount * shorten keys from loginSignupPage key in en.json * shorten keys of shareModal nested object in en.json * shorten the key in appVersionManager nested object * shorten the keys for queryManager nested object in the en.json * delete duplicate copy of environmentVar and shorten manageEnvironmentVariables,environmentVariables * shorten keys in the organization nested object * shorten keys in the homePage nested object in en.json file * added inspector and eventManager empty object * added resources to RedirectSSO component * added resources for OAuth2 * added resources for TemplateCard.jsx * added resources for TemplateLibraryModal.jsx * added resources for ConfirmationPage.jsx * added resources for ConfirmationPage component * removed translation in App.jsx file * added resources for Slack.jsx * added resources for GoogleSheets.jsx * added resources for CodeBuilder.jsx * added resources for CommentBody and CommentFooter * added resources for TestConnection component * added resources for AllignButton.jsx * added resources for Openapi and Stripe components * added resources for ErrorBoundary * added resources for Viewer.jsx * Translation for widgets, table Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com> * Commented Language selection * Fixed typos * Updated fr.json file Co-authored-by: Manish Kushare <kushare.manish9@gmail.com>
2022-09-14 08:04:49 +00:00
export const QueryManager = withTranslation()(React.memo(QueryManagerComponent));