mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-24 19:31:36 +00:00
Compare commits
3 Commits
cloudshell
...
defect2392
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6af0546361 | ||
|
|
e442e5fd0b | ||
|
|
10586d44f8 |
@@ -15,13 +15,13 @@ import {
|
|||||||
import {
|
import {
|
||||||
ChangeFeedPolicyState,
|
ChangeFeedPolicyState,
|
||||||
GeospatialConfigType,
|
GeospatialConfigType,
|
||||||
getSanitizedInputValue,
|
|
||||||
IsComponentDirtyResult,
|
IsComponentDirtyResult,
|
||||||
isDirty,
|
|
||||||
TtlOff,
|
TtlOff,
|
||||||
TtlOn,
|
TtlOn,
|
||||||
TtlOnNoDefault,
|
TtlOnNoDefault,
|
||||||
TtlType,
|
TtlType,
|
||||||
|
getSanitizedInputValue,
|
||||||
|
isDirty,
|
||||||
} from "../SettingsUtils";
|
} from "../SettingsUtils";
|
||||||
import { ToolTipLabelComponent } from "./ToolTipLabelComponent";
|
import { ToolTipLabelComponent } from "./ToolTipLabelComponent";
|
||||||
|
|
||||||
@@ -55,6 +55,18 @@ export interface SubSettingsComponentProps {
|
|||||||
onSubSettingsSaveableChange: (isSubSettingsSaveable: boolean) => void;
|
onSubSettingsSaveableChange: (isSubSettingsSaveable: boolean) => void;
|
||||||
onSubSettingsDiscardableChange: (isSubSettingsDiscardable: boolean) => void;
|
onSubSettingsDiscardableChange: (isSubSettingsDiscardable: boolean) => void;
|
||||||
}
|
}
|
||||||
|
const stylingforvisuallyhiddenspan = {
|
||||||
|
position: "absolute",
|
||||||
|
|
||||||
|
width: "1px",
|
||||||
|
height: "1px",
|
||||||
|
margin: "-1px",
|
||||||
|
border: 0,
|
||||||
|
padding: 0,
|
||||||
|
|
||||||
|
clip: "rect(0 0 0 0)",
|
||||||
|
overflow: "hidden",
|
||||||
|
};
|
||||||
|
|
||||||
export class SubSettingsComponent extends React.Component<SubSettingsComponentProps> {
|
export class SubSettingsComponent extends React.Component<SubSettingsComponentProps> {
|
||||||
private shouldCheckComponentIsDirty = true;
|
private shouldCheckComponentIsDirty = true;
|
||||||
@@ -197,17 +209,26 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
|
|||||||
</MessageBar>
|
</MessageBar>
|
||||||
)}
|
)}
|
||||||
{this.props.timeToLive === TtlType.On && (
|
{this.props.timeToLive === TtlType.On && (
|
||||||
<TextField
|
<div>
|
||||||
id="timeToLiveSeconds"
|
<span id="timetoliveon" style={stylingforvisuallyhiddenspan}>
|
||||||
styles={getTextFieldStyles(this.props.timeToLiveSeconds, this.props.timeToLiveSecondsBaseline)}
|
Time to live on
|
||||||
type="number"
|
</span>
|
||||||
required
|
<TextField
|
||||||
min={1}
|
id="timeToLiveSeconds"
|
||||||
max={Int32.Max}
|
styles={getTextFieldStyles(this.props.timeToLiveSeconds, this.props.timeToLiveSecondsBaseline)}
|
||||||
value={this.props.timeToLiveSeconds?.toString()}
|
type="number"
|
||||||
onChange={this.onTimeToLiveSecondsChange}
|
required
|
||||||
suffix="second(s)"
|
min={1}
|
||||||
/>
|
max={Int32.Max}
|
||||||
|
value={this.props.timeToLiveSeconds?.toString()}
|
||||||
|
onChange={this.onTimeToLiveSecondsChange}
|
||||||
|
suffix="second(s)"
|
||||||
|
aria-labelledby="timetoliveon secondssuffixforscreenreader"
|
||||||
|
/>
|
||||||
|
<span id="secondssuffixforscreenreader" style={stylingforvisuallyhiddenspan}>
|
||||||
|
Second(s)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -59,31 +59,68 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<StyledTextFieldBase
|
<div>
|
||||||
id="timeToLiveSeconds"
|
<span
|
||||||
max={2147483647}
|
id="timetoliveon"
|
||||||
min={1}
|
style={
|
||||||
onChange={[Function]}
|
Object {
|
||||||
required={true}
|
"border": 0,
|
||||||
styles={
|
"clip": "rect(0 0 0 0)",
|
||||||
Object {
|
"height": "1px",
|
||||||
"fieldGroup": Object {
|
"margin": "-1px",
|
||||||
"borderColor": "",
|
"overflow": "hidden",
|
||||||
"height": 25,
|
"padding": 0,
|
||||||
"selectors": Object {
|
"position": "absolute",
|
||||||
":disabled": Object {
|
"width": "1px",
|
||||||
"backgroundColor": undefined,
|
}
|
||||||
"borderColor": undefined,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"width": 300,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
>
|
||||||
suffix="second(s)"
|
Time to live on
|
||||||
type="number"
|
</span>
|
||||||
value="1000"
|
<StyledTextFieldBase
|
||||||
/>
|
aria-labelledby="timetoliveon secondssuffixforscreenreader"
|
||||||
|
id="timeToLiveSeconds"
|
||||||
|
max={2147483647}
|
||||||
|
min={1}
|
||||||
|
onChange={[Function]}
|
||||||
|
required={true}
|
||||||
|
styles={
|
||||||
|
Object {
|
||||||
|
"fieldGroup": Object {
|
||||||
|
"borderColor": "",
|
||||||
|
"height": 25,
|
||||||
|
"selectors": Object {
|
||||||
|
":disabled": Object {
|
||||||
|
"backgroundColor": undefined,
|
||||||
|
"borderColor": undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"width": 300,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
suffix="second(s)"
|
||||||
|
type="number"
|
||||||
|
value="1000"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
id="secondssuffixforscreenreader"
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"border": 0,
|
||||||
|
"clip": "rect(0 0 0 0)",
|
||||||
|
"height": "1px",
|
||||||
|
"margin": "-1px",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"padding": 0,
|
||||||
|
"position": "absolute",
|
||||||
|
"width": "1px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Second(s)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroup
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
@@ -283,31 +320,68 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<StyledTextFieldBase
|
<div>
|
||||||
id="timeToLiveSeconds"
|
<span
|
||||||
max={2147483647}
|
id="timetoliveon"
|
||||||
min={1}
|
style={
|
||||||
onChange={[Function]}
|
Object {
|
||||||
required={true}
|
"border": 0,
|
||||||
styles={
|
"clip": "rect(0 0 0 0)",
|
||||||
Object {
|
"height": "1px",
|
||||||
"fieldGroup": Object {
|
"margin": "-1px",
|
||||||
"borderColor": "",
|
"overflow": "hidden",
|
||||||
"height": 25,
|
"padding": 0,
|
||||||
"selectors": Object {
|
"position": "absolute",
|
||||||
":disabled": Object {
|
"width": "1px",
|
||||||
"backgroundColor": undefined,
|
}
|
||||||
"borderColor": undefined,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"width": 300,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
>
|
||||||
suffix="second(s)"
|
Time to live on
|
||||||
type="number"
|
</span>
|
||||||
value="1000"
|
<StyledTextFieldBase
|
||||||
/>
|
aria-labelledby="timetoliveon secondssuffixforscreenreader"
|
||||||
|
id="timeToLiveSeconds"
|
||||||
|
max={2147483647}
|
||||||
|
min={1}
|
||||||
|
onChange={[Function]}
|
||||||
|
required={true}
|
||||||
|
styles={
|
||||||
|
Object {
|
||||||
|
"fieldGroup": Object {
|
||||||
|
"borderColor": "",
|
||||||
|
"height": 25,
|
||||||
|
"selectors": Object {
|
||||||
|
":disabled": Object {
|
||||||
|
"backgroundColor": undefined,
|
||||||
|
"borderColor": undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"width": 300,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
suffix="second(s)"
|
||||||
|
type="number"
|
||||||
|
value="1000"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
id="secondssuffixforscreenreader"
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"border": 0,
|
||||||
|
"clip": "rect(0 0 0 0)",
|
||||||
|
"height": "1px",
|
||||||
|
"margin": "-1px",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"padding": 0,
|
||||||
|
"position": "absolute",
|
||||||
|
"width": "1px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Second(s)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroup
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
@@ -560,31 +634,68 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<StyledTextFieldBase
|
<div>
|
||||||
id="timeToLiveSeconds"
|
<span
|
||||||
max={2147483647}
|
id="timetoliveon"
|
||||||
min={1}
|
style={
|
||||||
onChange={[Function]}
|
Object {
|
||||||
required={true}
|
"border": 0,
|
||||||
styles={
|
"clip": "rect(0 0 0 0)",
|
||||||
Object {
|
"height": "1px",
|
||||||
"fieldGroup": Object {
|
"margin": "-1px",
|
||||||
"borderColor": "",
|
"overflow": "hidden",
|
||||||
"height": 25,
|
"padding": 0,
|
||||||
"selectors": Object {
|
"position": "absolute",
|
||||||
":disabled": Object {
|
"width": "1px",
|
||||||
"backgroundColor": undefined,
|
}
|
||||||
"borderColor": undefined,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"width": 300,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
>
|
||||||
suffix="second(s)"
|
Time to live on
|
||||||
type="number"
|
</span>
|
||||||
value="1000"
|
<StyledTextFieldBase
|
||||||
/>
|
aria-labelledby="timetoliveon secondssuffixforscreenreader"
|
||||||
|
id="timeToLiveSeconds"
|
||||||
|
max={2147483647}
|
||||||
|
min={1}
|
||||||
|
onChange={[Function]}
|
||||||
|
required={true}
|
||||||
|
styles={
|
||||||
|
Object {
|
||||||
|
"fieldGroup": Object {
|
||||||
|
"borderColor": "",
|
||||||
|
"height": 25,
|
||||||
|
"selectors": Object {
|
||||||
|
":disabled": Object {
|
||||||
|
"backgroundColor": undefined,
|
||||||
|
"borderColor": undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"width": 300,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
suffix="second(s)"
|
||||||
|
type="number"
|
||||||
|
value="1000"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
id="secondssuffixforscreenreader"
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"border": 0,
|
||||||
|
"clip": "rect(0 0 0 0)",
|
||||||
|
"height": "1px",
|
||||||
|
"margin": "-1px",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"padding": 0,
|
||||||
|
"position": "absolute",
|
||||||
|
"width": "1px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Second(s)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroup
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
@@ -799,31 +910,68 @@ exports[`SubSettingsComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<StyledTextFieldBase
|
<div>
|
||||||
id="timeToLiveSeconds"
|
<span
|
||||||
max={2147483647}
|
id="timetoliveon"
|
||||||
min={1}
|
style={
|
||||||
onChange={[Function]}
|
Object {
|
||||||
required={true}
|
"border": 0,
|
||||||
styles={
|
"clip": "rect(0 0 0 0)",
|
||||||
Object {
|
"height": "1px",
|
||||||
"fieldGroup": Object {
|
"margin": "-1px",
|
||||||
"borderColor": "",
|
"overflow": "hidden",
|
||||||
"height": 25,
|
"padding": 0,
|
||||||
"selectors": Object {
|
"position": "absolute",
|
||||||
":disabled": Object {
|
"width": "1px",
|
||||||
"backgroundColor": undefined,
|
}
|
||||||
"borderColor": undefined,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"width": 300,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
>
|
||||||
suffix="second(s)"
|
Time to live on
|
||||||
type="number"
|
</span>
|
||||||
value="1000"
|
<StyledTextFieldBase
|
||||||
/>
|
aria-labelledby="timetoliveon secondssuffixforscreenreader"
|
||||||
|
id="timeToLiveSeconds"
|
||||||
|
max={2147483647}
|
||||||
|
min={1}
|
||||||
|
onChange={[Function]}
|
||||||
|
required={true}
|
||||||
|
styles={
|
||||||
|
Object {
|
||||||
|
"fieldGroup": Object {
|
||||||
|
"borderColor": "",
|
||||||
|
"height": 25,
|
||||||
|
"selectors": Object {
|
||||||
|
":disabled": Object {
|
||||||
|
"backgroundColor": undefined,
|
||||||
|
"borderColor": undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"width": 300,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
suffix="second(s)"
|
||||||
|
type="number"
|
||||||
|
value="1000"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
id="secondssuffixforscreenreader"
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"border": 0,
|
||||||
|
"clip": "rect(0 0 0 0)",
|
||||||
|
"height": "1px",
|
||||||
|
"margin": "-1px",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"padding": 0,
|
||||||
|
"position": "absolute",
|
||||||
|
"width": "1px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Second(s)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroup
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { DefaultButton, IconButton, Image, Modal, PrimaryButton, Stack, Text } from "@fluentui/react";
|
import { DefaultButton, IconButton, Image, Modal, PrimaryButton, Stack, Text } from "@fluentui/react";
|
||||||
import { useCarousel } from "hooks/useCarousel";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import Youtube from "react-youtube";
|
|
||||||
import { Action } from "Shared/Telemetry/TelemetryConstants";
|
import { Action } from "Shared/Telemetry/TelemetryConstants";
|
||||||
import { traceSuccess } from "Shared/Telemetry/TelemetryProcessor";
|
import { traceSuccess } from "Shared/Telemetry/TelemetryProcessor";
|
||||||
import { userContext } from "UserContext";
|
import { userContext } from "UserContext";
|
||||||
|
import { useCarousel } from "hooks/useCarousel";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import Youtube from "react-youtube";
|
||||||
import Image1 from "../../../images/CarouselImage1.svg";
|
import Image1 from "../../../images/CarouselImage1.svg";
|
||||||
import Image2 from "../../../images/CarouselImage2.svg";
|
import Image2 from "../../../images/CarouselImage2.svg";
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ export const QuickstartCarousel: React.FC<QuickstartCarouselProps> = ({
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Stack horizontal horizontalAlign="space-between" style={{ padding: 16 }}>
|
<Stack horizontal horizontalAlign="space-between" style={{ padding: 16 }}>
|
||||||
<Text variant="xLarge">{getHeaderText(page)}</Text>
|
<Text variant="xLarge">{getHeaderText(page)}</Text>
|
||||||
<IconButton iconProps={{ iconName: "Cancel" }} onClick={() => setPage(4)} />
|
<IconButton iconProps={{ iconName: "Cancel" }} onClick={() => setPage(4)} ariaLabel="Close"/>
|
||||||
</Stack>
|
</Stack>
|
||||||
{getContent(page)}
|
{getContent(page)}
|
||||||
<Text variant="medium" style={{ padding: "0 16px" }}>
|
<Text variant="medium" style={{ padding: "0 16px" }}>
|
||||||
|
|||||||
@@ -134,6 +134,7 @@
|
|||||||
data-bind="click: selectQueryOptions, event: { keydown: onselectQueryOptionsKeyDown }"
|
data-bind="click: selectQueryOptions, event: { keydown: onselectQueryOptionsKeyDown }"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="button"
|
role="button"
|
||||||
|
href=""
|
||||||
>
|
>
|
||||||
<span>Choose Columns... </span>
|
<span>Choose Columns... </span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user