mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Renamed parts of the UI extension APIs (#63070)
* Renamed target -> id and href -> path after feedback. * fixed type issues in test page. * chore(pluginschemajson): update extensions props target -> id * this is the final. * fixed typings...again... --------- Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
This commit is contained in:
@@ -62,7 +62,7 @@ export const TestStuffPage = () => {
|
||||
<Page navModel={{ node: node, main: node }}>
|
||||
<Page.Contents>
|
||||
<HorizontalGroup>
|
||||
<LinkToBasicApp target="grafana/sandbox/testing" />
|
||||
<LinkToBasicApp placement="grafana/sandbox/testing" />
|
||||
</HorizontalGroup>
|
||||
{data && (
|
||||
<AutoSizer style={{ width: '100%', height: '600px' }}>
|
||||
@@ -148,8 +148,8 @@ export function getDefaultState(): State {
|
||||
};
|
||||
}
|
||||
|
||||
function LinkToBasicApp({ target }: { target: string }) {
|
||||
const { extensions, error } = getPluginExtensions({ target });
|
||||
function LinkToBasicApp({ placement }: { placement: string }) {
|
||||
const { extensions, error } = getPluginExtensions({ placement });
|
||||
|
||||
if (error) {
|
||||
return null;
|
||||
@@ -159,7 +159,7 @@ function LinkToBasicApp({ target }: { target: string }) {
|
||||
<div>
|
||||
{extensions.map((extension) => {
|
||||
return (
|
||||
<LinkButton href={extension.href} title={extension.description} key={extension.key}>
|
||||
<LinkButton href={extension.path} title={extension.description} key={extension.key}>
|
||||
{extension.title}
|
||||
</LinkButton>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user