@c8y/apps
Version:
Cumulocity IoT applications
39 lines (31 loc) • 940 B
text/typescript
import { Component } from '@angular/core';
import { Widget, DashboardSettings, DashboardChange } from '@c8y/ngx-components';
({
selector: 'widget-dashboard',
templateUrl: './widget-dashboard.component.html'
})
export class WidgetDashboardComponent {
widgets = [
{ _x: 0, _y: 0, _width: 6, _height: 4, componentId: 'angular.widget.demo' },
{ _x: 6, _y: 0, _width: 6, _height: 6, componentId: 'angular.widget.demo' }
] as Widget[];
toggleFreeze(event: DashboardSettings) {
console.log('toggle freeze called', event);
event.isFrozen = !event.isFrozen;
}
change(event: DashboardChange) {
console.log('change called', event);
}
addWidget() {
console.log('add called');
}
editWidget(event: DashboardChange) {
console.log('edit called', event);
}
editDashboard() {
console.log('edit dashboard called');
}
update(event: DashboardChange) {
console.log(event);
}
}