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