Граф коммитов

1310 Коммитов

Автор SHA1 Сообщение Дата
Hua Zhang afd23e4cca Use Azure DNS name resolution service instead of local DNS cache 2017-04-28 18:25:06 +08:00
Xiangzhi Sheng 99ccfd414a [BugFix] Failed to deploy if there was a resource group which name contains the target resource group name
The deployment script will try to find and stop existing streaming job to update it. While in previous code, it find by "ResouceGroupNameContains" rather than exactly match. It will cause solution "demorm1704" always failed if solution "demorm1704d" was already deployed before, since it will always try to stop the streaming job in demorm1704d.

In this code change, we changed the cmdlet from Find-AzureRmResource to Get-AzureRmResource to perform exactly match.
2017-04-19 09:59:13 +08:00
Xiangzhi Sheng 48cd45febb Allow DeviceInfo telemetry without DeviceProperties.DeviceID
We will try to get the deviceId from the message property, in case missing the deviceId
2017-04-19 09:57:28 +08:00
Xiangzhi Sheng 90f29c79cb Improve the fault tolerance of device connection failure
Currently, the simulator may meet connection failure randomly. It will cause the device failed to send and recevie any message. IoT Hub team suggested to re-create the DeviceClient object as a workaround. But it looks not enough, since sometime the it may take quite long time the reconnect to IoTHub even with the new created DeviceClient.

In this code change, we are going to improve the fault tolerance from angles below:
1. Upgrade the Device Client SDK to latest version
2. Add simulator scope check. If 50% devices was found in status "down", the whole simulator process will restart. It will happen only if the simulator was running as a WebJob in cloud environment.
3. [BugFix] Use “finally" statement to ensure the transport object was released
4. Add more trace log
2017-04-13 10:42:52 +08:00
Xiangzhi Sheng 3a0e12390b [BugFix] WebJobs failed to startup under VS2017 due to absent of the hosting process 2017-03-15 18:07:47 +08:00
Xiangzhi Sheng 1faa1b1565 Fix FxCop warnings 2017-03-13 13:51:55 +08:00
Xiangzhi Sheng 3b4ee8e7c2 Merge remote-tracking branch 'remotes/origin/EricssonIntegration'
# Resolved conflicts:
#	Common/Common.csproj
#	DeviceAdministration/Infrastructure/Infrastructure.csproj
#	DeviceAdministration/Infrastructure/packages.config
#	DeviceAdministration/Web/App_GlobalResources/Strings.Designer.cs
#	DeviceAdministration/Web/App_GlobalResources/Strings.resx
#	DeviceAdministration/Web/Content/styles/blocks/device_view/device_details_block.less
#	DeviceAdministration/Web/Content/styles/main.css
#	DeviceAdministration/Web/Controllers/DeviceController.cs
#	DeviceAdministration/Web/Scripts/Views/Device/DeviceDetails.js
#	DeviceAdministration/Web/Views/Advanced/CellularConn.cshtml
#	DeviceAdministration/Web/Views/Advanced/_IccidAssociation.cshtml
#	DeviceAdministration/Web/Views/Device/Index.cshtml
#	DeviceAdministration/Web/Views/Device/_DeviceDetailsDeviceProperties.cshtml
#	DeviceAdministration/Web/Web.csproj
#	RemoteMonitoring.sln
#	UnitTests/UnitTests.csproj
#	UnitTests/Web/Controllers/DeviceControllerTests.cs
#	UnitTests/Web/WebApiControllers/DeviceApiControllerTests.cs
#	UnitTests/packages.config
2017-03-08 14:12:04 +08:00
Hui Jiang 5b9ce9f4b4 user 32 bit key for devices 2017-03-08 12:19:09 +08:00
Xiangzhi Sheng 5032539025 Add comment for usage change of DeviceProperties 2017-03-03 10:43:15 +08:00
v-celi 86f480dc23 Change static text of sim information 2017-03-01 14:35:37 +08:00
Hua Zhang 4f5432464b Add versioning machanisim for js code
The old js code will be cached by browser which causes many problems after
the new changes has been pushed. Append version parameter to the js path
to let the browser refresh new js code whenever we change the constant
version in the new release.
2017-02-28 12:24:45 +08:00
Xiangzhi Sheng 138063e6d8 Merge remote-tracking branch 'remotes/origin/master' into iotchina_dm 2017-02-27 14:48:33 +08:00
Hui Jiang 32568ce922 use updated aka links 2017-02-27 14:32:54 +08:00
Hui Jiang 46de966f65 use aka.ms for packages 2017-02-27 14:26:10 +08:00
Hua Zhang 08ccc124d3 Add package release command help text
Since the build.cmd already support package command, it should be surfaced
to user in the command help text.
2017-02-27 11:41:42 +08:00
Hua Zhang bb72ba70af Treat tags.HubEnabledState as reserved twin name 2017-02-27 10:39:07 +08:00
Xiangzhi Sheng cd7b903ac7 Revert updating of NuGet package 'Validation'
The latest version will introduce build break while trying to restore NuGet packages
2017-02-24 18:42:43 +08:00
Hui Jiang 455e628a86 Enable RM with DM 2017-02-24 17:49:17 +08:00
Darren Chuang 42cd8e2c08 Merge branch 'iotchina_dm' of https://github.com/Azure/azure-iot-remote-monitoring.git 2017-02-24 17:31:34 +08:00
Darren Chuang 73a1991abe Fix unit test issue 2017-02-24 17:31:15 +08:00
Xiangzhi Sheng d4d372969c Update IoT Hub SDKs 2017-02-24 16:53:08 +08:00
Darren Chuang 27a599f919 [BugFix] Filter with associated jobs cannot be saved 2017-02-24 16:39:46 +08:00
Xiangzhi Sheng 1929afa2ca [BugFix] Method with parameter was shown as no device applicable 2017-02-24 15:16:44 +08:00
Xiangzhi Sheng 77fb649324 Refine code merged from https://github.com/Azure/azure-iot-remote-monitoring-ericsson
1. Remove Ericsson SMS Credential Manager
2. Replace project Connectivity with NuGet package
3. Remove publish profile
4. Remove Ericsson option from Advanced page
5. Fix the incorrect string resource file name
6. Remove broken unit test
2017-02-23 15:42:53 +08:00
Ce Li f75c34ba17 Fix js expression error in schedule job page 2017-02-23 12:02:51 +08:00
Xiangzhi Sheng 4cdbbdfa20 Set the default value of TelemetryInterval to 15 seconds
It is desired for the scenario driven out-of-box experience
2017-02-22 15:17:17 +08:00
Xiangzhi Sheng 84a8f731ca Enable rule on all of the "built-in" simulated devices
One more minor change: set the threshold of temperature to 60

It is desired for the scenario driven out-of-box experience
2017-02-22 11:43:34 +08:00
Xiangzhi Sheng 8c9caf515a Set desired property Config.TemperatureMeanValue to 70 for the first 5 simulated devices
It is desired for the scenario driven out-of-box experience
2017-02-22 10:56:15 +08:00
Xiangzhi Sheng 31b48ee360 Refine code style by auto-format 2017-02-22 10:53:09 +08:00
Xiangzhi Sheng e418689117 Refine code style by auto-format 2017-02-22 10:49:21 +08:00
Darren Chuang 962b8f3e50 Update translated resource files 2017-02-21 13:50:43 +08:00
Darren Chuang 28106a1b22 TFS 873661 part 2 - Duplicates filters with same name 2017-02-17 14:15:23 +08:00
Xiangzhi Sheng c41c45a257 Force simulator devices (except for the first 8 devices) report firmware version as 2.0 2017-02-16 13:40:12 +08:00
Darren Chuang 1e10ac3624 TFS 873661 part 1 - User can't use "Unnamed Filter" as filter name 2017-02-16 12:50:15 +08:00
huazhan b61091e40d TFS 937650 - SDL: Mitigate against cross-site request forgery (CSRF) attacks
use ValidateAntiForgeryToken for the actions with HttpPost Method for
JobController
2017-02-15 08:30:31 -08:00
Ce Li (Chinasoft) 8dc54dbfc2 Merge branch 'twininputvalidation' into iotchina_dm 2017-02-14 08:03:02 -08:00
Ce Li (Chinasoft) 9e00fa14eb [BugFix] Add validation rules to twin edit/schedule page
Add twin name depth validation
Add twin value length in byte validation
2017-02-14 07:21:04 -08:00
Ce Li (Chinasoft) 60b7582424 [BugFix]Add missing twin prefix when preform clone job action 2017-02-14 07:16:20 -08:00
Xiangzhi Sheng 81b4c50e08 TFS 881035 - Simplify structure of reported property "SupportedMethods"
It was suggested that to use just one key-value pair for single method:
<method signature>: <method description>
<method signature>:=<method name>--<parameter #0 type>-<parameter #0 name>--<parameter #1 type>-<parameter #1 name>...

Samples:
"SupportedMethods.FirmwareUpdate--string-fwPackageUri": "Firmware update"
"SupportedMethods.Ping": "Ping device"
2017-02-14 10:37:01 +08:00
Xiangzhi Sheng b9c79b6ab1 TFS 937846 - Out of box Demo scenario support
1. Remove columns ModelNumber, SerialNumber, Platform, Processor and InstallerRAM
2. Add columns Building, TemperatureMeanValue and UpdateFirmwareStatus
2017-02-14 10:34:41 +08:00
Xiangzhi Sheng 24d0f40cc0 TFS 937882 - Clear up the supported Method 2017-02-14 10:33:03 +08:00
Xiangzhi Sheng 47fd5ca718 TFS 937863 - Put top 10K devices limits for filtered device list 2017-02-14 10:30:42 +08:00
huazhan a148a43420 Change SampleDeviceXXX to CoolingSampleDeviceXXX 2017-02-13 10:41:01 -08:00
Xiangzhi Sheng 1664b52d06 TFS 937846 - Out of box Demo scenario support
Adjust behavior of device methods
1. Revert change of device method Reboot (no set TemperatureMeanValue anymore)
2. Postpone change of TemperatureMeanValue in device method FirmwareUpdate until reboot
2017-02-13 15:20:21 +08:00
Xiangzhi Sheng 3f3f5b5ba5 TFS 937846 - Out of box Demo scenario support
Adjust behavior of device methods
1. Revert change of device method Reboot (no set TemperatureMeanValue anymore)
2. Postpone change of TemperatureMeanValue in device method FirmwareUpdate until reboot
2017-02-13 15:06:44 +08:00
Xiangzhi Sheng a48be76f03 TFS 937846 - Out of box Demo scenario support
Created two preset filters: unhealthy devices and old firmware

The desired conditions are:
Unhealthy devices
properties.reported.Config.TemperatureMeanValue > 60

Old firmware devices
properties.reported.System.FirmwareVersion < '2.0'
2017-02-13 15:05:13 +08:00
Xiangzhi Sheng c9e7d20499 Reset telemetry while rebooting 2017-02-10 18:40:38 +08:00
Xiangzhi Sheng 8e35824573 Fix broken unit test 2017-02-10 18:32:35 +08:00
Xiangzhi Sheng 19d9a54fd1 Rename method FirmwareUpdate to InitiateFirmwareUpdate 2017-02-10 18:29:03 +08:00
Xiangzhi Sheng 9f9ad32b16 Add workaround IoTHubTransport wrapper
There is an issue in the IoT Hub device SDK which will cause random exception while trying to update reported properties. IoT Hub team suggested us to create a new DeviceClient object as workaround.

Since the exception will be raised randomly, in rare case it will even happen in the new created DeviceClient. So it is not enough to just create the new DeviceClient and try one time. In this code change, we are going to add a new IoTHubTransport wrapper to buffer the out-going reported properties until it was successfully updated to IoT Hub. Considering the telemetry event will be generated periodically, we will just drop those event if it was failed to be sent.

To avoid resource leak, we dispose the current DeviceClient when we are going to create a new one. But it may cause null referenced exception under some racing condition. So we are going to move all the operations on the DeviceClient to a single task “SendLoop” - We introduced two buffer for the out-going reported properties and telemetry events. All the "Send" operation on the IIoTHubTransport were converted to a "enqueue" operation and returned immediately. The “SendLoop” task will poll the buffer periodically and send them to IoT Hub. If any exception raised while sending to IoT Hub, the “SendLoop” task will mark the DeviceClient as unavailable, then dispose it and re-create a new one in next round.
2017-02-10 18:25:07 +08:00