ToolJet/frontend/assets/images/icons/org-constants.svg
Arpit ee79b2015a
Feature - Workspace environment constants (#6810)
* init--

* org constants: controllers, services, module and api for creating new constants

* read operation: all constants from all envs and all constants from a env

* update and delete operation

* updated delete msg

* encrypt constant value before saving and decrypt before sending back to controller

* adds group permission for org constants and required migrations

* adds ability to create constant

* adds group permissions and fixes migrations

* adds workspace constant permission to workspace settings UI

* ToolJetUI - componenst, ref: ee/5c92dc9c03b73d7006562d71d639fe4eb1971dee

* Org constants UI

* UI updates: display constant value as per enviroment

* Added client side pagination

* groups without create/edit/delete permission can only view the the constants

* group permission: Create and Edit - UI updates

* create/update/date flow - UI

* extending api support to create constant in multiple environments

* UI - add constant for multiple envs

* disable name input for update operation

* UI fixes and updates

* adds deprecating banner to variables dashboard

* removes update/create from UI --variables

* adding depricating soon alert in codehinter when workspace vars are used

* extra check to display the banner in preview of cdehinter

* resolves constants for admin in client-side

* resolves constants client-side and server side for queries

* include grp permission for create/delete for org constants

* resolves org constants in runJS and runPY

* cleanup

* updated the tab UI

* fixed: constant pagination footer

* fixes client side pagination bug

* adds docs link

* ui updates and fixes ui flickering on closing the drawer

* refactor updating table data

* adds error state to constant forms

* remove the alert from runJS and runPY after 5s

* added max length constraint for constant value

* refactor: component form

* delete only constant as per environment

* remove unwanted logs

* resolves constants in gds connection forms

* resolve gds source options for testConnections, preview and runQuery

* UI style fixes: banner

* remove alert banner for runJS and runPY

* input text color fixed

* style fixes for disabled inputs

* Edit constant- Until value is changed- CTA should be disabled

* adds tooltip for table name and value

* adds tooltip for disbaled input in edit drawer

* updated the tooltip position

* handle input height on type for large strings

* added empty state

* adds new badge for workspace constants

* substring should be different for viewers

* resolve constants in viewer

* add support to resolve constants for widgets and queires in public apps

* changed the api endpoint for org constant for env

* bugfix: handle org constants for encrypted value from source options

* add support to resolve app variables and constants in a single single

* fixes: multiple multiline and same line variables

* refactor

* cleanup

* remove encryption for ce

* remove group permission from permission dashboard

* text transform for badge

* added padding for each table row

* updated alert banner padding

* updated alert banner padding

* updates width for empty banner

* refactor

* adds tests for constant api

* added validations for constant name

* updates textare dynamic form

* updates the resolvers for constants

* removes decryptiong for source options in services

* refactor - frontend

* resolved conflicts

* fixes: typo-1 ~ workspace variables alert

* fixes: inconsistency in alert info icon

* fixes: naming convention consistency

* fixes: dark theme for confirm box

* disable create button for  add constant with same name,

* adds error state for updating constant with same value

* fixes: error message typo

* fixes: error message typo

* fixes position of tooltip

* fixes frontend lint issues

* update lock file

* UI updates and typos

* cleanup-refactor

* checking error state before creating

* should check all error states

* resolving multiple constants and app variables in a single line

* reafactore

* fixed: depricating icon : codehinter preview box

* remove log

* remove repeated logic for deleteOrgEnvironmentConstant

* only return status code for delete request for org constants

* Add data-cy for workspace constants elements (#7251)

* updates contants doc link

---------

Co-authored-by: Ajith KV <[email protected]>
2023-08-14 14:28:51 +05:30

8 lines
3.4 KiB
XML

<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="64" height="64" rx="12" fill="#F0F4FF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.309 16.4594C26.6326 16.4594 25.2736 17.7752 25.2736 19.3984V20.7046C25.2736 21.2457 24.8206 21.6843 24.2618 21.6843C23.703 21.6843 23.25 21.2457 23.25 20.7046V19.3984C23.25 16.6931 25.515 14.5 28.309 14.5H31.0071C33.8011 14.5 36.0661 16.6931 36.0661 19.3984V20.7046C36.0661 21.2457 35.6131 21.6843 35.0543 21.6843C34.4955 21.6843 34.0425 21.2457 34.0425 20.7046V19.3984C34.0425 17.7752 32.6835 16.4594 31.0071 16.4594H28.309Z" fill="#3E63DD"/>
<path d="M21.5632 20.7046H37.7519C40.7322 20.7046 43.1482 23.0439 43.1482 25.9295C43.1482 25.9295 40.0312 28.8831 32.1432 29.2511C31.88 29.2634 31.6584 29.062 31.5693 28.8141C31.2941 28.0485 30.5421 27.499 29.6576 27.499C28.8013 27.499 28.0692 28.014 27.7737 28.7415C27.6751 28.9843 27.4472 29.1756 27.186 29.1548C19.2799 28.5253 16.167 25.9295 16.167 25.9295C16.167 23.0439 18.583 20.7046 21.5632 20.7046Z" fill="#3E63DD"/>
<rect x="28.6455" y="28.5421" width="2.02359" height="3.64967" rx="1.01179" fill="#3E63DD"/>
<path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M16.167 25.9295C16.167 23.0439 18.583 20.7046 21.5632 20.7046H37.7519C40.7322 20.7046 43.1482 23.0439 43.1482 25.9295V33.3623L36.3512 37.4887C35.4059 36.9429 34.3247 36.6486 33.22 36.6365C32.1153 36.6243 31.0273 36.8947 30.069 37.4196C29.1107 37.9445 28.317 38.7047 27.7703 39.6214C27.4027 40.2377 27.1558 40.9097 27.0385 41.6044H21.5632C18.583 41.6044 16.167 39.2651 16.167 36.3795V25.9295ZM35.5059 41.1143C35.6096 41.2699 35.6949 41.4343 35.7615 41.6044H35.7326C35.1238 41.3258 34.4186 41.1666 33.667 41.1666C32.9154 41.1666 32.2102 41.3258 31.6014 41.6044H30.6079C30.7525 41.2348 30.9831 40.8995 31.2842 40.6247C31.6776 40.2658 32.1735 40.0264 32.7094 39.9366C33.2452 39.8469 33.797 39.9108 34.2947 40.1205C34.7925 40.3301 35.214 40.6759 35.5059 41.1143Z" fill="#3E63DD"/>
<path d="M47.0878 34.9653L44.27 34.3744C44.1837 34.3532 44.0936 34.3492 44.0055 34.3627C43.9174 34.3762 43.8333 34.4069 43.7586 34.4529L36.8685 38.5795C35.9331 38.0467 34.8634 37.7595 33.7704 37.7476C32.6774 37.7358 31.6009 37.9997 30.6528 38.512C29.7046 39.0243 28.9193 39.7664 28.3784 40.6611C27.8375 41.5558 27.5608 42.5706 27.5768 43.6001C27.5929 44.6296 27.9012 45.6362 28.4698 46.5156C29.0384 47.3949 29.8465 48.1149 30.8103 48.6008C31.774 49.0866 32.8583 49.3206 33.9504 49.2785C35.0426 49.2363 36.1029 48.9196 37.0212 48.3612C37.9767 47.7854 38.7422 46.9695 39.2313 46.0055C39.7204 45.0416 39.9137 43.968 39.7892 42.906L46.6793 38.7795C46.7551 38.7353 46.8204 38.6765 46.8707 38.6071C46.9211 38.5377 46.9555 38.4592 46.9716 38.3765L47.5989 35.7224C47.6211 35.641 47.6253 35.5561 47.6112 35.4731C47.5972 35.39 47.5652 35.3106 47.5173 35.2396C47.4695 35.1687 47.4066 35.1077 47.3327 35.0605C47.2589 35.0133 47.1755 34.9809 47.0878 34.9653ZM35.1958 45.6571C34.7416 45.9291 34.2119 46.0682 33.6737 46.0567C33.1356 46.0452 32.6131 45.8836 32.1725 45.5925C31.7318 45.3013 31.3927 44.8935 31.198 44.4208C31.0034 43.9481 30.9619 43.4317 31.0789 42.9367C31.1958 42.4418 31.466 41.9907 31.8551 41.6404C32.2443 41.2901 32.735 41.0564 33.2652 40.9688C33.7954 40.8812 34.3413 40.9436 34.8338 41.1482C35.3263 41.3528 35.7433 41.6904 36.0322 42.1183C36.4195 42.692 36.5489 43.3872 36.3921 44.0508C36.2353 44.7145 35.8049 45.2923 35.1958 45.6571Z" fill="#3E63DD"/>
</svg>