Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Commit 11c962b

Browse files
authored
feat: add preview of filepaths to project settings source and target connection dropdowns (#877)
1 parent a4f9f65 commit 11c962b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/react/components/common/connectionPicker/connectionPicker.tsx

+13-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class ConnectionPicker extends React.Component<IConnectionPickerProps, IC
5858
<option
5959
className="connection-option"
6060
key={connection.id}
61-
value={connection.id}>{connection.name}
61+
value={connection.id}>{this.getConnectionText(connection)}
6262
</option>)
6363
}
6464
</select>
@@ -71,6 +71,18 @@ export class ConnectionPicker extends React.Component<IConnectionPickerProps, IC
7171
);
7272
}
7373

74+
private getConnectionText = (connection: IConnection): string => {
75+
const options = connection.providerOptions;
76+
77+
if (options["folderPath"]) {
78+
return `${connection.name} (${options["folderPath"]})`;
79+
} else if (options["accountName"]) {
80+
return `${connection.name} (Azure:${options["accountName"]}\\${options["containerName"]})`;
81+
} else {
82+
return connection.name;
83+
}
84+
}
85+
7486
private onChange = (e) => {
7587
const selectedConnection = this.props.connections
7688
.find((connection) => connection.id === e.target.value) || {};

0 commit comments

Comments
 (0)