mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-21 07:45:21 +01:00
Implement refreshResourceTree message and hide refresh button above resource tree for Fabric native
This commit is contained in:
parent
a3bfc89318
commit
de3e7ff904
@ -81,6 +81,13 @@ export type FabricMessageV3 =
|
|||||||
error: string | undefined;
|
error: string | undefined;
|
||||||
data: { accessToken: string };
|
data: { accessToken: string };
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
type: "refreshResourceTree";
|
||||||
|
message: {
|
||||||
|
id: string;
|
||||||
|
error: string | undefined;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum CosmosDbArtifactType {
|
export enum CosmosDbArtifactType {
|
||||||
|
@ -315,16 +315,18 @@ export const SidebarContainer: React.FC<SidebarProps> = ({ explorer }) => {
|
|||||||
<>
|
<>
|
||||||
<div className={styles.floatingControlsContainer}>
|
<div className={styles.floatingControlsContainer}>
|
||||||
<div className={styles.floatingControls}>
|
<div className={styles.floatingControls}>
|
||||||
<button
|
{!isFabricNative() && (
|
||||||
type="button"
|
<button
|
||||||
data-test="Sidebar/RefreshButton"
|
type="button"
|
||||||
className={styles.floatingControlButton}
|
data-test="Sidebar/RefreshButton"
|
||||||
disabled={loading}
|
className={styles.floatingControlButton}
|
||||||
title="Refresh"
|
disabled={loading}
|
||||||
onClick={onRefreshClick}
|
title="Refresh"
|
||||||
>
|
onClick={onRefreshClick}
|
||||||
<ArrowSync12Regular />
|
>
|
||||||
</button>
|
<ArrowSync12Regular />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={styles.floatingControlButton}
|
className={styles.floatingControlButton}
|
||||||
|
@ -215,6 +215,10 @@ async function configureFabric(): Promise<Explorer> {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "refreshResourceTree": {
|
||||||
|
explorer.onRefreshResourcesClick();
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
console.error(`Unknown Fabric message type: ${JSON.stringify(data)}`);
|
console.error(`Unknown Fabric message type: ${JSON.stringify(data)}`);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user