mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-29 05:41:40 +00:00
Compare commits
39 Commits
users/aisa
...
2276933
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
902199d9ce | ||
|
|
fa0a508973 | ||
|
|
985aa2e9ac | ||
|
|
2283aa8d94 | ||
|
|
32373a0ead | ||
|
|
36777b5a16 | ||
|
|
1d481d1740 | ||
|
|
f87cdac062 | ||
|
|
dc16ff2dfc | ||
|
|
9edb5a6bb5 | ||
|
|
0fcb2f9669 | ||
|
|
fdfdc4a3de | ||
|
|
39c55c1607 | ||
|
|
db2caf9a81 | ||
|
|
c858c1042d | ||
|
|
e243d87310 | ||
|
|
e0123656d7 | ||
|
|
6068194d26 | ||
|
|
c6ef6ba02d | ||
|
|
9095e39f94 | ||
|
|
437a9835f8 | ||
|
|
75176550f0 | ||
|
|
bbf89eaed8 | ||
|
|
4cb7c3eb26 | ||
|
|
21e2ecefc1 | ||
|
|
b48c3d7735 | ||
|
|
45b9f6b244 | ||
|
|
fe40e77ef8 | ||
|
|
8c062cd5de | ||
|
|
2bbd63f0b6 | ||
|
|
c8310021bc | ||
|
|
93392c8795 | ||
|
|
f98cdf39d6 | ||
|
|
ba66aa939b | ||
|
|
f9af595eee | ||
|
|
7ce8c7a5a1 | ||
|
|
9ad3f589cc | ||
|
|
9267b2cc18 | ||
|
|
c7d1b2dcdb |
@@ -1,5 +1,6 @@
|
|||||||
import { DatePicker, TextField } from "@fluentui/react";
|
import { DatePicker, TextField } from "@fluentui/react";
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
|
import { attributeValueLabel } from "../Explorer/Panes/Tables/Validators/EntityTableHelper";
|
||||||
|
|
||||||
export interface TableEntityProps {
|
export interface TableEntityProps {
|
||||||
entityValueLabel?: string;
|
entityValueLabel?: string;
|
||||||
@@ -61,6 +62,7 @@ export const EntityValue: FunctionComponent<TableEntityProps> = ({
|
|||||||
placeholder={entityValuePlaceholder}
|
placeholder={entityValuePlaceholder}
|
||||||
value={typeof entityValue === "string" ? entityValue : ""}
|
value={typeof entityValue === "string" ? entityValue : ""}
|
||||||
onChange={onEntityValueChange}
|
onChange={onEntityValueChange}
|
||||||
|
ariaLabel={attributeValueLabel}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
import DeleteIcon from "../../images/delete.svg";
|
import DeleteIcon from "../../images/delete.svg";
|
||||||
import EditIcon from "../../images/Edit_entity.svg";
|
import EditIcon from "../../images/Edit_entity.svg";
|
||||||
|
import { attributeNameLabel, dataTypeLabel } from "../Explorer/Panes/Tables/Validators/EntityTableHelper";
|
||||||
import { CassandraType, TableType } from "../Explorer/Tables/Constants";
|
import { CassandraType, TableType } from "../Explorer/Tables/Constants";
|
||||||
import { userContext } from "../UserContext";
|
import { userContext } from "../UserContext";
|
||||||
import { EntityValue } from "./EntityValue";
|
import { EntityValue } from "./EntityValue";
|
||||||
@@ -36,7 +37,7 @@ export interface TableEntityProps {
|
|||||||
onDeleteEntity?: () => void;
|
onDeleteEntity?: () => void;
|
||||||
onEditEntity?: () => void;
|
onEditEntity?: () => void;
|
||||||
onEntityPropertyChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
|
onEntityPropertyChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
|
||||||
onEntityTypeChange: (event: React.FormEvent<HTMLElement>, selectedParam: IDropdownOption) => void;
|
onEntityTypeChange: (event: React.FormEvent<HTMLElement>, selectedParam: IDropdownOption) => void
|
||||||
onEntityValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
|
onEntityValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
|
||||||
onSelectDate: (date: Date | null | undefined) => void;
|
onSelectDate: (date: Date | null | undefined) => void;
|
||||||
onEntityTimeValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
|
onEntityTimeValueChange: (event: React.FormEvent<HTMLElement>, newInput?: string) => void;
|
||||||
@@ -113,6 +114,7 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
|
|||||||
value={entityProperty}
|
value={entityProperty}
|
||||||
onChange={onEntityPropertyChange}
|
onChange={onEntityPropertyChange}
|
||||||
required
|
required
|
||||||
|
ariaLabel={attributeNameLabel}
|
||||||
/>
|
/>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
label={entityTypeLabel && entityTypeLabel}
|
label={entityTypeLabel && entityTypeLabel}
|
||||||
@@ -122,6 +124,7 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
|
|||||||
disabled={isPropertyTypeDisable}
|
disabled={isPropertyTypeDisable}
|
||||||
id="entityTypeId"
|
id="entityTypeId"
|
||||||
styles={dropdownStyles}
|
styles={dropdownStyles}
|
||||||
|
ariaLabel={dataTypeLabel}
|
||||||
/>
|
/>
|
||||||
<EntityValue
|
<EntityValue
|
||||||
entityValueLabel={entityValueLabel}
|
entityValueLabel={entityValueLabel}
|
||||||
|
|||||||
@@ -729,6 +729,7 @@ export class D3ForceGraph implements GraphRenderer {
|
|||||||
var iconGroup = newNodes
|
var iconGroup = newNodes
|
||||||
.append("g")
|
.append("g")
|
||||||
.attr("class", "iconContainer")
|
.attr("class", "iconContainer")
|
||||||
|
.attr("role", "group")
|
||||||
.attr("tabindex", 0)
|
.attr("tabindex", 0)
|
||||||
.attr("aria-label", (d: D3Node) => {
|
.attr("aria-label", (d: D3Node) => {
|
||||||
return this.retrieveNodeCaption(d);
|
return this.retrieveNodeCaption(d);
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ describe("New Vertex Component", () => {
|
|||||||
it("should call onTypeChange method on type dropdown change", () => {
|
it("should call onTypeChange method on type dropdown change", () => {
|
||||||
const DOWN_ARROW = { keyCode: 40 };
|
const DOWN_ARROW = { keyCode: 40 };
|
||||||
const onTypeChange = jest.fn();
|
const onTypeChange = jest.fn();
|
||||||
const dropdown = screen.getByRole("listbox");
|
const dropdown = screen.getByRole("combobox");
|
||||||
dropdown.onclick = onTypeChange();
|
dropdown.onclick = onTypeChange();
|
||||||
dropdown.onkeydown = onTypeChange();
|
dropdown.onkeydown = onTypeChange();
|
||||||
|
|
||||||
fireEvent.keyDown(screen.getByRole("listbox"), DOWN_ARROW);
|
fireEvent.keyDown(screen.getByRole("combobox"), DOWN_ARROW);
|
||||||
fireEvent.click(screen.getByText(/number/));
|
fireEvent.click(screen.getByText(/number/));
|
||||||
expect(onTypeChange).toHaveBeenCalled();
|
expect(onTypeChange).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ export const NewVertexComponent: FunctionComponent<INewVertexComponentProps> = (
|
|||||||
type="text"
|
type="text"
|
||||||
id="propertyKeyNewVertexPane"
|
id="propertyKeyNewVertexPane"
|
||||||
componentRef={input}
|
componentRef={input}
|
||||||
|
aria-required="true"
|
||||||
placeholder="Key"
|
placeholder="Key"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
aria-label={`Enter value for propery ${index + 1}`}
|
aria-label={`Enter value for propery ${index + 1}`}
|
||||||
@@ -152,6 +153,8 @@ export const NewVertexComponent: FunctionComponent<INewVertexComponentProps> = (
|
|||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) => onKeyChange(event, index)}
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) => onKeyChange(event, index)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<span className="mandatoryStar">* </span>
|
||||||
|
|
||||||
<div className="valueCol">
|
<div className="valueCol">
|
||||||
<TextField
|
<TextField
|
||||||
className="edgeInput"
|
className="edgeInput"
|
||||||
@@ -165,7 +168,7 @@ export const NewVertexComponent: FunctionComponent<INewVertexComponentProps> = (
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
role="listbox"
|
role="combobox"
|
||||||
placeholder="Select an option"
|
placeholder="Select an option"
|
||||||
defaultSelectedKey={data.values[0].type}
|
defaultSelectedKey={data.values[0].type}
|
||||||
style={{ width: 100 }}
|
style={{ width: 100 }}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import { SplashScreen } from "Explorer/SplashScreen/SplashScreen";
|
|||||||
import { ConnectTab } from "Explorer/Tabs/ConnectTab";
|
import { ConnectTab } from "Explorer/Tabs/ConnectTab";
|
||||||
import { PostgresConnectTab } from "Explorer/Tabs/PostgresConnectTab";
|
import { PostgresConnectTab } from "Explorer/Tabs/PostgresConnectTab";
|
||||||
import { QuickstartTab } from "Explorer/Tabs/QuickstartTab";
|
import { QuickstartTab } from "Explorer/Tabs/QuickstartTab";
|
||||||
|
import { userContext } from "UserContext";
|
||||||
import { useTeachingBubble } from "hooks/useTeachingBubble";
|
import { useTeachingBubble } from "hooks/useTeachingBubble";
|
||||||
import ko from "knockout";
|
import ko from "knockout";
|
||||||
import React, { MutableRefObject, useEffect, useRef, useState } from "react";
|
import React, { MutableRefObject, useEffect, useRef, useState } from "react";
|
||||||
import { userContext } from "UserContext";
|
|
||||||
import loadingIcon from "../../../images/circular_loader_black_16x16.gif";
|
import loadingIcon from "../../../images/circular_loader_black_16x16.gif";
|
||||||
import errorIcon from "../../../images/close-black.svg";
|
import errorIcon from "../../../images/close-black.svg";
|
||||||
import { useObservable } from "../../hooks/useObservable";
|
import { useObservable } from "../../hooks/useObservable";
|
||||||
@@ -102,22 +102,20 @@ function TabNav({ tab, active, tabKind }: { tab?: Tab; active: boolean; tabKind?
|
|||||||
ref={focusTab}
|
ref={focusTab}
|
||||||
>
|
>
|
||||||
<span className="tabNavContentContainer">
|
<span className="tabNavContentContainer">
|
||||||
<a data-toggle="tab" href={"#" + tabId} tabIndex={-1}>
|
<div className="tab_Content">
|
||||||
<div className="tab_Content">
|
<span className="statusIconContainer" style={{ width: tabKind === ReactTabKind.Home ? 0 : 18 }}>
|
||||||
<span className="statusIconContainer" style={{ width: tabKind === ReactTabKind.Home ? 0 : 18 }}>
|
{useObservable(tab?.isExecutionError || ko.observable(false)) && <ErrorIcon tab={tab} active={active} />}
|
||||||
{useObservable(tab?.isExecutionError || ko.observable(false)) && <ErrorIcon tab={tab} active={active} />}
|
{useObservable(tab?.isExecuting || ko.observable(false)) && (
|
||||||
{useObservable(tab?.isExecuting || ko.observable(false)) && (
|
<img className="loadingIcon" title="Loading" src={loadingIcon} alt="Loading" />
|
||||||
<img className="loadingIcon" title="Loading" src={loadingIcon} alt="Loading" />
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
<span className="tabNavText">{useObservable(tab?.tabTitle || ko.observable(ReactTabKind[tabKind]))}</span>
|
|
||||||
{tabKind !== ReactTabKind.Home && (
|
|
||||||
<span className="tabIconSection">
|
|
||||||
<CloseButton tab={tab} active={active} hovering={hovering} tabKind={tabKind} />
|
|
||||||
</span>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</span>
|
||||||
</a>
|
<span className="tabNavText">{useObservable(tab?.tabTitle || ko.observable(ReactTabKind[tabKind]))}</span>
|
||||||
|
{tabKind !== ReactTabKind.Home && (
|
||||||
|
<span className="tabIconSection">
|
||||||
|
<CloseButton tab={tab} active={active} hovering={hovering} tabKind={tabKind} />
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -135,7 +135,6 @@
|
|||||||
"./src/quickstart.ts",
|
"./src/quickstart.ts",
|
||||||
"./src/setupTests.ts",
|
"./src/setupTests.ts",
|
||||||
"./src/userContext.test.ts",
|
"./src/userContext.test.ts",
|
||||||
"src/Common/EntityValue.tsx",
|
|
||||||
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
|
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
|
||||||
"./src/Platform/Hosted/Components/SwitchSubscription.tsx"
|
"./src/Platform/Hosted/Components/SwitchSubscription.tsx"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user