MCPcopy Create free account
hub / github.com/google/pprof / commitSave

Function commitSave

internal/driver/html/common.js:317–332  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

315
316 // Commit save config.
317 function commitSave(e) {
318 const name = saveInput.value;
319 const url = new URL(document.URL);
320 // Set path relative to existing path.
321 url.pathname = new URL('./saveconfig', document.URL).pathname;
322 url.searchParams.set('config', name);
323 saveError.innerText = '';
324 sendURL('POST', url, (ok) => {
325 if (!ok) {
326 saveError.innerText = 'Save failed';
327 } else {
328 showDialog(null);
329 location.reload(); // Reload to show updated config menu
330 }
331 });
332 }
333
334 function handleSaveInputKey(e) {
335 if (e.key === 'Enter') commitSave(e);

Callers 1

handleSaveInputKeyFunction · 0.85

Calls 3

sendURLFunction · 0.85
showDialogFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…