Browse Source
- Add update item version endpoint and service method (backend) - Add update dialog component with confirm/updating/success/error states - Add check for updates feature in installed items table - Show update button on browse cards and detail dialog when update available - Add route resolver for installed item infos shared across pages - Improve deserialization: use ignoreUnknownFields, root cause error messages - Refactor rule chain install to parse ruleChain and metadata separatelypull/15347/head
22 changed files with 655 additions and 87 deletions
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright © 2016-2026 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
package org.thingsboard.server.service.iot_hub; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.thingsboard.server.common.data.iot_hub.IotHubInstalledItemDescriptor; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class UpdateItemVersionResult { |
|||
|
|||
private boolean success; |
|||
private String errorMessage; |
|||
private IotHubInstalledItemDescriptor descriptor; |
|||
|
|||
public static UpdateItemVersionResult success(IotHubInstalledItemDescriptor descriptor) { |
|||
return new UpdateItemVersionResult(true, null, descriptor); |
|||
} |
|||
|
|||
public static UpdateItemVersionResult error(String errorMessage) { |
|||
return new UpdateItemVersionResult(false, errorMessage, null); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
///
|
|||
/// Copyright © 2016-2026 The Thingsboard Authors
|
|||
///
|
|||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|||
/// you may not use this file except in compliance with the License.
|
|||
/// You may obtain a copy of the License at
|
|||
///
|
|||
/// http://www.apache.org/licenses/LICENSE-2.0
|
|||
///
|
|||
/// Unless required by applicable law or agreed to in writing, software
|
|||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
/// See the License for the specific language governing permissions and
|
|||
/// limitations under the License.
|
|||
///
|
|||
|
|||
import { inject } from '@angular/core'; |
|||
import { ResolveFn } from '@angular/router'; |
|||
import { IotHubApiService } from '@core/http/iot-hub-api.service'; |
|||
import { IotHubInstalledItemInfo } from '@shared/models/iot-hub/iot-hub-installed-item.models'; |
|||
|
|||
export const iotHubInstalledItemInfosResolver: ResolveFn<IotHubInstalledItemInfo[]> = () => { |
|||
const iotHubApiService = inject(IotHubApiService); |
|||
return iotHubApiService.getInstalledItemInfos({ ignoreLoading: true }); |
|||
}; |
|||
Loading…
Reference in new issue