Skip to content

Commit

Permalink
update to new version: jsonEditor, c8ySDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ck-c8y committed Oct 7, 2024
1 parent f37be37 commit 2d2eea1
Show file tree
Hide file tree
Showing 7 changed files with 2,081 additions and 1,311 deletions.
3,362 changes: 2,064 additions & 1,298 deletions dynamic-mapping-ui/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dynamic-mapping-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"@angular/platform-server": "^17.3.0",
"@angular/router": "^17.3.0",
"@angular/upgrade": "^17.3.0",
"@c8y/bootstrap": "^1020.18.1",
"@c8y/ngx-components": "^1020.18.1",
"@c8y/options": "^1020.18.1",
"@c8y/bootstrap": "^1020.26.2",
"@c8y/ngx-components": "^1020.26.2",
"@c8y/options": "^1020.26.2",
"@ngx-translate/core": "15.0.0",
"css-loader": "^7.1.2",
"echarts": "^5.5.1",
Expand All @@ -53,8 +53,8 @@
"@angular/language-service": "^18.2.2",
"@angular/localize": "^17.3.0",
"@angular/service-worker": "^17.3.0",
"@c8y/devkit": "^1020.18.3",
"@c8y/package-blueprint": "^1020.18.1",
"@c8y/devkit": "^1020.26.2",
"@c8y/package-blueprint": "^1020.26.2",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"cumulocity-cypress": "^0.4.6",
"cypress": "^13.13.3",
Expand Down
1 change: 1 addition & 0 deletions dynamic-mapping-ui/src/mapping/grid/mapping.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
</c8y-data-grid>
</div>
<div class="card-block col-md-offset-5 bg-white">
<c8y-client-grid-example></c8y-client-grid-example>
<div
class="c8y-empty-state"
*ngIf="(mappingsEnriched$ | async)?.length === 0"
Expand Down
7 changes: 5 additions & 2 deletions dynamic-mapping-ui/src/mapping/grid/mapping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ import { ImportMappingsComponent } from '../import/import-modal.component';
import { MappingTypeComponent } from '../mapping-type/mapping-type.component';
import { APIRendererComponent } from '../renderer/api.renderer.component';
import { NameRendererComponent } from '../renderer/name.renderer.component';
// import { QOSRendererComponent } from '../renderer/qos-cell.renderer.component';
import { StatusActivationRendererComponent } from '../renderer/status-activation-renderer.component';
import { StatusRendererComponent } from '../renderer/status-cell.renderer.component';
// import { TemplateRendererComponent } from '../renderer/template.renderer.component';
Expand Down Expand Up @@ -265,7 +264,11 @@ export class MappingComponent implements OnInit, OnDestroy {
this.bulkActionControls.push(
{
type: BuiltInActionType.Delete,
callback: this.deleteMappingBulkWithConfirmation.bind(this)
callback: this.deleteMappingBulkWithConfirmation.bind(this),
showIf: (selectedItemIds) => {
console.log('Selected mappings (showIf):', selectedItemIds);
return true;
}
},
{
type: 'ACTIVATE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class ConnectorConfigurationService {
switchMap(() => from(this.getConnectorConfigurations()))
)
).pipe(
tap(() => console.log('Something happened')),
// tap(() => console.log('Something happened')),
shareReplay(1)
);
// this.testRealtime();
Expand Down Expand Up @@ -273,7 +273,7 @@ export class ConnectorConfigurationService {
getConnectorConfigurationsWithLiveStatus(): Observable<
ConnectorConfiguration[]
> {
console.log('Further up 0');
// console.log('Further up 0');
return this.sharedConnectorConfigurations$;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
ViewEncapsulation
} from '@angular/core';
import {
JSONEditor,
createJSONEditor,
stringifyJSONPath,
Content,
MenuItem,
Expand Down Expand Up @@ -87,7 +87,7 @@ export class JsonEditor2Component implements OnInit, OnDestroy {

constructor(private elementRef: ElementRef) {}

private editor: JSONEditor;
private editor: any;
id = `angjsoneditor${Math.floor(Math.random() * 1000000)}`;
content: Content = {
text: undefined,
Expand All @@ -100,7 +100,7 @@ export class JsonEditor2Component implements OnInit, OnDestroy {
console.error("Can't find the ElementRef reference for jsoneditor)");
}
delete (this.content as any).text;
this.editor = new JSONEditor({
this.editor = createJSONEditor({
target: this.jsonEditorContainer.nativeElement,
props: {
...this.options,
Expand Down
2 changes: 1 addition & 1 deletion dynamic-mapping-ui/src/shared/navigation.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class MappingNavigationFactory implements NavigatorNodeFactory {
public router: Router
) {
this.appStateService.currentApplication.subscribe((cur) => {
console.log('AppName in MappingNavigationFactory', cur, this.router.url);
// console.log('AppName in MappingNavigationFactory', cur, this.router.url);

if (_.has(cur?.manifest, 'isPackage')) {
this.isStandaloneApp = cur?.manifest?.isPackage;
Expand Down

0 comments on commit 2d2eea1

Please sign in to comment.