mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-18 02:07:04 +00:00
Hide launch quick start button and postgres teaching bubbles if account is a replica (#1344)
This commit is contained in:
parent
00eb07da11
commit
1ce3adff0f
@ -397,6 +397,7 @@ export interface DataExplorerInputsFrame {
|
|||||||
dataExplorerVersion?: string;
|
dataExplorerVersion?: string;
|
||||||
defaultCollectionThroughput?: CollectionCreationDefaults;
|
defaultCollectionThroughput?: CollectionCreationDefaults;
|
||||||
isPostgresAccount?: boolean;
|
isPostgresAccount?: boolean;
|
||||||
|
isReplica?: boolean;
|
||||||
// TODO: Update this param in the OSS extension to remove isFreeTier, isMarlinServerGroup, and make nodes a flat array instead of an nested array
|
// TODO: Update this param in the OSS extension to remove isFreeTier, isMarlinServerGroup, and make nodes a flat array instead of an nested array
|
||||||
connectionStringParams?: any;
|
connectionStringParams?: any;
|
||||||
flights?: readonly string[];
|
flights?: readonly string[];
|
||||||
|
@ -14,10 +14,6 @@
|
|||||||
padding-right: 16px;
|
padding-right: 16px;
|
||||||
max-width: 1168px;
|
max-width: 1168px;
|
||||||
|
|
||||||
> * {
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .title {
|
> .title {
|
||||||
position: relative; // To attach FeaturePanelLauncher as absolute
|
position: relative; // To attach FeaturePanelLauncher as absolute
|
||||||
color: @BaseHigh;
|
color: @BaseHigh;
|
||||||
|
@ -304,7 +304,11 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
|
|||||||
public createMainItems(): SplashScreenItem[] {
|
public createMainItems(): SplashScreenItem[] {
|
||||||
const heroes: SplashScreenItem[] = [];
|
const heroes: SplashScreenItem[] = [];
|
||||||
|
|
||||||
if (userContext.apiType === "SQL" || userContext.apiType === "Mongo" || userContext.apiType === "Postgres") {
|
if (
|
||||||
|
userContext.apiType === "SQL" ||
|
||||||
|
userContext.apiType === "Mongo" ||
|
||||||
|
(userContext.apiType === "Postgres" && !userContext.isReplica)
|
||||||
|
) {
|
||||||
const launchQuickstartBtn = {
|
const launchQuickstartBtn = {
|
||||||
id: "quickstartDescription",
|
id: "quickstartDescription",
|
||||||
iconSrc: QuickStartIcon,
|
iconSrc: QuickStartIcon,
|
||||||
|
@ -67,6 +67,7 @@ interface UserContext {
|
|||||||
partitionKey?: string;
|
partitionKey?: string;
|
||||||
};
|
};
|
||||||
readonly postgresConnectionStrParams?: PostgresConnectionStrParams;
|
readonly postgresConnectionStrParams?: PostgresConnectionStrParams;
|
||||||
|
readonly isReplica?: boolean;
|
||||||
collectionCreationDefaults: CollectionCreationDefaults;
|
collectionCreationDefaults: CollectionCreationDefaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ function updateUserContext(newContext: Partial<UserContext>): void {
|
|||||||
|
|
||||||
if (!localStorage.getItem(newContext.databaseAccount.id)) {
|
if (!localStorage.getItem(newContext.databaseAccount.id)) {
|
||||||
if (newContext.isTryCosmosDBSubscription || isNewAccount) {
|
if (newContext.isTryCosmosDBSubscription || isNewAccount) {
|
||||||
if (newContext.apiType === "Postgres") {
|
if (newContext.apiType === "Postgres" && !newContext.isReplica) {
|
||||||
usePostgres.getState().setShowResetPasswordBubble(true);
|
usePostgres.getState().setShowResetPasswordBubble(true);
|
||||||
usePostgres.getState().setShowPostgreTeachingBubble(true);
|
usePostgres.getState().setShowPostgreTeachingBubble(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -364,7 +364,7 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (inputs.isPostgresAccount) {
|
if (inputs.isPostgresAccount) {
|
||||||
updateUserContext({ apiType: "Postgres" });
|
updateUserContext({ apiType: "Postgres", isReplica: !!inputs.isReplica });
|
||||||
|
|
||||||
if (inputs.connectionStringParams) {
|
if (inputs.connectionStringParams) {
|
||||||
// TODO: Remove after the nodes param has been updated to be a flat array in the OSS extension
|
// TODO: Remove after the nodes param has been updated to be a flat array in the OSS extension
|
||||||
|
Loading…
x
Reference in New Issue
Block a user