MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / onSave

Function onSave

web/pgadmin/tools/grant_wizard/static/js/GrantWizard.jsx:174–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172 };
173
174 const onSave = () => {
175 setLoaderText('Saving...');
176 let _url = url_for(
177 'grant_wizard.apply', {
178 'sid': encodeURI(sid),
179 'did': encodeURI(did),
180 });
181 const post_data = {
182 acl: selectedAcl.privilege,
183 objects: selectedObject.current
184 };
185 api.post(_url, post_data)
186 .then(() => {
187 setLoaderText('');
188 onClose();
189 })
190 .catch((error) => {
191 setLoaderText('');
192 pgAdmin.Browser.notifier.errorText(gettext(`Error while saving grant wizard data: ${error.response.data.errormsg}`));
193 });
194 };
195
196 const disableNextCheck = (stepId) => {
197 if (Object.keys(selectedRows).length > 0 && stepId === 0) {

Callers 2

setFilterDataFunction · 0.50
setMacrosFunction · 0.50

Calls 4

setLoaderTextFunction · 0.85
gettextFunction · 0.85
errorTextMethod · 0.80
onCloseFunction · 0.50

Tested by

no test coverage detected