@c8y/ngx-components 1010.0.19 → 1010.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/bundles/c8y-ngx-components-reports.umd.js +15 -2
  2. package/bundles/c8y-ngx-components-reports.umd.js.map +1 -1
  3. package/bundles/c8y-ngx-components-reports.umd.min.js +2 -2
  4. package/bundles/c8y-ngx-components-reports.umd.min.js.map +1 -1
  5. package/bundles/c8y-ngx-components-sub-assets.umd.js +2 -9
  6. package/bundles/c8y-ngx-components-sub-assets.umd.js.map +1 -1
  7. package/bundles/c8y-ngx-components-sub-assets.umd.min.js +1 -1
  8. package/bundles/c8y-ngx-components-sub-assets.umd.min.js.map +1 -1
  9. package/bundles/c8y-ngx-components.umd.js +2 -2
  10. package/bundles/c8y-ngx-components.umd.js.map +1 -1
  11. package/bundles/c8y-ngx-components.umd.min.js +1 -1
  12. package/bundles/c8y-ngx-components.umd.min.js.map +1 -1
  13. package/esm2015/core/range-display/range-display.component.js +3 -3
  14. package/esm2015/reports/reports.service.js +10 -4
  15. package/esm2015/sub-assets/sub-assets.component.js +3 -10
  16. package/esm5/core/range-display/range-display.component.js +3 -3
  17. package/esm5/reports/reports.service.js +17 -4
  18. package/esm5/sub-assets/sub-assets.component.js +3 -11
  19. package/fesm2015/c8y-ngx-components-reports.js +8 -2
  20. package/fesm2015/c8y-ngx-components-reports.js.map +1 -1
  21. package/fesm2015/c8y-ngx-components-sub-assets.js +2 -8
  22. package/fesm2015/c8y-ngx-components-sub-assets.js.map +1 -1
  23. package/fesm2015/c8y-ngx-components.js +2 -2
  24. package/fesm2015/c8y-ngx-components.js.map +1 -1
  25. package/fesm5/c8y-ngx-components-reports.js +15 -2
  26. package/fesm5/c8y-ngx-components-reports.js.map +1 -1
  27. package/fesm5/c8y-ngx-components-sub-assets.js +2 -9
  28. package/fesm5/c8y-ngx-components-sub-assets.js.map +1 -1
  29. package/fesm5/c8y-ngx-components.js +2 -2
  30. package/fesm5/c8y-ngx-components.js.map +1 -1
  31. package/package.json +2 -2
  32. package/reports/c8y-ngx-components-reports.metadata.json +1 -1
  33. package/reports/reports.service.d.ts +2 -1
  34. package/sub-assets/c8y-ngx-components-sub-assets.metadata.json +1 -1
  35. package/sub-assets/sub-assets.component.d.ts +2 -4
@@ -17,7 +17,7 @@ var ReportsService = /** @class */ (function () {
17
17
  this.alertService = alertService;
18
18
  this.inventoryService = inventoryService;
19
19
  this.client = client;
20
- this.microserviceUrl = '/service/reporting/schedule';
20
+ this.microserviceUrl = '/service/reporting';
21
21
  this.headers = { 'Content-Type': 'application/json' };
22
22
  }
23
23
  ReportsService.prototype.getExport = function (exportId) {
@@ -124,7 +124,7 @@ var ReportsService = /** @class */ (function () {
124
124
  method: 'PUT',
125
125
  headers: this.headers
126
126
  };
127
- return [4 /*yield*/, this.client.fetch(this.microserviceUrl + "/" + exportId, options)];
127
+ return [4 /*yield*/, this.client.fetch(this.microserviceUrl + "/schedule/" + exportId, options)];
128
128
  case 1:
129
129
  rescheduling = _a.sent();
130
130
  return [2 /*return*/, rescheduling.status === 200];
@@ -142,6 +142,19 @@ var ReportsService = /** @class */ (function () {
142
142
  });
143
143
  });
144
144
  };
145
+ ReportsService.prototype.removeConfiguration = function (config) {
146
+ return __awaiter(this, void 0, void 0, function () {
147
+ var url;
148
+ return __generator(this, function (_a) {
149
+ switch (_a.label) {
150
+ case 0:
151
+ url = this.microserviceUrl + "/config/" + config.id;
152
+ return [4 /*yield*/, this.client.fetch(url, { method: 'DELETE' })];
153
+ case 1: return [2 /*return*/, _a.sent()];
154
+ }
155
+ });
156
+ });
157
+ };
145
158
  ReportsService.ctorParameters = function () { return [
146
159
  { type: AlertService },
147
160
  { type: InventoryService },
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-reports.js","sources":["ng://@c8y/ngx-components/reports/reports.service.ts","ng://@c8y/ngx-components/reports/export-schedules.interface.ts","ng://@c8y/ngx-components/reports/cron.service.ts","ng://@c8y/ngx-components/reports/schedule-modal.component.ts","ng://@c8y/ngx-components/reports/export-schedules.component.ts","ng://@c8y/ngx-components/reports/cron.component.ts","ng://@c8y/ngx-components/reports/reports.module.ts","ng://@c8y/ngx-components/reports/ng1/downgraded.components.ts","ng://@c8y/ngx-components/reports/ng1/downgraded.services.ts","ng://@c8y/ngx-components/reports/ng1/index.ts","ng://@c8y/ngx-components/reports/c8y-ngx-components-reports.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Export, Schedule } from './export-schedules.interface';\nimport { AlertService } from '@c8y/ngx-components';\nimport { orderBy, isEqual, remove, some } from 'lodash-es';\nimport { InventoryService, IdReference } from '@c8y/client';\nimport { FetchClient, IFetchOptions } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components';\n\n@Injectable()\nexport class ReportsService {\n microserviceUrl: string;\n headers: any;\n\n constructor(\n private alertService: AlertService,\n private inventoryService: InventoryService,\n private client: FetchClient\n ) {\n this.microserviceUrl = '/service/reporting/schedule';\n this.headers = { 'Content-Type': 'application/json' };\n }\n\n async getExport(exportId: IdReference) {\n let exp: Export;\n const exportDetail = await this.inventoryService.detail(exportId);\n const { data, res } = exportDetail;\n if (res.status !== 200) {\n this.alertService.addServerFailure({ data, res });\n } else {\n exp = data ? ((data as unknown) as Export) : ({} as Export);\n }\n\n return exp;\n }\n\n async getScheduleList(exportId: IdReference) {\n const exp = await this.getExport(exportId);\n\n return this.extractScheduleListFromExport(exp);\n }\n\n extractScheduleListFromExport(exp: Export) {\n let scheduleList: Schedule[];\n if (exp) {\n scheduleList = exp.c8y_ScheduleConfiguration ? exp.c8y_ScheduleConfiguration : [];\n }\n return orderBy(scheduleList, ['timestamp'], ['desc']);\n }\n\n async addSchedule(schedule: Schedule, exportId: IdReference) {\n return await this.updateSchedules(exportId, [], [schedule]);\n }\n\n async updateSchedule(oldSchedule: Schedule, schedule: Schedule, exportId: IdReference) {\n return await this.updateSchedules(exportId, [oldSchedule], [schedule]);\n }\n\n async updateSchedules(\n exportId: IdReference,\n schedulesToRemove: Schedule[] = [],\n schedulesToAdd: Schedule[] = []\n ) {\n let success: boolean = false;\n const exp = await this.getExport(exportId);\n const schedules = this.extractScheduleListFromExport(exp);\n\n remove(schedules, (schedule: Schedule) =>\n some(schedulesToRemove, (scheduleToRemove: Schedule) => isEqual(schedule, scheduleToRemove))\n );\n schedules.push.apply(schedules, schedulesToAdd);\n exp.c8y_ScheduleConfiguration = schedules;\n const { data, res } = await this.inventoryService.update(exp);\n if (res.status === 200) {\n success = await this.reschedule(exportId);\n } else {\n this.alertService.addServerFailure({ data, res });\n }\n\n return success;\n }\n\n async reschedule(exportId: IdReference) {\n const options: IFetchOptions = {\n method: 'PUT',\n headers: this.headers\n };\n const rescheduling = await this.client.fetch(`${this.microserviceUrl}/${exportId}`, options);\n return rescheduling.status === 200;\n }\n\n async deleteSchedule(schedule: Schedule, exportId: IdReference) {\n return await this.updateSchedules(exportId, [schedule], []);\n }\n}\n","import { IManagedObject } from '@c8y/client';\n\nexport interface Export extends IManagedObject {\n c8y_ScheduleConfiguration: Schedule[];\n}\n\nexport interface Schedule {\n timestamp: number;\n emailConfig: EmailConfig;\n cronConfig: CronConfig;\n}\n\nexport interface EmailConfig {\n to: string[];\n cc: string[];\n bcc: string[];\n replyTo: string;\n text: string;\n subject: string;\n}\n\nexport interface CronConfig {\n month: string;\n hour: string;\n weekday: string;\n day: string;\n minute: string;\n}\n\nexport interface EmittedCron {\n cron: string;\n valid: boolean;\n}\n\nexport interface EmitterPayload {\n success: boolean;\n message: string;\n schedule: Schedule;\n}\n\nexport enum ActionType {\n CREATE = 'create',\n EDIT = 'edit',\n DUPLICATE = 'duplicate'\n}\n\nexport enum Base {\n Initial = 1,\n Hour,\n Day,\n Week,\n Month,\n Year\n}\n","import { Injectable } from '@angular/core';\nimport { CronConfig, Base } from './export-schedules.interface';\nimport { TranslateService } from '@ngx-translate/core';\nimport { formatDate } from '@angular/common';\nimport { gettext } from '@c8y/ngx-components';\n\n@Injectable()\nexport class CronService {\n daysOfWeekPosix: any[] = [];\n daysOfMonth = [\n { value: '1', label: '1.' },\n { value: '2', label: '2.' },\n { value: '3', label: '3.' },\n { value: '4', label: '4.' },\n { value: '5', label: '5.' },\n { value: '6', label: '6.' },\n { value: '7', label: '7.' },\n { value: '8', label: '8.' },\n { value: '9', label: '9.' },\n { value: '10', label: '10.' },\n { value: '11', label: '11.' },\n { value: '12', label: '12.' },\n { value: '13', label: '13.' },\n { value: '14', label: '14.' },\n { value: '15', label: '15.' },\n { value: '16', label: '16.' },\n { value: '17', label: '17.' },\n { value: '18', label: '18.' },\n { value: '19', label: '19.' },\n { value: '20', label: '20.' },\n { value: '21', label: '21.' },\n { value: '22', label: '22.' },\n { value: '23', label: '23.' },\n { value: '24', label: '24.' },\n { value: '25', label: '25.' },\n { value: '26', label: '26.' },\n { value: '27', label: '27.' },\n { value: '28', label: '28.' },\n { value: '29', label: '29.' },\n { value: '30', label: '30.' },\n { value: '31', label: '31.' }\n ];\n months: any[] = [];\n hours: any[] = [];\n minutes: any[] = [];\n intervals = [\n { value: 2, label: gettext('Hour') },\n { value: 3, label: gettext('Day') },\n { value: 4, label: gettext('Week') },\n { value: 5, label: gettext('Month') },\n { value: 6, label: gettext('Year') }\n ];\n constructor(private translateService: TranslateService) {\n for (let x = 0; x < 24; x++) {\n this.hours.push({ value: x.toString(), label: `${x}` });\n }\n for (let x = 0; x < 60; x = x + 5) {\n this.minutes.push({ value: x.toString(), label: `${x}` });\n }\n\n for (let x = 0; x < 7; x++) {\n this.daysOfWeekPosix.push({\n value: x.toString(),\n label: this.getWeekDayName(({ weekday: x } as unknown) as CronConfig)\n });\n }\n\n for (let x = 1; x < 13; x++) {\n this.months.push({\n value: x.toString(),\n label: this.getMonthName(({ month: x } as unknown) as CronConfig)\n });\n }\n }\n\n generateCron(cronConfig: CronConfig) {\n let cron: string = '';\n cron = cronConfig.minute ? `${cronConfig.minute}` : '*';\n cron += cronConfig.hour ? ` ${cronConfig.hour}` : ' *';\n cron += cronConfig.day ? ` ${cronConfig.day}` : ' *';\n cron += cronConfig.month ? ` ${cronConfig.month}` : ' *';\n cron += cronConfig.weekday ? ` ${cronConfig.weekday}` : ' *';\n\n return cron;\n }\n\n generateCronConfig(cron: string) {\n const parts = cron.split(/\\s+/);\n const cronConfig: CronConfig = {\n minute: parts[0],\n hour: parts[1],\n day: parts[2],\n month: parts[3],\n weekday: parts[4]\n };\n\n return cronConfig;\n }\n\n getBase(cronConfig: CronConfig) {\n let base: Base = Base.Initial;\n\n if (\n cronConfig.minute !== '*' &&\n cronConfig.hour === '*' &&\n cronConfig.day === '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Hour;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day === '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Day;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day === '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday !== '*'\n ) {\n base = Base.Week;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day !== '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Month;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day !== '*' &&\n cronConfig.month !== '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Year;\n } else {\n // cronConfig invalid\n }\n\n return base;\n }\n\n validateModels(base: Base, cronConfig: CronConfig) {\n let valid: boolean;\n switch (base) {\n case Base.Initial: // Please select\n valid = false;\n break;\n case Base.Hour:\n if (cronConfig.minute !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Day:\n if (cronConfig.minute !== '*' && cronConfig.hour !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Week:\n if (cronConfig.minute !== '*' && cronConfig.hour !== '*' && cronConfig.weekday !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Month:\n if (cronConfig.minute !== '*' && cronConfig.hour !== '*' && cronConfig.day !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Year:\n if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day !== '*' &&\n cronConfig.month !== '*'\n ) {\n valid = true;\n } else {\n valid = false;\n }\n break;\n default:\n valid = false;\n }\n\n return valid;\n }\n\n clearNextModels(base: Base, cronConfig: CronConfig) {\n if (base === Base.Initial) {\n // please select, delete all\n // cron expression: every minute at second 0\n cronConfig.minute = '*';\n cronConfig.hour = '*';\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Hour) {\n // hour, don't delete minutes\n // cron expression: every hour, at whatever minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = '*';\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Day) {\n // day, don't delete minutes and hours\n // cron expression: every day of every month, at whatever hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Week) {\n // week, delete month and day\n // cron expression: every month, at whatever weekday, hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = cronConfig.weekday === '*' || cronConfig.weekday === '?' ? this.daysOfWeekPosix[0].value : cronConfig.weekday ;\n } else if (base === Base.Month) {\n // month, delete month and weekday\n // cron expression: every month, at whatever day of month, hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = cronConfig.day === '*' ? this.daysOfMonth[0].value : cronConfig.day;\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Year) {\n // year, delete weekday\n // cron expression: every year, at whatever month, day of month, hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = cronConfig.day === '*' ? this.daysOfMonth[0].value : cronConfig.day;\n cronConfig.month = cronConfig.month === '*' ? this.months[0].value : cronConfig.month;\n cronConfig.weekday = '*';\n }\n }\n\n getWeekDayName(cronConfig: CronConfig) {\n const date = new Date(0);\n const firstSundayDate = date.getDate() + 3; // because we know date 0 was on Thursday...\n date.setDate(firstSundayDate + parseInt(cronConfig.weekday, 10));\n return formatDate(date, 'EEEE', this.translateService.currentLang);\n }\n\n getMonthDayName(cronConfig: CronConfig) {\n let name = '';\n this.daysOfMonth.forEach(item => {\n if (item.value === cronConfig.day) {\n name = item.label;\n }\n });\n\n return name;\n }\n\n getMonthName(cronConfig: CronConfig) {\n const date = new Date(0);\n date.setMonth(parseInt(cronConfig.month, 10) - 1);\n return formatDate(date, 'LLLL', this.translateService.currentLang);\n }\n}\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\nimport { Schedule, ActionType } from './export-schedules.interface';\nimport { EmittedCron, EmitterPayload } from './export-schedules.interface';\nimport { CronService } from './cron.service';\nimport { cloneDeep } from 'lodash-es';\nimport { gettext } from '@c8y/ngx-components';\nimport { ReportsService } from './reports.service';\n\n@Component({\n selector: 'schedule-modal',\n templateUrl: './schedule-modal.component.html'\n})\nexport class ScheduleModalComponent implements OnInit {\n schedule: Schedule;\n oldSchedule: Schedule;\n @Output() emitter: EventEmitter<EmitterPayload> = new EventEmitter();\n exportId: number;\n actionType: ActionType;\n ActionType = ActionType;\n cronExpression: string = '* * * * *';\n validCron: boolean = false;\n emitterPayload: EmitterPayload = {\n success: false,\n message: '',\n schedule: { timestamp: undefined, emailConfig: undefined, cronConfig: undefined }\n };\n\n emailTo: string;\n emailCc: string;\n emailBcc: string;\n emailReplyTo: string;\n emailSubject: string;\n emailText: string;\n\n placeholdersInfo = gettext(\n 'Available placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to downloadable file is: {tenant-domain}/inventory/binaries/{binaryId}.'\n );\n\n constructor(\n public reportsService: ReportsService,\n public modalRef: BsModalRef,\n private cronService: CronService\n ) {}\n\n ngOnInit() {\n this.oldSchedule = cloneDeep(this.schedule);\n this.populateEmailFieldsFromSchedule(this.schedule);\n this.cronExpression = this.cronService.generateCron(this.schedule.cronConfig);\n this.validCron = this.cronService.validateModels(\n this.cronService.getBase(this.schedule.cronConfig),\n this.schedule.cronConfig\n );\n }\n\n populateEmailFieldsFromSchedule(schedule: Schedule) {\n if (schedule.emailConfig.to && schedule.emailConfig.to.length) {\n this.emailTo = schedule.emailConfig.to.toString();\n }\n if (schedule.emailConfig.cc && schedule.emailConfig.cc.length) {\n this.emailCc = schedule.emailConfig.cc.toString();\n }\n if (schedule.emailConfig.bcc && schedule.emailConfig.bcc.length) {\n this.emailBcc = schedule.emailConfig.bcc.toString();\n }\n if (schedule.emailConfig.replyTo) {\n this.emailReplyTo = schedule.emailConfig.replyTo;\n }\n if (schedule.emailConfig.subject) {\n this.emailSubject = schedule.emailConfig.subject;\n }\n if (schedule.emailConfig.text) {\n this.emailText = schedule.emailConfig.text;\n }\n }\n\n save() {\n this.populateScheduleFromCronExpression();\n this.populateScheduleFromEmailFields();\n if (this.actionType === ActionType.CREATE || this.actionType === ActionType.DUPLICATE) {\n const date = new Date();\n const timestamp = date.getTime();\n this.schedule.timestamp = timestamp;\n }\n this.emitterPayload.success = true;\n this.emitterPayload.schedule = this.schedule;\n this.modalRef.hide();\n // signal to the parent component to update list\n this.emitter.emit(this.emitterPayload);\n }\n\n cancel() {\n this.modalRef.hide();\n }\n\n getCron(cron: EmittedCron) {\n this.validCron = cron.valid;\n if (cron.valid) {\n this.cronExpression = cron.cron;\n }\n }\n\n populateScheduleFromCronExpression() {\n this.schedule.cronConfig = this.cronService.generateCronConfig(this.cronExpression);\n }\n\n convertStringOfEmailsToArray(stringOfEmails: string) {\n const arr = [];\n if (stringOfEmails) {\n const parts = stringOfEmails.split(',');\n parts.forEach(item => {\n if (item) {\n arr.push(item);\n }\n });\n }\n return arr;\n }\n\n populateScheduleFromEmailFields() {\n this.schedule.emailConfig.to = this.emailTo\n ? this.convertStringOfEmailsToArray(this.emailTo)\n : null;\n this.schedule.emailConfig.cc = this.emailCc\n ? this.convertStringOfEmailsToArray(this.emailCc)\n : null;\n this.schedule.emailConfig.bcc = this.emailBcc\n ? this.convertStringOfEmailsToArray(this.emailBcc)\n : null;\n this.schedule.emailConfig.replyTo = this.emailReplyTo;\n this.schedule.emailConfig.subject = this.emailSubject;\n this.schedule.emailConfig.text = this.emailText;\n }\n}\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';\nimport { Export, Schedule, EmitterPayload, ActionType } from './export-schedules.interface';\nimport { ReportsService } from './reports.service';\nimport { BsModalService, BsModalRef, ModalOptions } from 'ngx-bootstrap/modal';\nimport { ScheduleModalComponent } from './schedule-modal.component';\nimport { ConfirmModalComponent, Status, gettext, OptionsService } from '@c8y/ngx-components';\nimport { cloneDeep } from 'lodash-es';\nimport { CronService } from './cron.service';\nimport { IdReference } from '@c8y/client';\nimport { TranslateService } from '@ngx-translate/core';\nimport { UserService } from '@c8y/client';\n@Component({\n selector: 'export-schedules',\n templateUrl: './export-schedules.component.html'\n})\nexport class ExportSchedulesComponent implements OnInit, OnChanges {\n @Input() set exportId(exportId: IdReference) {\n this._exportId = exportId;\n }\n\n @Output() onSchedulesUpdate = new EventEmitter<Schedule[]>();\n\n exp: Export;\n scheduleList: Schedule[] = [];\n initialSchedule: Schedule = {\n timestamp: null,\n emailConfig: {\n to: [],\n cc: [],\n bcc: [],\n replyTo: '',\n text: '',\n subject: ''\n },\n cronConfig: {\n minute: '0',\n hour: '0',\n day: '1',\n month: '1',\n weekday: '?'\n }\n };\n buttonLabels: any;\n listClass: string = 'interact-list';\n loadingStatus: any;\n sortType: string;\n sortReverse: boolean = false;\n isOpen: any = {};\n isFlipped: boolean;\n isEditMenuOpen: boolean = false;\n modalRef: BsModalRef;\n currentUserEmail: string = '';\n hasRequiredRole: boolean = false;\n private _exportId: IdReference;\n private defaultExportEmailTemplate = this.translateService.instant(\n gettext(\n 'File with exported data can be downloaded from {tenant-domain}/inventory/binaries/{binaryId}.'\n )\n );\n\n constructor(\n private reportsService: ReportsService,\n private bsModalService: BsModalService,\n public cronService: CronService,\n private translateService: TranslateService,\n private userService: UserService,\n private optionsService: OptionsService\n ) {\n this.loadingStatus = {\n inProgress: false,\n done: false,\n error: false\n };\n }\n\n async ngOnInit() {\n this.hasRequiredRole = await this.checkRole();\n this.getScheduleList(true);\n const currentUserEmail = await this.getCurrentUserEmail();\n this.initialSchedule.emailConfig.text = await this.optionsService.getTenantOption(\n 'configuration',\n 'export.data.mail.text',\n this.defaultExportEmailTemplate);\n this.initialSchedule.emailConfig.to = currentUserEmail;\n this.exp = await this.reportsService.getExport(this._exportId);\n this.initialSchedule.emailConfig.subject = this.translateService.instant(\n gettext('Export of \"{{expName}}\"'),\n { expName: this.exp.name }\n );\n }\n\n ngOnChanges() {\n this.translateButtonTitles();\n }\n\n translateButtonTitles() {\n this.buttonLabels = {\n edit: this.translateService.instant(gettext('Edit schedule')),\n editNoPermission: this.translateService.instant(gettext('Edit schedule - no permissions')),\n duplicate: this.translateService.instant(gettext('Duplicate schedule')),\n duplicateNoPermission: this.translateService.instant(gettext('Duplicate schedule - no permissions')),\n delete: this.translateService.instant(gettext('Delete schedule')),\n deleteNoPermission: this.translateService.instant(gettext('Delete schedule - no permissions'))\n };\n }\n\n async getCurrentUserEmail() {\n const { data } = await this.userService.current();\n return data && data.email ? [data.email] : [];\n }\n async checkRole() {\n const { data } = await this.userService.current();\n const role = 'ROLE_SCHEDULE_REPORT_ADMIN';\n const hasRole = this.userService.hasRole(data, role);\n return hasRole;\n }\n\n async getScheduleList(withProgress: boolean) {\n if (withProgress) {\n this.loadingStatus.inProgress = true;\n }\n this.scheduleList = await this.reportsService.getScheduleList(this._exportId);\n if (withProgress) {\n this.loadingStatus.inProgress = false;\n }\n }\n\n addSchedule() {\n this.openAddEditModal(this._exportId, this.initialSchedule, ActionType.CREATE);\n }\n\n editSchedule(schedule: Schedule, index: number, event: any) {\n if (this.hasRequiredRole) {\n event.preventDefault();\n this.openAddEditModal(this._exportId, schedule, ActionType.EDIT, index);\n }\n }\n\n duplicateSchedule(schedule: Schedule, event: any) {\n event.preventDefault();\n this.openAddEditModal(this._exportId, schedule, ActionType.DUPLICATE);\n }\n\n openAddEditModal(exportId: IdReference, schedule: Schedule, actionType: ActionType, index?: number) {\n const payload = { actionType, exportId, schedule: cloneDeep(schedule) };\n const modalOptions = { class: 'modal-sm', initialState: payload } as ModalOptions;\n this.modalRef = this.bsModalService.show(ScheduleModalComponent, modalOptions);\n this.modalRef.content.emitter.subscribe((load: EmitterPayload) =>\n this.getMessageFromModal(load, index)\n );\n }\n\n getMessageFromModal(payload: EmitterPayload, index?: number) {\n if (payload.success) {\n if (index !== undefined) {\n this.scheduleList[index] = payload.schedule;\n } else {\n this.scheduleList.push(payload.schedule);\n }\n this.onSchedulesUpdate.emit(this.scheduleList);\n }\n }\n\n removeSchedule(schedule: Schedule, index: number, event: any) {\n event.preventDefault();\n this.scheduleList.splice(index, 1);\n this.onSchedulesUpdate.emit(this.scheduleList);\n }\n}\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { EmittedCron, CronConfig, Base } from './export-schedules.interface';\nimport { CronService } from './cron.service';\n\n@Component({\n selector: 'cron',\n templateUrl: './cron.component.html'\n})\nexport class CronComponent implements OnInit {\n @Input() cronIn: string;\n @Output() emitter: EventEmitter<EmittedCron> = new EventEmitter();\n emittedCron: EmittedCron = {\n valid: false,\n cron: ''\n };\n\n base: Base = Base.Initial;\n cronConfig: CronConfig;\n\n daysOfWeekPosix: any[];\n daysOfMonth: any[];\n months: any[];\n hours: any[];\n minutes: any[];\n intervals: any[];\n\n constructor(private cronService: CronService) {\n //\n }\n\n ngOnInit() {\n this.daysOfWeekPosix = this.cronService.daysOfWeekPosix;\n this.daysOfMonth = this.cronService.daysOfMonth;\n this.months = this.cronService.months;\n this.hours = this.cronService.hours;\n this.minutes = this.cronService.minutes;\n this.intervals = this.cronService.intervals;\n\n this.cronConfig = this.cronService.generateCronConfig(this.cronIn);\n this.base = this.cronService.getBase(this.cronConfig);\n }\n\n onChangeSelect() {\n this.cronService.clearNextModels(this.base, this.cronConfig);\n this.emittedCron.valid = this.cronService.validateModels(this.base, this.cronConfig);\n this.emittedCron.cron = this.cronService.generateCron(this.cronConfig);\n this.emitter.emit(this.emittedCron);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, FormsModule } from '@c8y/ngx-components';\nimport { ReportsService } from './reports.service';\nimport { CronService } from './cron.service';\nimport { ExportSchedulesComponent } from './export-schedules.component';\nimport { ScheduleModalComponent } from './schedule-modal.component';\nimport { CronComponent } from './cron.component';\nimport { BsDropdownModule } from 'ngx-bootstrap/dropdown';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\n\n/**\n * The angular module definition for reports.\n * @exports ExportSchedulesComponent\n * @exports ScheduleModalComponent\n * @exports CronComponent\n */\n@NgModule({\n declarations: [ExportSchedulesComponent, ScheduleModalComponent, CronComponent],\n imports: [CoreModule, FormsModule, BsDropdownModule, TooltipModule],\n entryComponents: [ExportSchedulesComponent, ScheduleModalComponent, CronComponent],\n providers: [ReportsService, CronService],\n exports: [ExportSchedulesComponent, ScheduleModalComponent, CronComponent]\n})\nexport class ReportsModule {}\n","import { downgradeComponent } from '@angular/upgrade/static';\nimport { ExportSchedulesComponent } from '../export-schedules.component';\nexport const exportSchedulesComponent = downgradeComponent({\n component: ExportSchedulesComponent\n});\n","import { downgradeInjectable } from '@angular/upgrade/static';\nimport { ReportsService } from '..';\nexport const reportsService = downgradeInjectable(ReportsService);\n","import * as angular from 'angular';\nimport { registerNgModule } from '@c8y/ng1-modules/core/bootstrap';\nimport { exportSchedulesComponent } from './downgraded.components';\nimport { reportsService } from './downgraded.services';\n\nconst NAME = 'c8y.upgrade.reports';\n\nconst angularJsModule = angular\n .module(NAME, [])\n .directive('c8yExportSchedules', exportSchedulesComponent)\n .service('c8yReportsService', reportsService);\n\nexport const ng1Modules = [NAME];\n\nregisterNgModule(ng1Modules);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tslib_1.__decorate","angular\n .module"],"mappings":";;;;;;;;;;;;;;;IAaE,wBACU,YAA0B,EAC1B,gBAAkC,EAClC,MAAmB;QAFnB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,WAAM,GAAN,MAAM,CAAa;QAE3B,IAAI,CAAC,eAAe,GAAG,6BAA6B,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;KACvD;IAEK,kCAAS,GAAf,UAAgB,QAAqB;;;;;4BAEd,qBAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAA;;wBAA3D,YAAY,GAAG,SAA4C;wBACzD,IAAI,GAAU,YAAY,KAAtB,EAAE,GAAG,GAAK,YAAY,IAAjB,CAAkB;wBACnC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;4BACtB,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,IAAI,MAAA,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC;yBACnD;6BAAM;4B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AClF,SAAS,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC;YACxC,OAAO,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,EAAE,aAAa,CAAC;SAC3E,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACrBO,IAAM,wBAAwB,GAAG,kBAAkB,CAAC;IACzD,SAAS,EAAE,wBAAwB;CACpC,CAAC,CAAC;;ACFI,IAAM,cAAc,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;;ACGlE,IAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC,IAAM,eAAe,GAAGC,MACf,CAAC,IAAI,EAAE,EAAE,CAAC;KAChB,SAAS,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;KACzD,OAAO,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;AAEhD,IAAa,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;AAEjC,gBAAgB,CAAC,UAAU,CAAC,CAAC;;ACd7B;;GAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-reports.js","sources":["ng://@c8y/ngx-components/reports/reports.service.ts","ng://@c8y/ngx-components/reports/export-schedules.interface.ts","ng://@c8y/ngx-components/reports/cron.service.ts","ng://@c8y/ngx-components/reports/schedule-modal.component.ts","ng://@c8y/ngx-components/reports/export-schedules.component.ts","ng://@c8y/ngx-components/reports/cron.component.ts","ng://@c8y/ngx-components/reports/reports.module.ts","ng://@c8y/ngx-components/reports/ng1/downgraded.components.ts","ng://@c8y/ngx-components/reports/ng1/downgraded.services.ts","ng://@c8y/ngx-components/reports/ng1/index.ts","ng://@c8y/ngx-components/reports/c8y-ngx-components-reports.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Export, Schedule } from './export-schedules.interface';\nimport { AlertService } from '@c8y/ngx-components';\nimport { orderBy, isEqual, remove, some } from 'lodash-es';\nimport {InventoryService, IdReference, IManagedObject, IFetchResponse, IIdentified} from '@c8y/client';\nimport { FetchClient, IFetchOptions } from '@c8y/client';\n\n@Injectable()\nexport class ReportsService {\n microserviceUrl: string;\n headers: any;\n\n constructor(\n private alertService: AlertService,\n private inventoryService: InventoryService,\n private client: FetchClient\n ) {\n this.microserviceUrl = '/service/reporting';\n this.headers = { 'Content-Type': 'application/json' };\n }\n\n async getExport(exportId: IdReference) {\n let exp: Export;\n const exportDetail = await this.inventoryService.detail(exportId);\n const { data, res } = exportDetail;\n if (res.status !== 200) {\n this.alertService.addServerFailure({ data, res });\n } else {\n exp = data ? ((data as unknown) as Export) : ({} as Export);\n }\n\n return exp;\n }\n\n async getScheduleList(exportId: IdReference) {\n const exp = await this.getExport(exportId);\n\n return this.extractScheduleListFromExport(exp);\n }\n\n extractScheduleListFromExport(exp: Export) {\n let scheduleList: Schedule[];\n if (exp) {\n scheduleList = exp.c8y_ScheduleConfiguration ? exp.c8y_ScheduleConfiguration : [];\n }\n return orderBy(scheduleList, ['timestamp'], ['desc']);\n }\n\n async addSchedule(schedule: Schedule, exportId: IdReference) {\n return await this.updateSchedules(exportId, [], [schedule]);\n }\n\n async updateSchedule(oldSchedule: Schedule, schedule: Schedule, exportId: IdReference) {\n return await this.updateSchedules(exportId, [oldSchedule], [schedule]);\n }\n\n async updateSchedules(\n exportId: IdReference,\n schedulesToRemove: Schedule[] = [],\n schedulesToAdd: Schedule[] = []\n ) {\n let success: boolean = false;\n const exp = await this.getExport(exportId);\n const schedules = this.extractScheduleListFromExport(exp);\n\n remove(schedules, (schedule: Schedule) =>\n some(schedulesToRemove, (scheduleToRemove: Schedule) => isEqual(schedule, scheduleToRemove))\n );\n schedules.push.apply(schedules, schedulesToAdd);\n exp.c8y_ScheduleConfiguration = schedules;\n const { data, res } = await this.inventoryService.update(exp);\n if (res.status === 200) {\n success = await this.reschedule(exportId);\n } else {\n this.alertService.addServerFailure({ data, res });\n }\n\n return success;\n }\n\n async reschedule(exportId: IdReference) {\n const options: IFetchOptions = {\n method: 'PUT',\n headers: this.headers\n };\n const rescheduling = await this.client.fetch(`${this.microserviceUrl}/schedule/${exportId}`, options);\n return rescheduling.status === 200;\n }\n\n async deleteSchedule(schedule: Schedule, exportId: IdReference) {\n return await this.updateSchedules(exportId, [schedule], []);\n }\n\n async removeConfiguration(config: IIdentified): Promise<IFetchResponse> {\n const url = `${this.microserviceUrl}/config/${config.id}`;\n return await this.client.fetch(url, { method: 'DELETE' });\n }\n}\n","import { IManagedObject } from '@c8y/client';\n\nexport interface Export extends IManagedObject {\n c8y_ScheduleConfiguration: Schedule[];\n}\n\nexport interface Schedule {\n timestamp: number;\n emailConfig: EmailConfig;\n cronConfig: CronConfig;\n}\n\nexport interface EmailConfig {\n to: string[];\n cc: string[];\n bcc: string[];\n replyTo: string;\n text: string;\n subject: string;\n}\n\nexport interface CronConfig {\n month: string;\n hour: string;\n weekday: string;\n day: string;\n minute: string;\n}\n\nexport interface EmittedCron {\n cron: string;\n valid: boolean;\n}\n\nexport interface EmitterPayload {\n success: boolean;\n message: string;\n schedule: Schedule;\n}\n\nexport enum ActionType {\n CREATE = 'create',\n EDIT = 'edit',\n DUPLICATE = 'duplicate'\n}\n\nexport enum Base {\n Initial = 1,\n Hour,\n Day,\n Week,\n Month,\n Year\n}\n","import { Injectable } from '@angular/core';\nimport { CronConfig, Base } from './export-schedules.interface';\nimport { TranslateService } from '@ngx-translate/core';\nimport { formatDate } from '@angular/common';\nimport { gettext } from '@c8y/ngx-components';\n\n@Injectable()\nexport class CronService {\n daysOfWeekPosix: any[] = [];\n daysOfMonth = [\n { value: '1', label: '1.' },\n { value: '2', label: '2.' },\n { value: '3', label: '3.' },\n { value: '4', label: '4.' },\n { value: '5', label: '5.' },\n { value: '6', label: '6.' },\n { value: '7', label: '7.' },\n { value: '8', label: '8.' },\n { value: '9', label: '9.' },\n { value: '10', label: '10.' },\n { value: '11', label: '11.' },\n { value: '12', label: '12.' },\n { value: '13', label: '13.' },\n { value: '14', label: '14.' },\n { value: '15', label: '15.' },\n { value: '16', label: '16.' },\n { value: '17', label: '17.' },\n { value: '18', label: '18.' },\n { value: '19', label: '19.' },\n { value: '20', label: '20.' },\n { value: '21', label: '21.' },\n { value: '22', label: '22.' },\n { value: '23', label: '23.' },\n { value: '24', label: '24.' },\n { value: '25', label: '25.' },\n { value: '26', label: '26.' },\n { value: '27', label: '27.' },\n { value: '28', label: '28.' },\n { value: '29', label: '29.' },\n { value: '30', label: '30.' },\n { value: '31', label: '31.' }\n ];\n months: any[] = [];\n hours: any[] = [];\n minutes: any[] = [];\n intervals = [\n { value: 2, label: gettext('Hour') },\n { value: 3, label: gettext('Day') },\n { value: 4, label: gettext('Week') },\n { value: 5, label: gettext('Month') },\n { value: 6, label: gettext('Year') }\n ];\n constructor(private translateService: TranslateService) {\n for (let x = 0; x < 24; x++) {\n this.hours.push({ value: x.toString(), label: `${x}` });\n }\n for (let x = 0; x < 60; x = x + 5) {\n this.minutes.push({ value: x.toString(), label: `${x}` });\n }\n\n for (let x = 0; x < 7; x++) {\n this.daysOfWeekPosix.push({\n value: x.toString(),\n label: this.getWeekDayName(({ weekday: x } as unknown) as CronConfig)\n });\n }\n\n for (let x = 1; x < 13; x++) {\n this.months.push({\n value: x.toString(),\n label: this.getMonthName(({ month: x } as unknown) as CronConfig)\n });\n }\n }\n\n generateCron(cronConfig: CronConfig) {\n let cron: string = '';\n cron = cronConfig.minute ? `${cronConfig.minute}` : '*';\n cron += cronConfig.hour ? ` ${cronConfig.hour}` : ' *';\n cron += cronConfig.day ? ` ${cronConfig.day}` : ' *';\n cron += cronConfig.month ? ` ${cronConfig.month}` : ' *';\n cron += cronConfig.weekday ? ` ${cronConfig.weekday}` : ' *';\n\n return cron;\n }\n\n generateCronConfig(cron: string) {\n const parts = cron.split(/\\s+/);\n const cronConfig: CronConfig = {\n minute: parts[0],\n hour: parts[1],\n day: parts[2],\n month: parts[3],\n weekday: parts[4]\n };\n\n return cronConfig;\n }\n\n getBase(cronConfig: CronConfig) {\n let base: Base = Base.Initial;\n\n if (\n cronConfig.minute !== '*' &&\n cronConfig.hour === '*' &&\n cronConfig.day === '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Hour;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day === '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Day;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day === '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday !== '*'\n ) {\n base = Base.Week;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day !== '*' &&\n cronConfig.month === '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Month;\n } else if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day !== '*' &&\n cronConfig.month !== '*' &&\n cronConfig.weekday === '*'\n ) {\n base = Base.Year;\n } else {\n // cronConfig invalid\n }\n\n return base;\n }\n\n validateModels(base: Base, cronConfig: CronConfig) {\n let valid: boolean;\n switch (base) {\n case Base.Initial: // Please select\n valid = false;\n break;\n case Base.Hour:\n if (cronConfig.minute !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Day:\n if (cronConfig.minute !== '*' && cronConfig.hour !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Week:\n if (cronConfig.minute !== '*' && cronConfig.hour !== '*' && cronConfig.weekday !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Month:\n if (cronConfig.minute !== '*' && cronConfig.hour !== '*' && cronConfig.day !== '*') {\n valid = true;\n } else {\n valid = false;\n }\n break;\n case Base.Year:\n if (\n cronConfig.minute !== '*' &&\n cronConfig.hour !== '*' &&\n cronConfig.day !== '*' &&\n cronConfig.month !== '*'\n ) {\n valid = true;\n } else {\n valid = false;\n }\n break;\n default:\n valid = false;\n }\n\n return valid;\n }\n\n clearNextModels(base: Base, cronConfig: CronConfig) {\n if (base === Base.Initial) {\n // please select, delete all\n // cron expression: every minute at second 0\n cronConfig.minute = '*';\n cronConfig.hour = '*';\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Hour) {\n // hour, don't delete minutes\n // cron expression: every hour, at whatever minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = '*';\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Day) {\n // day, don't delete minutes and hours\n // cron expression: every day of every month, at whatever hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Week) {\n // week, delete month and day\n // cron expression: every month, at whatever weekday, hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = '*';\n cronConfig.month = '*';\n cronConfig.weekday = cronConfig.weekday === '*' || cronConfig.weekday === '?' ? this.daysOfWeekPosix[0].value : cronConfig.weekday ;\n } else if (base === Base.Month) {\n // month, delete month and weekday\n // cron expression: every month, at whatever day of month, hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = cronConfig.day === '*' ? this.daysOfMonth[0].value : cronConfig.day;\n cronConfig.month = '*';\n cronConfig.weekday = '*';\n } else if (base === Base.Year) {\n // year, delete weekday\n // cron expression: every year, at whatever month, day of month, hour and minute, at second 0\n cronConfig.minute = cronConfig.minute === '*' ? this.minutes[0].value : cronConfig.minute;\n cronConfig.hour = cronConfig.hour === '*' ? this.hours[0].value : cronConfig.hour;\n cronConfig.day = cronConfig.day === '*' ? this.daysOfMonth[0].value : cronConfig.day;\n cronConfig.month = cronConfig.month === '*' ? this.months[0].value : cronConfig.month;\n cronConfig.weekday = '*';\n }\n }\n\n getWeekDayName(cronConfig: CronConfig) {\n const date = new Date(0);\n const firstSundayDate = date.getDate() + 3; // because we know date 0 was on Thursday...\n date.setDate(firstSundayDate + parseInt(cronConfig.weekday, 10));\n return formatDate(date, 'EEEE', this.translateService.currentLang);\n }\n\n getMonthDayName(cronConfig: CronConfig) {\n let name = '';\n this.daysOfMonth.forEach(item => {\n if (item.value === cronConfig.day) {\n name = item.label;\n }\n });\n\n return name;\n }\n\n getMonthName(cronConfig: CronConfig) {\n const date = new Date(0);\n date.setMonth(parseInt(cronConfig.month, 10) - 1);\n return formatDate(date, 'LLLL', this.translateService.currentLang);\n }\n}\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\nimport { Schedule, ActionType } from './export-schedules.interface';\nimport { EmittedCron, EmitterPayload } from './export-schedules.interface';\nimport { CronService } from './cron.service';\nimport { cloneDeep } from 'lodash-es';\nimport { gettext } from '@c8y/ngx-components';\nimport { ReportsService } from './reports.service';\n\n@Component({\n selector: 'schedule-modal',\n templateUrl: './schedule-modal.component.html'\n})\nexport class ScheduleModalComponent implements OnInit {\n schedule: Schedule;\n oldSchedule: Schedule;\n @Output() emitter: EventEmitter<EmitterPayload> = new EventEmitter();\n exportId: number;\n actionType: ActionType;\n ActionType = ActionType;\n cronExpression: string = '* * * * *';\n validCron: boolean = false;\n emitterPayload: EmitterPayload = {\n success: false,\n message: '',\n schedule: { timestamp: undefined, emailConfig: undefined, cronConfig: undefined }\n };\n\n emailTo: string;\n emailCc: string;\n emailBcc: string;\n emailReplyTo: string;\n emailSubject: string;\n emailText: string;\n\n placeholdersInfo = gettext(\n 'Available placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to downloadable file is: {tenant-domain}/inventory/binaries/{binaryId}.'\n );\n\n constructor(\n public reportsService: ReportsService,\n public modalRef: BsModalRef,\n private cronService: CronService\n ) {}\n\n ngOnInit() {\n this.oldSchedule = cloneDeep(this.schedule);\n this.populateEmailFieldsFromSchedule(this.schedule);\n this.cronExpression = this.cronService.generateCron(this.schedule.cronConfig);\n this.validCron = this.cronService.validateModels(\n this.cronService.getBase(this.schedule.cronConfig),\n this.schedule.cronConfig\n );\n }\n\n populateEmailFieldsFromSchedule(schedule: Schedule) {\n if (schedule.emailConfig.to && schedule.emailConfig.to.length) {\n this.emailTo = schedule.emailConfig.to.toString();\n }\n if (schedule.emailConfig.cc && schedule.emailConfig.cc.length) {\n this.emailCc = schedule.emailConfig.cc.toString();\n }\n if (schedule.emailConfig.bcc && schedule.emailConfig.bcc.length) {\n this.emailBcc = schedule.emailConfig.bcc.toString();\n }\n if (schedule.emailConfig.replyTo) {\n this.emailReplyTo = schedule.emailConfig.replyTo;\n }\n if (schedule.emailConfig.subject) {\n this.emailSubject = schedule.emailConfig.subject;\n }\n if (schedule.emailConfig.text) {\n this.emailText = schedule.emailConfig.text;\n }\n }\n\n save() {\n this.populateScheduleFromCronExpression();\n this.populateScheduleFromEmailFields();\n if (this.actionType === ActionType.CREATE || this.actionType === ActionType.DUPLICATE) {\n const date = new Date();\n const timestamp = date.getTime();\n this.schedule.timestamp = timestamp;\n }\n this.emitterPayload.success = true;\n this.emitterPayload.schedule = this.schedule;\n this.modalRef.hide();\n // signal to the parent component to update list\n this.emitter.emit(this.emitterPayload);\n }\n\n cancel() {\n this.modalRef.hide();\n }\n\n getCron(cron: EmittedCron) {\n this.validCron = cron.valid;\n if (cron.valid) {\n this.cronExpression = cron.cron;\n }\n }\n\n populateScheduleFromCronExpression() {\n this.schedule.cronConfig = this.cronService.generateCronConfig(this.cronExpression);\n }\n\n convertStringOfEmailsToArray(stringOfEmails: string) {\n const arr = [];\n if (stringOfEmails) {\n const parts = stringOfEmails.split(',');\n parts.forEach(item => {\n if (item) {\n arr.push(item);\n }\n });\n }\n return arr;\n }\n\n populateScheduleFromEmailFields() {\n this.schedule.emailConfig.to = this.emailTo\n ? this.convertStringOfEmailsToArray(this.emailTo)\n : null;\n this.schedule.emailConfig.cc = this.emailCc\n ? this.convertStringOfEmailsToArray(this.emailCc)\n : null;\n this.schedule.emailConfig.bcc = this.emailBcc\n ? this.convertStringOfEmailsToArray(this.emailBcc)\n : null;\n this.schedule.emailConfig.replyTo = this.emailReplyTo;\n this.schedule.emailConfig.subject = this.emailSubject;\n this.schedule.emailConfig.text = this.emailText;\n }\n}\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';\nimport { Export, Schedule, EmitterPayload, ActionType } from './export-schedules.interface';\nimport { ReportsService } from './reports.service';\nimport { BsModalService, BsModalRef, ModalOptions } from 'ngx-bootstrap/modal';\nimport { ScheduleModalComponent } from './schedule-modal.component';\nimport { ConfirmModalComponent, Status, gettext, OptionsService } from '@c8y/ngx-components';\nimport { cloneDeep } from 'lodash-es';\nimport { CronService } from './cron.service';\nimport { IdReference } from '@c8y/client';\nimport { TranslateService } from '@ngx-translate/core';\nimport { UserService } from '@c8y/client';\n@Component({\n selector: 'export-schedules',\n templateUrl: './export-schedules.component.html'\n})\nexport class ExportSchedulesComponent implements OnInit, OnChanges {\n @Input() set exportId(exportId: IdReference) {\n this._exportId = exportId;\n }\n\n @Output() onSchedulesUpdate = new EventEmitter<Schedule[]>();\n\n exp: Export;\n scheduleList: Schedule[] = [];\n initialSchedule: Schedule = {\n timestamp: null,\n emailConfig: {\n to: [],\n cc: [],\n bcc: [],\n replyTo: '',\n text: '',\n subject: ''\n },\n cronConfig: {\n minute: '0',\n hour: '0',\n day: '1',\n month: '1',\n weekday: '?'\n }\n };\n buttonLabels: any;\n listClass: string = 'interact-list';\n loadingStatus: any;\n sortType: string;\n sortReverse: boolean = false;\n isOpen: any = {};\n isFlipped: boolean;\n isEditMenuOpen: boolean = false;\n modalRef: BsModalRef;\n currentUserEmail: string = '';\n hasRequiredRole: boolean = false;\n private _exportId: IdReference;\n private defaultExportEmailTemplate = this.translateService.instant(\n gettext(\n 'File with exported data can be downloaded from {tenant-domain}/inventory/binaries/{binaryId}.'\n )\n );\n\n constructor(\n private reportsService: ReportsService,\n private bsModalService: BsModalService,\n public cronService: CronService,\n private translateService: TranslateService,\n private userService: UserService,\n private optionsService: OptionsService\n ) {\n this.loadingStatus = {\n inProgress: false,\n done: false,\n error: false\n };\n }\n\n async ngOnInit() {\n this.hasRequiredRole = await this.checkRole();\n this.getScheduleList(true);\n const currentUserEmail = await this.getCurrentUserEmail();\n this.initialSchedule.emailConfig.text = await this.optionsService.getTenantOption(\n 'configuration',\n 'export.data.mail.text',\n this.defaultExportEmailTemplate);\n this.initialSchedule.emailConfig.to = currentUserEmail;\n this.exp = await this.reportsService.getExport(this._exportId);\n this.initialSchedule.emailConfig.subject = this.translateService.instant(\n gettext('Export of \"{{expName}}\"'),\n { expName: this.exp.name }\n );\n }\n\n ngOnChanges() {\n this.translateButtonTitles();\n }\n\n translateButtonTitles() {\n this.buttonLabels = {\n edit: this.translateService.instant(gettext('Edit schedule')),\n editNoPermission: this.translateService.instant(gettext('Edit schedule - no permissions')),\n duplicate: this.translateService.instant(gettext('Duplicate schedule')),\n duplicateNoPermission: this.translateService.instant(gettext('Duplicate schedule - no permissions')),\n delete: this.translateService.instant(gettext('Delete schedule')),\n deleteNoPermission: this.translateService.instant(gettext('Delete schedule - no permissions'))\n };\n }\n\n async getCurrentUserEmail() {\n const { data } = await this.userService.current();\n return data && data.email ? [data.email] : [];\n }\n async checkRole() {\n const { data } = await this.userService.current();\n const role = 'ROLE_SCHEDULE_REPORT_ADMIN';\n const hasRole = this.userService.hasRole(data, role);\n return hasRole;\n }\n\n async getScheduleList(withProgress: boolean) {\n if (withProgress) {\n this.loadingStatus.inProgress = true;\n }\n this.scheduleList = await this.reportsService.getScheduleList(this._exportId);\n if (withProgress) {\n this.loadingStatus.inProgress = false;\n }\n }\n\n addSchedule() {\n this.openAddEditModal(this._exportId, this.initialSchedule, ActionType.CREATE);\n }\n\n editSchedule(schedule: Schedule, index: number, event: any) {\n if (this.hasRequiredRole) {\n event.preventDefault();\n this.openAddEditModal(this._exportId, schedule, ActionType.EDIT, index);\n }\n }\n\n duplicateSchedule(schedule: Schedule, event: any) {\n event.preventDefault();\n this.openAddEditModal(this._exportId, schedule, ActionType.DUPLICATE);\n }\n\n openAddEditModal(exportId: IdReference, schedule: Schedule, actionType: ActionType, index?: number) {\n const payload = { actionType, exportId, schedule: cloneDeep(schedule) };\n const modalOptions = { class: 'modal-sm', initialState: payload } as ModalOptions;\n this.modalRef = this.bsModalService.show(ScheduleModalComponent, modalOptions);\n this.modalRef.content.emitter.subscribe((load: EmitterPayload) =>\n this.getMessageFromModal(load, index)\n );\n }\n\n getMessageFromModal(payload: EmitterPayload, index?: number) {\n if (payload.success) {\n if (index !== undefined) {\n this.scheduleList[index] = payload.schedule;\n } else {\n this.scheduleList.push(payload.schedule);\n }\n this.onSchedulesUpdate.emit(this.scheduleList);\n }\n }\n\n removeSchedule(schedule: Schedule, index: number, event: any) {\n event.preventDefault();\n this.scheduleList.splice(index, 1);\n this.onSchedulesUpdate.emit(this.scheduleList);\n }\n}\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { EmittedCron, CronConfig, Base } from './export-schedules.interface';\nimport { CronService } from './cron.service';\n\n@Component({\n selector: 'cron',\n templateUrl: './cron.component.html'\n})\nexport class CronComponent implements OnInit {\n @Input() cronIn: string;\n @Output() emitter: EventEmitter<EmittedCron> = new EventEmitter();\n emittedCron: EmittedCron = {\n valid: false,\n cron: ''\n };\n\n base: Base = Base.Initial;\n cronConfig: CronConfig;\n\n daysOfWeekPosix: any[];\n daysOfMonth: any[];\n months: any[];\n hours: any[];\n minutes: any[];\n intervals: any[];\n\n constructor(private cronService: CronService) {\n //\n }\n\n ngOnInit() {\n this.daysOfWeekPosix = this.cronService.daysOfWeekPosix;\n this.daysOfMonth = this.cronService.daysOfMonth;\n this.months = this.cronService.months;\n this.hours = this.cronService.hours;\n this.minutes = this.cronService.minutes;\n this.intervals = this.cronService.intervals;\n\n this.cronConfig = this.cronService.generateCronConfig(this.cronIn);\n this.base = this.cronService.getBase(this.cronConfig);\n }\n\n onChangeSelect() {\n this.cronService.clearNextModels(this.base, this.cronConfig);\n this.emittedCron.valid = this.cronService.validateModels(this.base, this.cronConfig);\n this.emittedCron.cron = this.cronService.generateCron(this.cronConfig);\n this.emitter.emit(this.emittedCron);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, FormsModule } from '@c8y/ngx-components';\nimport { ReportsService } from './reports.service';\nimport { CronService } from './cron.service';\nimport { ExportSchedulesComponent } from './export-schedules.component';\nimport { ScheduleModalComponent } from './schedule-modal.component';\nimport { CronComponent } from './cron.component';\nimport { BsDropdownModule } from 'ngx-bootstrap/dropdown';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\n\n/**\n * The angular module definition for reports.\n * @exports ExportSchedulesComponent\n * @exports ScheduleModalComponent\n * @exports CronComponent\n */\n@NgModule({\n declarations: [ExportSchedulesComponent, ScheduleModalComponent, CronComponent],\n imports: [CoreModule, FormsModule, BsDropdownModule, TooltipModule],\n entryComponents: [ExportSchedulesComponent, ScheduleModalComponent, CronComponent],\n providers: [ReportsService, CronService],\n exports: [ExportSchedulesComponent, ScheduleModalComponent, CronComponent]\n})\nexport class ReportsModule {}\n","import { downgradeComponent } from '@angular/upgrade/static';\nimport { ExportSchedulesComponent } from '../export-schedules.component';\nexport const exportSchedulesComponent = downgradeComponent({\n component: ExportSchedulesComponent\n});\n","import { downgradeInjectable } from '@angular/upgrade/static';\nimport { ReportsService } from '..';\nexport const reportsService = downgradeInjectable(ReportsService);\n","import * as angular from 'angular';\nimport { registerNgModule } from '@c8y/ng1-modules/core/bootstrap';\nimport { exportSchedulesComponent } from './downgraded.components';\nimport { reportsService } from './downgraded.services';\n\nconst NAME = 'c8y.upgrade.reports';\n\nconst angularJsModule = angular\n .module(NAME, [])\n .directive('c8yExportSchedules', exportSchedulesComponent)\n .service('c8yReportsService', reportsService);\n\nexport const ng1Modules = [NAME];\n\nregisterNgModule(ng1Modules);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tslib_1.__decorate","angular\n .module"],"mappings":";;;;;;;;;;;;;;;IAYE,wBACU,YAA0B,EAC1B,gBAAkC,EAClC,MAAmB;QAFnB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,WAAM,GAAN,MAAM,CAAa;QAE3B,IAAI,CAAC,eAAe,GAAG,oBAAoB,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;KACvD;IAEK,kCAAS,GAAf,UAAgB,QAAqB;;;;;4BAEd,qBAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAA;;wBAA3D,YAAY,GAAG,SAA4C;wBACzD,IAAI,GAAU,YAAY,KAAtB,EAAE,GAAG,GAAK,YAAY,IAAjB,CAAkB;wBACnC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;4BACtB,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,IAAI,MAAA,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC;yBACnD;6BAAM;4BACL,GAAG,GAAG,IAAI,GAAK,IAA2B,GAAI,EAAa,CAAC;yBAC7D;wBAED,sBAAO,GAAG,EAAC;;;;KACZ;IAEK,wCAAe,GAArB,UAAsB,QAAqB;;;;;4BAC7B,qBAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAA;;wBAApC,GAAG,GAAG,SAA8B;wBAE1C,sBAAO,IAAI,CAAC,6BAA6B,CAAC,GAAG,CAAC,EAAC;;;;KAChD;IAED,sDAA6B,GAA7B,UAA8B,GAAW;QACvC,IAAI,YAAwB,CAAC;QAC7B,IAAI,GAAG,EAAE;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,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACrBO,IAAM,wBAAwB,GAAG,kBAAkB,CAAC;IACzD,SAAS,EAAE,wBAAwB;CACpC,CAAC,CAAC;;ACFI,IAAM,cAAc,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;;ACGlE,IAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC,IAAM,eAAe,GAAGC,MACf,CAAC,IAAI,EAAE,EAAE,CAAC;KAChB,SAAS,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;KACzD,OAAO,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;AAEhD,IAAa,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;AAEjC,gBAAgB,CAAC,UAAU,CAAC,CAAC;;ACd7B;;GAEG;;;;"}
@@ -626,16 +626,14 @@ var GroupInfoComponent = /** @class */ (function () {
626
626
  }());
627
627
 
628
628
  var SubAssetsComponent = /** @class */ (function () {
629
- function SubAssetsComponent(route, appState, deviceGroupService, subAssetsService) {
629
+ function SubAssetsComponent(route, deviceGroupService, subAssetsService) {
630
630
  var _this = this;
631
631
  this.route = route;
632
- this.appState = appState;
633
632
  this.deviceGroupService = deviceGroupService;
634
633
  this.subAssetsService = subAssetsService;
635
634
  this.toggle = false;
636
635
  this.showAddGroup = false;
637
636
  this.showAssignDevices = false;
638
- this.showGroupInfo = true;
639
637
  this.showAssignChildDevices = false;
640
638
  this.refresh = new EventEmitter();
641
639
  this.filterable = true;
@@ -648,10 +646,6 @@ var SubAssetsComponent = /** @class */ (function () {
648
646
  });
649
647
  }
650
648
  SubAssetsComponent.prototype.ngOnInit = function () {
651
- var _this = this;
652
- this.appState.state$.subscribe(function (state) {
653
- _this.showGroupInfo = state.app.name === 'cockpit' || state.app.name === 'devicemanagement';
654
- });
655
649
  this.displayOptions = {
656
650
  striped: true,
657
651
  bordered: false,
@@ -678,14 +672,13 @@ var SubAssetsComponent = /** @class */ (function () {
678
672
  };
679
673
  SubAssetsComponent.ctorParameters = function () { return [
680
674
  { type: ActivatedRoute },
681
- { type: AppStateService },
682
675
  { type: DeviceGroupService },
683
676
  { type: SubAssetsService }
684
677
  ]; };
685
678
  SubAssetsComponent = __decorate([
686
679
  Component({
687
680
  selector: 'c8y-sub-assets',
688
- template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-flex d-col\">\n <c8y-group-info\n *ngIf=\"showGroupInfo\"\n [group]=\"group\"\n (onGroupChange)=\"groupChange($event)\"\n ></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices=$event\"\n (selectedDevice)=\"showChildrenForDevice=$event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\" *ngIf=\"showAssignChildDevices\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n"
681
+ template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-flex d-col\">\n <c8y-group-info [group]=\"group\" (onGroupChange)=\"groupChange($event)\"></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices = $event\"\n (selectedDevice)=\"showChildrenForDevice = $event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\" *ngIf=\"showAssignChildDevices\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n"
689
682
  })
690
683
  ], SubAssetsComponent);
691
684
  return SubAssetsComponent;