File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public class Device
1414 public int ? EnvId { get ; set ; }
1515 public string Loc { get ; set ; }
1616 public int ? LocId { get ; set ; }
17+ public string Alerts { get ; set ; }
1718 }
1819
1920 public class Monitor
Original file line number Diff line number Diff line change @@ -30,6 +30,23 @@ public Models.Device[] GetDeviceList()
3030 }
3131 }
3232
33+ public bool ? ConfigureAlerts ( Dictionary < int , string > devices )
34+ {
35+ Utils . HttpClient client = new HttpClient ( null , null ) ;
36+ var response = client . SendAndGetResponse ( System . Web . VirtualPathUtility . AppendTrailingSlash ( client . BaseAPIUrl ) +
37+ "API/Device/ConfigureAlerts" ,
38+ JsonConvert . SerializeObject ( devices ) ) ;
39+
40+ if ( response . StatusCode == HttpStatusCode . OK )
41+ {
42+ return JsonConvert . DeserializeObject < bool > ( response . ResponseText ) ;
43+ }
44+ else
45+ {
46+ return null ;
47+ }
48+ }
49+
3350 public Models . Monitor [ ] GetDeviceMonitors ( int clientDeviceId )
3451 {
3552 Utils . HttpClient client = new HttpClient ( null , null ) ;
You can’t perform that action at this time.
0 commit comments