mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 09:51:11 +00:00
styling
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
} from "Utils/arm/generatedClients/cosmos/types";
|
} from "Utils/arm/generatedClients/cosmos/types";
|
||||||
import { logConsoleInfo, logConsoleProgress } from "Utils/NotificationConsoleUtils";
|
import { logConsoleInfo, logConsoleProgress } from "Utils/NotificationConsoleUtils";
|
||||||
|
|
||||||
export const createMaterializedView = async (params: CreateMaterializedViewsParams): Promise<any> => {
|
export const createMaterializedView = async (params: CreateMaterializedViewsParams): Promise<Collection> => {
|
||||||
const clearMessage = logConsoleProgress(
|
const clearMessage = logConsoleProgress(
|
||||||
`Creating a new materialized view ${params.materializedViewId} for database ${params.databaseId}`,
|
`Creating a new materialized view ${params.materializedViewId} for database ${params.databaseId}`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ import {
|
|||||||
scrollToSection,
|
scrollToSection,
|
||||||
shouldShowAnalyticalStoreOptions,
|
shouldShowAnalyticalStoreOptions,
|
||||||
} from "Explorer/Panes/AddCollectionPanel/AddCollectionPanelUtility";
|
} from "Explorer/Panes/AddCollectionPanel/AddCollectionPanelUtility";
|
||||||
|
import {
|
||||||
|
chooseSourceContainerStyle,
|
||||||
|
chooseSourceContainerStyles,
|
||||||
|
} from "Explorer/Panes/AddMaterializedViewPanel/AddMaterializedViewPanelStyles";
|
||||||
import { AddMVAdvancedComponent } from "Explorer/Panes/AddMaterializedViewPanel/AddMVAdvancedComponent";
|
import { AddMVAdvancedComponent } from "Explorer/Panes/AddMaterializedViewPanel/AddMVAdvancedComponent";
|
||||||
import { AddMVAnalyticalStoreComponent } from "Explorer/Panes/AddMaterializedViewPanel/AddMVAnalyticalStoreComponent";
|
import { AddMVAnalyticalStoreComponent } from "Explorer/Panes/AddMaterializedViewPanel/AddMVAnalyticalStoreComponent";
|
||||||
import { AddMVFullTextSearchComponent } from "Explorer/Panes/AddMaterializedViewPanel/AddMVFullTextSearchComponent";
|
import { AddMVFullTextSearchComponent } from "Explorer/Panes/AddMaterializedViewPanel/AddMVFullTextSearchComponent";
|
||||||
@@ -321,11 +325,11 @@ export const AddMaterializedViewPanel = (props: AddMaterializedViewPanelProps):
|
|||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
placeholder="Choose existing container"
|
placeholder="Choose source container"
|
||||||
options={sourceContainerOptions}
|
options={sourceContainerOptions}
|
||||||
defaultSelectedKey={sourceContainer?.rid}
|
defaultSelectedKey={sourceContainer?.rid}
|
||||||
styles={{ title: { height: 27, lineHeight: 27 }, dropdownItem: { fontSize: 12 } }}
|
styles={chooseSourceContainerStyles()}
|
||||||
style={{ width: 300, fontSize: 12 }}
|
style={chooseSourceContainerStyle()}
|
||||||
onChange={(_, options: IDropdownOption) => setSelectedSourceContainer(options.data as Collection)}
|
onChange={(_, options: IDropdownOption) => setSelectedSourceContainer(options.data as Collection)}
|
||||||
/>
|
/>
|
||||||
<Separator className="panelSeparator" />
|
<Separator className="panelSeparator" />
|
||||||
@@ -377,7 +381,7 @@ export const AddMaterializedViewPanel = (props: AddMaterializedViewPanelProps):
|
|||||||
placeholder={"SELECT c.email, c.accountId FROM c"}
|
placeholder={"SELECT c.email, c.accountId FROM c"}
|
||||||
size={40}
|
size={40}
|
||||||
className="panelTextField"
|
className="panelTextField"
|
||||||
value={definition}
|
value={definition || ""}
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) => setDefinition(event.target.value)}
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) => setDefinition(event.target.value)}
|
||||||
/>
|
/>
|
||||||
<AddMVPartitionKeyComponent
|
<AddMVPartitionKeyComponent
|
||||||
@@ -418,9 +422,9 @@ export const AddMaterializedViewPanel = (props: AddMaterializedViewPanelProps):
|
|||||||
)}
|
)}
|
||||||
<AddMVAdvancedComponent {...{ useHashV1, setUseHashV1, setSubPartitionKeys }} />
|
<AddMVAdvancedComponent {...{ useHashV1, setUseHashV1, setSubPartitionKeys }} />
|
||||||
</Stack>
|
</Stack>
|
||||||
<PanelFooterComponent buttonLabel="OK" isButtonDisabled={isThroughputCapExceeded} />
|
|
||||||
{isExecuting && <PanelLoadingScreen />}
|
|
||||||
</div>
|
</div>
|
||||||
|
<PanelFooterComponent buttonLabel="OK" isButtonDisabled={isThroughputCapExceeded} />
|
||||||
|
{isExecuting && <PanelLoadingScreen />}
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { IDropdownStyleProps, IDropdownStyles, IStyleFunctionOrObject } from "@fluentui/react";
|
||||||
|
import { CSSProperties } from "react";
|
||||||
|
|
||||||
|
export function chooseSourceContainerStyles(): IStyleFunctionOrObject<IDropdownStyleProps, IDropdownStyles> {
|
||||||
|
return {
|
||||||
|
title: { height: 27, lineHeight: 27 },
|
||||||
|
dropdownItem: { fontSize: 12 },
|
||||||
|
dropdownItemDisabled: { fontSize: 12 },
|
||||||
|
dropdownItemSelected: { fontSize: 12 },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function chooseSourceContainerStyle(): CSSProperties {
|
||||||
|
return { width: 300, fontSize: 12 };
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user