-
+
{hasTitle ? title : 'Data link title not provided'}
-
-
- {hasUrl ? url : 'Data link url not provided'}
-
-
+
+ {hasUrl ? url : 'Data link url not provided'}
+
{oneClick && (
@@ -91,10 +82,6 @@ const getDataLinkListItemStyles = (theme: GrafanaTheme2) => {
flexGrow: 1,
maxWidth: `calc(100% - 100px)`,
}),
- errored: css({
- color: theme.colors.error.text,
- fontStyle: 'italic',
- }),
notConfigured: css({
fontStyle: 'italic',
}),
diff --git a/packages/grafana-ui/src/utils/dataLinks.test.ts b/packages/grafana-ui/src/utils/dataLinks.test.ts
deleted file mode 100644
index a4f5ae1a61b..00000000000
--- a/packages/grafana-ui/src/utils/dataLinks.test.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { isCompactUrl } from './dataLinks';
-
-describe('Datalinks', () => {
- it('isCompactUrl matches compact URL with segments', () => {
- expect(
- isCompactUrl(
- 'http://localhost:3000/explore?orgId=1&left=[%22now-1h%22,%22now%22,%22gdev-loki%22,{%22expr%22:%22{place=%22luna%22}%22,%22refId%22:%22A%22}]'
- )
- ).toEqual(true);
- });
-
- it('isCompactUrl matches compact URL without segments', () => {
- expect(isCompactUrl('http://localhost:3000/explore?orgId=1&left=[%22now-1h%22,%22now%22,%22gdev-loki%22]')).toEqual(
- true
- );
- });
-
- it('isCompactUrl matches compact URL with right pane', () => {
- expect(
- isCompactUrl('http://localhost:3000/explore?orgId=1&right=[%22now-1h%22,%22now%22,%22gdev-loki%22]')
- ).toEqual(true);
- });
-
- it('isCompactUrl does not match non-compact url', () => {
- expect(
- isCompactUrl(
- 'http://localhost:3000/explore?orgId=1&left={"datasource":"test[datasource]","queries":[{"refId":"A","datasource":{"type":"prometheus","uid":"gdev-prometheus"}}],"range":{"from":"now-1h","to":"now"}}'
- )
- ).toEqual(false);
- });
-});
diff --git a/packages/grafana-ui/src/utils/dataLinks.ts b/packages/grafana-ui/src/utils/dataLinks.ts
index 35fe1cffdf7..f889cf5a2a0 100644
--- a/packages/grafana-ui/src/utils/dataLinks.ts
+++ b/packages/grafana-ui/src/utils/dataLinks.ts
@@ -29,8 +29,3 @@ export const actionModelToContextMenuItems: (actions: ActionModel[]) => MenuItem
};
});
};
-
-export const isCompactUrl = (url: string) => {
- const compactExploreUrlRegex = /\/explore\?.*&(left|right)=\[(.*\,){2,}(.*){1}\]/;
- return compactExploreUrlRegex.test(url);
-};