mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Allow shortlink generation (#28222)
* Add short link functionality to Explore and Rich history * Update documentation * Implement short url for explore * Implement short link in Rich history * Update docs * Add error alert
This commit is contained in:
@@ -481,3 +481,12 @@ export const getFirstNonQueryRowSpecificError = (queryErrors?: DataQueryError[])
|
||||
const refId = getValueWithRefId(queryErrors);
|
||||
return refId ? undefined : getFirstQueryErrorWithoutRefId(queryErrors);
|
||||
};
|
||||
|
||||
export const copyStringToClipboard = (string: string) => {
|
||||
const el = document.createElement('textarea');
|
||||
el.value = string;
|
||||
document.body.appendChild(el);
|
||||
el.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(el);
|
||||
};
|
||||
|
Reference in New Issue
Block a user