|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
import { isString } from 'lodash'; |
|
|
|
import { PanelPlugin } from '@grafana/data'; |
|
|
|
import { PanelPlugin } from '@grafana/data'; |
|
|
|
import { NewsPanel } from './NewsPanel'; |
|
|
|
import { NewsPanel } from './NewsPanel'; |
|
|
|
import { NewsOptions } from './types'; |
|
|
|
import { NewsOptions } from './types'; |
|
|
@ -18,7 +19,7 @@ export const plugin = new PanelPlugin<NewsOptions>(NewsPanel).setPanelOptions(bu |
|
|
|
name: 'Use Proxy', |
|
|
|
name: 'Use Proxy', |
|
|
|
description: 'If the feed is unable to connect, consider a CORS proxy', |
|
|
|
description: 'If the feed is unable to connect, consider a CORS proxy', |
|
|
|
showIf: (currentConfig: NewsOptions) => { |
|
|
|
showIf: (currentConfig: NewsOptions) => { |
|
|
|
return currentConfig.feedUrl && !currentConfig.feedUrl.startsWith(PROXY_PREFIX); |
|
|
|
return isString(currentConfig.feedUrl) && !currentConfig.feedUrl.startsWith(PROXY_PREFIX); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|