Browse Source
Use plural path for alarm rules by entity endpoint
pull/15326/head
Viacheslav Klimov
4 months ago
Failed to extract signature
2 changed files with
2 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/controller/AlarmRuleController.java
-
ui-ngx/src/app/core/http/alarm-rules.service.ts
|
|
|
@ -150,7 +150,7 @@ public class AlarmRuleController extends BaseController { |
|
|
|
@ApiOperation(value = "Get Alarm Rules by Entity Id (getAlarmRulesByEntityId)", |
|
|
|
notes = "Fetch the Alarm Rules based on the provided Entity Id." + TENANT_AUTHORITY_PARAGRAPH) |
|
|
|
@PreAuthorize("hasAuthority('TENANT_ADMIN')") |
|
|
|
@GetMapping(value = "/alarm/rule/{entityType}/{entityId}") |
|
|
|
@GetMapping(value = "/alarm/rules/{entityType}/{entityId}") |
|
|
|
public PageData<AlarmRuleDefinition> getAlarmRulesByEntityId( |
|
|
|
@Parameter(description = ENTITY_TYPE_PARAM_DESCRIPTION, required = true, schema = @Schema(defaultValue = "DEVICE")) @PathVariable("entityType") String entityType, |
|
|
|
@Parameter(description = ENTITY_ID_PARAM_DESCRIPTION, required = true) @PathVariable("entityId") String entityIdStr, |
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ export class AlarmRulesService { |
|
|
|
} |
|
|
|
|
|
|
|
public getAlarmRulesByEntityId({ entityType, id }: EntityId, pageLink: PageLink, config?: RequestConfig): Observable<PageData<CalculatedField>> { |
|
|
|
return this.http.get<PageData<CalculatedField>>(`/api/alarm/rule/${entityType}/${id}${pageLink.toQuery()}`, defaultHttpOptionsFromConfig(config)); |
|
|
|
return this.http.get<PageData<CalculatedField>>(`/api/alarm/rules/${entityType}/${id}${pageLink.toQuery()}`, defaultHttpOptionsFromConfig(config)); |
|
|
|
} |
|
|
|
|
|
|
|
public testScript(inputParams: CalculatedFieldTestScriptInputParams, config?: RequestConfig): Observable<EntityTestScriptResult> { |
|
|
|
|