Add 'Azure' category (#8)
* Add 'Azure' category * Update README.md * Fix typo * Track LoadDeviceTree event when it is successfully
This commit is contained in:
Родитель
d59eebb2b9
Коммит
9bfdada4a8
|
@ -25,7 +25,7 @@ Interact with Azure IoT Hub, IoT Device Management, IoT Hub Code Snippets.
|
|||
|
||||
![Click Device Explorer](https://github.com/formulahendry/vscode-azure-iot-toolkit/raw/master/images/device-explorer-click.png)
|
||||
|
||||
2. If you have not set Iot Hub Connection String before, an input box will pop up, then enter your Iot Hub Connection String (It is one-time configuration).
|
||||
2. If you have not set Iot Hub Connection String before, an input box will pop up, then enter your Iot Hub Connection String (It is one-time configuration, and please make sure it is **Iot Hub Connection String** not **Device Connection String**).
|
||||
|
||||
![Enter Connection String](https://github.com/formulahendry/vscode-azure-iot-toolkit/raw/master/images/enter-connection-string.png)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"vscode": "^1.13.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other",
|
||||
"Azure",
|
||||
"Languages",
|
||||
"Snippets"
|
||||
],
|
||||
|
|
|
@ -29,7 +29,6 @@ export class DeviceTree implements vscode.TreeDataProvider<DeviceItem> {
|
|||
return;
|
||||
}
|
||||
|
||||
TelemetryClient.sendEvent(Constants.IoTHubAILoadDeviceTreeEvent);
|
||||
let registry = iothub.Registry.fromConnectionString(iotHubConnectionString);
|
||||
let devices = [];
|
||||
let hostName = Utility.getHostName(iotHubConnectionString);
|
||||
|
@ -39,6 +38,7 @@ export class DeviceTree implements vscode.TreeDataProvider<DeviceItem> {
|
|||
if (err) {
|
||||
reject(`[Failed to list IoT Hub devices] ${err.message}`);
|
||||
} else {
|
||||
TelemetryClient.sendEvent(Constants.IoTHubAILoadDeviceTreeEvent);
|
||||
deviceList.forEach((device, index) => {
|
||||
let image = device.connectionState.toString() === "Connected" ? "device-on.png" : "device-off.png";
|
||||
devices.push(new DeviceItem(device.deviceId,
|
||||
|
|
Загрузка…
Ссылка в новой задаче