DataSource: show the uid in edit url, not the local id (#33818)

This commit is contained in:
Ryan McKinley
2021-05-08 09:13:26 -07:00
committed by GitHub
parent 48f4b87349
commit ccc0f7fc22
25 changed files with 110 additions and 42 deletions
@@ -61,7 +61,7 @@ export class InputQueryEditor extends PureComponent<Props, State> {
render() {
const { datasource, query } = this.props;
const { id, name } = datasource;
const { uid, name } = datasource;
const { text } = this.state;
const selected = query.data ? options[0] : options[1];
@@ -73,7 +73,7 @@ export class InputQueryEditor extends PureComponent<Props, State> {
{query.data ? (
<div style={{ alignSelf: 'center' }}>{describeDataFrame(query.data)}</div>
) : (
<LinkButton variant="link" href={`datasources/edit/${id}/`}>
<LinkButton variant="link" href={`datasources/edit/${uid}/`}>
{name}: {describeDataFrame(datasource.data)} &nbsp;&nbsp;
<Icon name="pen" />
</LinkButton>