Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Bug Fixes: App Builder upgrade for subscribed app builder
Browse files Browse the repository at this point in the history
and dtld control by operation field peristant
  • Loading branch information
DarpanLalani committed Mar 15, 2022
1 parent 08a4b16 commit b4b3ec8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
10 changes: 8 additions & 2 deletions builder/app-builder-upgrade/app-builder-upgrade.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,15 @@ export class AppBuilderUpgradeService {
}
const appList = await this.getApplicationList();
const currentTenantId = this.settingService.getTenantName();
const appBuilderApp = appList.find(
let appBuilderApp = appList.find(
app => this.appBuilderConfigModel.versionInfo.contextPath &&
app.contextPath === this.appBuilderConfigModel.versionInfo.contextPath);
app.contextPath === this.appBuilderConfigModel.versionInfo.contextPath && (String(app.availability) === 'PRIVATE'));
if(!appBuilderApp) {
// Checking app builder subscribed one..
appList.find(
app => this.appBuilderConfigModel.versionInfo.contextPath &&
app.contextPath === this.appBuilderConfigModel.versionInfo.contextPath );
}
const appBuilderTenantId = (appBuilderApp && appBuilderApp.owner && appBuilderApp.owner.tenant ? appBuilderApp.owner.tenant.id : undefined);
if(appBuilderApp && currentTenantId === appBuilderTenantId) { isValidContextPath = true;}
/* else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app-builder",
"version": "1.3.0-dev-11",
"version": "1.3.0-RC-1",
"description": "Application builder for Cumulocity (written by Software AG Global Presales)",
"main": "index.ts",
"scripts": {
Expand Down
18 changes: 17 additions & 1 deletion simulation-strategies/dtdl/dtdl.config.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ import * as _ from 'lodash';
<input type="number" class="form-control" name="maxvalue{{model.id}}" placeholder="e.g. 20 (required)" required [(ngModel)]="model.alternateConfigs.operations[0].maxValue">
</div>
</div>
<ng-container *ngIf="model.alternateConfigs.opEnabled">
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="measurement-accordion">
<label for="match_{{model.id}}"><span>Matching</span></label>
<input type="text" class="form-control" id="match_{{model.id}}" name="match_{{model.id}}" placeholder="e.g. WINDY" required [(ngModel)]="model.alternateConfigs.operations[0].matchingValue">
</div>
</div>
</ng-container>
</ng-container>
<ng-container *ngSwitchCase="'positionUpdate'">
<div class="col-xs-12 col-sm-4 col-md-4">
Expand Down Expand Up @@ -150,6 +158,14 @@ import * as _ from 'lodash';
<input type="text" class="form-control" id="value" name="value{{model.id}}" placeholder="e.g. 15,20,30 (required)" required [(ngModel)]="model.alternateConfigs.operations[0].value">
</div>
</div>
<ng-container *ngIf="model.alternateConfigs.opEnabled">
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="measurement-accordion">
<label for="match_{{model.id}}"><span>Matching</span></label>
<input type="text" class="form-control" id="match_{{model.id}}" name="match_{{model.id}}" placeholder="e.g. WINDY" required [(ngModel)]="model.alternateConfigs.operations[0].matchingValue">
</div>
</div>
</ng-container>
</ng-container>
<ng-container *ngSwitchCase="'randomWalk'">
<div class="col-xs-12 col-sm-4 col-md-4">
Expand Down Expand Up @@ -234,7 +250,7 @@ import * as _ from 'lodash';
<div class="col-xs-6 col-lg-6">
<div class="measurement-accordion">
<label for="opMatch_{{i}}"><span>Matching</span></label>
<input type="text" class="form-control" id="opMatch_{{i}}" name="opMatch_{{i}}" placeholder="e.g. WINDY" required [(ngModel)]="op.matchingValue">
<input type="text" class="form-control" id="opMatch{{model.id}}_{{i}}" name="opMatch{{model.id}}_{{i}}" placeholder="e.g. WINDY" required [(ngModel)]="op.matchingValue">
</div>
</div>
<!-- must be the same as the default -->
Expand Down

0 comments on commit b4b3ec8

Please sign in to comment.