@c8y/ngx-components 1010.0.30 → 1010.0.33
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.
- package/assets-navigator/asset-node.service.d.ts +7 -3
- package/assets-navigator/c8y-ngx-components-assets-navigator.metadata.json +1 -1
- package/bundles/c8y-ngx-components-assets-navigator.umd.js +7 -2
- package/bundles/c8y-ngx-components-assets-navigator.umd.js.map +1 -1
- package/bundles/c8y-ngx-components-assets-navigator.umd.min.js +1 -1
- package/bundles/c8y-ngx-components-assets-navigator.umd.min.js.map +1 -1
- package/bundles/c8y-ngx-components-repository.umd.js +8 -4
- package/bundles/c8y-ngx-components-repository.umd.js.map +1 -1
- package/bundles/c8y-ngx-components-repository.umd.min.js +1 -1
- package/bundles/c8y-ngx-components-repository.umd.min.js.map +1 -1
- package/bundles/c8y-ngx-components-sensor-phone.umd.js +1 -1
- package/bundles/c8y-ngx-components-sensor-phone.umd.js.map +1 -1
- package/bundles/c8y-ngx-components-sensor-phone.umd.min.js +1 -1
- package/bundles/c8y-ngx-components-sensor-phone.umd.min.js.map +1 -1
- package/bundles/c8y-ngx-components.umd.js +14 -8
- package/bundles/c8y-ngx-components.umd.js.map +1 -1
- package/bundles/c8y-ngx-components.umd.min.js +1 -1
- package/bundles/c8y-ngx-components.umd.min.js.map +1 -1
- package/c8y-ngx-components.metadata.json +1 -1
- package/core/file-picker/file-picker.component.d.ts +8 -0
- package/esm2015/assets-navigator/asset-node.service.js +8 -3
- package/esm2015/core/file-picker/file-picker.component.js +12 -2
- package/esm2015/core/file-picker/file-picker.module.js +6 -8
- package/esm2015/repository/configuration/configuration-detail.component.js +7 -2
- package/esm2015/repository/firmware/add-firmware-modal.component.js +7 -2
- package/esm2015/repository/firmware/add-firmware-patch-modal.component.js +7 -2
- package/esm2015/repository/software/add-software-modal.component.js +7 -2
- package/esm2015/sensor-phone/sensor-phone-modal.component.js +2 -2
- package/esm5/assets-navigator/asset-node.service.js +8 -3
- package/esm5/core/file-picker/file-picker.component.js +12 -2
- package/esm5/core/file-picker/file-picker.module.js +6 -8
- package/esm5/repository/configuration/configuration-detail.component.js +3 -2
- package/esm5/repository/firmware/add-firmware-modal.component.js +3 -2
- package/esm5/repository/firmware/add-firmware-patch-modal.component.js +3 -2
- package/esm5/repository/software/add-software-modal.component.js +3 -2
- package/esm5/sensor-phone/sensor-phone-modal.component.js +2 -2
- package/fesm2015/c8y-ngx-components-assets-navigator.js +7 -2
- package/fesm2015/c8y-ngx-components-assets-navigator.js.map +1 -1
- package/fesm2015/c8y-ngx-components-repository.js +24 -4
- package/fesm2015/c8y-ngx-components-repository.js.map +1 -1
- package/fesm2015/c8y-ngx-components-sensor-phone.js +1 -1
- package/fesm2015/c8y-ngx-components-sensor-phone.js.map +1 -1
- package/fesm2015/c8y-ngx-components.js +14 -8
- package/fesm2015/c8y-ngx-components.js.map +1 -1
- package/fesm5/c8y-ngx-components-assets-navigator.js +7 -2
- package/fesm5/c8y-ngx-components-assets-navigator.js.map +1 -1
- package/fesm5/c8y-ngx-components-repository.js +8 -4
- package/fesm5/c8y-ngx-components-repository.js.map +1 -1
- package/fesm5/c8y-ngx-components-sensor-phone.js +1 -1
- package/fesm5/c8y-ngx-components-sensor-phone.js.map +1 -1
- package/fesm5/c8y-ngx-components.js +14 -8
- package/fesm5/c8y-ngx-components.js.map +1 -1
- package/locales/locales.pot +30 -9
- package/package.json +2 -2
- package/repository/c8y-ngx-components-repository.metadata.json +1 -1
- package/repository/configuration/configuration-detail.component.d.ts +1 -0
- package/repository/firmware/add-firmware-modal.component.d.ts +1 -0
- package/repository/firmware/add-firmware-patch-modal.component.d.ts +1 -0
- package/repository/software/add-software-modal.component.d.ts +1 -0
- package/sensor-phone/c8y-ngx-components-sensor-phone.metadata.json +1 -1
|
@@ -464,7 +464,7 @@ let AssetNodeService = class AssetNodeService {
|
|
|
464
464
|
const defaultFilter = {
|
|
465
465
|
pageSize: this.PAGE_SIZE,
|
|
466
466
|
withChildren: false,
|
|
467
|
-
query: this.queriesUtil.buildQuery(this.
|
|
467
|
+
query: this.queriesUtil.buildQuery(this.navRootQueryFilter())
|
|
468
468
|
};
|
|
469
469
|
const groupFilter = customFilter ? customFilter : defaultFilter;
|
|
470
470
|
// due to BE performance limitations we do not allow filtering and sorting for a user without inventory roles
|
|
@@ -502,13 +502,18 @@ let AssetNodeService = class AssetNodeService {
|
|
|
502
502
|
groupQueryFilter(moId) {
|
|
503
503
|
return `$filter=(bygroupid(${moId}))$orderby=name`;
|
|
504
504
|
}
|
|
505
|
+
navRootQueryFilter() {
|
|
506
|
+
const navRootFilter = this.rootQueryFilter();
|
|
507
|
+
navRootFilter.__orderby = [{ name: 1 }];
|
|
508
|
+
return navRootFilter;
|
|
509
|
+
}
|
|
505
510
|
rootQueryFilter() {
|
|
506
511
|
const { moduleConfig } = this;
|
|
507
512
|
const rootFilter = {
|
|
508
513
|
__filter: {
|
|
509
514
|
type: `${GroupFragment.groupType}`
|
|
510
515
|
},
|
|
511
|
-
__orderby: [
|
|
516
|
+
__orderby: []
|
|
512
517
|
};
|
|
513
518
|
if (moduleConfig.smartGroups) {
|
|
514
519
|
const queryFilter = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-assets-navigator.js","sources":["ng://@c8y/ngx-components/assets-navigator/load-more-node.ts","ng://@c8y/ngx-components/assets-navigator/group-fragment.model.ts","ng://@c8y/ngx-components/assets-navigator/action.enum.ts","ng://@c8y/ngx-components/assets-navigator/asset-node.ts","ng://@c8y/ngx-components/assets-navigator/dynamic-group-node.ts","ng://@c8y/ngx-components/assets-navigator/asset-node-config.model.ts","ng://@c8y/ngx-components/assets-navigator/group.service.ts","ng://@c8y/ngx-components/assets-navigator/asset-node.service.ts","ng://@c8y/ngx-components/assets-navigator/asset-node.factory.ts","ng://@c8y/ngx-components/assets-navigator/assets-navigator.module.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/group-node.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/group-node.service.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/asset-selector.component.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/asset-selector-node.component.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/asset-selector.module.ts","ng://@c8y/ngx-components/assets-navigator/c8y-ngx-components-assets-navigator.ts"],"sourcesContent":["import { NavigatorNode, gettext } from '@c8y/ngx-components';\n\nexport class LoadMoreNode extends NavigatorNode {\n priority = -Infinity;\n label = gettext('Load more');\n icon = 'plus';\n droppable = true;\n}\n","export enum GroupFragment {\n groupType = 'c8y_DeviceGroup',\n subGroupType = 'c8y_DeviceSubgroup',\n groupFragmentType = 'c8y_IsDeviceGroup',\n dataBrokerSourceFragment = 'c8y_BrokerSource',\n dynamicGroupType = 'c8y_DynamicGroup',\n dynamicGroupFragment = 'c8y_IsDynamicGroup',\n dynamicGroupColumnConfig = 'c8y_UIDeviceFilterConfig',\n dynamicGroupQueryString = 'c8y_DeviceQueryString',\n}\n","export enum Action {\n FETCH,\n NEXT,\n REFRESH,\n LOADING_DONE\n}\n","import { Paging } from '@c8y/client';\nimport { ClickOptions, gettext, NavigatorNode, DeviceStatusComponent } from '@c8y/ngx-components';\nimport { get, has } from 'lodash-es';\nimport { Subject, Subscription } from 'rxjs';\nimport { AssetNodeMo, AssetNodeService } from './asset-node.service';\nimport { LoadMoreNode } from './load-more-node';\nimport { GroupFragment } from './group-fragment.model';\nimport { Action } from './action.enum';\n\nexport class AssetNode extends NavigatorNode {\n root: boolean;\n mo: any;\n\n get label() {\n return (this.root && gettext('Groups')) || this.mo.name || '--';\n }\n\n get hasChildren() {\n return this.root || this.service.groups.isGroup(this.mo);\n }\n\n get iconComponent() {\n return this.isDeviceOrProbablyChildDevice ? DeviceStatusComponent : undefined;\n }\n\n get isDevice() {\n return !!this.mo.c8y_IsDevice;\n }\n\n get isDeviceOrProbablyChildDevice() {\n return this.isDevice || this.isNeitherDeviceOrGroup;\n }\n\n get isNeitherDeviceOrGroup() {\n const { isGroup, isDynamicGroup } = this.service.groups;\n return !isGroup(this.mo) && !isDynamicGroup(this.mo) && !this.isDevice && !this.root;\n }\n\n events: Subject<Action>;\n protected paging: Paging<AssetNodeMo>;\n protected loadMoreNode: LoadMoreNode;\n private onUpdateSubscription: Subscription;\n\n constructor(protected service: AssetNodeService, config = {}) {\n super(config);\n this.root = this.root || false;\n this.mo = this.mo || {};\n this.path = this.root\n ? 'group'\n : this.isDeviceOrProbablyChildDevice\n ? `device/${this.mo.id}`\n : `group/${this.mo.id}`;\n this.draggable = !this.service.moduleConfig.disableDragAndDrop && !this.root;\n this.droppable =\n !this.service.moduleConfig.disableDragAndDrop && !this.isDeviceOrProbablyChildDevice;\n this.routerLinkExact = this.root;\n this.updateIcon(false);\n this.onUpdateSubscription = this.service\n .onUpdate(this)\n .subscribe(({ data, method }) => this.refresh(data, method));\n }\n\n openOnStart(url) {\n const urlRegex = /^\\/group\\//;\n if (this.root) {\n if (this.service.moduleConfig.openOnStart || urlRegex.test(url)) {\n return true;\n }\n }\n const matches = url.match(/\\/(group)\\/(\\d+)/);\n let isMatch = false;\n if (matches) {\n const id = matches[2];\n isMatch = []\n .concat(get(this.mo, 'childAssets.references', []))\n .some(({ managedObject }) => managedObject.id === id);\n return isMatch;\n }\n return false;\n }\n\n refresh(mo: any = {}, method = 'GET') {\n if (mo.id === this.mo.id) {\n this.mo = mo;\n } else if (method === 'DELETE') {\n this.parents.forEach((node: AssetNode) => node.refresh());\n return;\n }\n if (this.events) {\n this.events.next(Action.REFRESH);\n }\n }\n\n click(options: ClickOptions = {}) {\n if (this.isDeviceOrProbablyChildDevice) {\n this.service.preferBreadcrumb(this.parents);\n return;\n }\n this.hookEvents();\n\n this.updateIcon(options.open);\n if (options.open) {\n this.events.next(Action.FETCH);\n }\n }\n\n sort() {\n this.children.sort((a, b) => {\n if (a.priority > b.priority) {\n return -1;\n } else if (a.priority < b.priority) {\n return 1;\n } else {\n return 0;\n }\n });\n }\n\n addManagedObject(mo) {\n const { childAdditions } = this.mo;\n if (!this.isChildAddition(childAdditions, mo)) {\n this.add(this.service.createChildNode(mo));\n }\n }\n\n isChildAddition(childAdditions, mo) {\n return (\n childAdditions && childAdditions.references.some(({ managedObject: { id } }) => id === mo.id)\n );\n }\n\n destroy() {\n this.onUpdateSubscription.unsubscribe();\n }\n\n get canDrop() {\n const nodeToMove = this.service.draggedData;\n if (nodeToMove) {\n const shouldGetChildOfItsOwn = !!nodeToMove.find(child => child === this);\n const isAlreadyChild = (this.children as AssetNode[]).some(\n child => child.mo && child.mo.id === nodeToMove.mo.id\n );\n const preventMove = this === nodeToMove || shouldGetChildOfItsOwn || isAlreadyChild;\n return this.droppable && !preventMove;\n }\n return this.droppable;\n }\n\n dragStart($event) {\n super.dragStart($event);\n this.service.draggedData = this;\n this.service.rootNode.droppable = !this.isDeviceOrProbablyChildDevice;\n }\n\n dragEnd($event) {\n super.dragEnd($event);\n }\n\n async drop($event) {\n super.drop($event);\n const nodeToMove = this.service.draggedData;\n if (this.canDrop) {\n await this.moveNode(nodeToMove);\n } else {\n this.draggedHover = false;\n this.service.draggedData = undefined;\n }\n }\n\n hookEvents() {\n if (!this.events) {\n this.events = new Subject();\n this.events.subscribe(evt => {\n if (!this.loading) {\n this.handleEvent(evt);\n }\n });\n }\n }\n\n protected fetch() {\n return this.root ? this.service.getRootNodes() : this.service.getGroupItems(this.mo.id);\n }\n\n protected async handleEvent(evt: Action) {\n if (!this.children.length && evt === Action.FETCH) {\n this.loading = true;\n this.addNodes(await this.fetch());\n this.loading = false;\n } else if (evt === Action.NEXT) {\n this.loadMoreNode.loading = true;\n this.addNodes(await this.paging.next());\n this.loadMoreNode.loading = false;\n } else if (evt === Action.REFRESH) {\n this.loading = false;\n this.paging = undefined;\n this.loadMoreNode = undefined;\n this.empty();\n this.events.next(Action.FETCH);\n }\n }\n\n protected addNodes(res) {\n if (res.paging) {\n const { currentPage, nextPage, pageSize } = (this.paging = res.paging);\n if (currentPage === 1) {\n this.empty();\n }\n const itemsCount = res.data.length;\n const moreItemsAvailable = !!nextPage && itemsCount === pageSize;\n this.toggleLoadMore(moreItemsAvailable);\n }\n (res.data || res).map(mo => this.addManagedObject(mo));\n this.events.next(Action.LOADING_DONE);\n }\n\n protected toggleLoadMore(show: boolean) {\n if (!this.loadMoreNode && show) {\n this.loadMoreNode = new LoadMoreNode();\n this.add(this.loadMoreNode);\n this.loadMoreNode.click = () => this.events.next(Action.NEXT);\n }\n\n if (this.loadMoreNode) {\n this.loadMoreNode.hidden = !show;\n }\n }\n\n private async moveNode(nodeToMove: AssetNode) {\n try {\n const isCopy = await this.showDropConfirm(nodeToMove);\n await this.verifyNodeAccess(nodeToMove);\n await this.addMovedNode(nodeToMove);\n if (!isCopy) {\n await this.removeMovedNode(nodeToMove);\n }\n this.expand();\n } catch (ex) {\n if (ex) {\n this.service.alert.addServerFailure(ex);\n }\n } finally {\n this.draggedHover = false;\n this.service.draggedData = undefined;\n }\n }\n\n private async showDropConfirm(nodeToMove: AssetNode) {\n this.confirm.title = gettext('Move');\n this.confirm.message = gettext('Do you want to move the group?');\n const buttons: any = [\n {\n label: gettext('Cancel'),\n action: () => Promise.reject()\n },\n {\n label: gettext('Move'),\n status: 'default',\n action: () => Promise.resolve(false)\n }\n ];\n if (nodeToMove.isDeviceOrProbablyChildDevice) {\n this.confirm.title = gettext('Move or add');\n this.confirm.message = gettext('Do you want to move or add the device?');\n buttons.push({\n label: gettext('Add'),\n status: 'primary',\n action: () => Promise.resolve(true)\n });\n }\n return this.confirm.show(buttons);\n }\n\n private async verifyNodeAccess(nodeToMove: AssetNode) {\n return this.service.inventory.update({ id: nodeToMove.mo.id });\n }\n\n private async addMovedNode(nodeToMove: AssetNode) {\n let mo;\n if (this.root) {\n const { data } = await this.service.inventory.update({\n id: nodeToMove.mo.id,\n type: GroupFragment.groupType\n });\n mo = data;\n } else {\n const { data } = await this.service.inventory.childAssetsAdd(nodeToMove.mo, this.mo);\n mo = data;\n }\n this.addManagedObject(mo);\n }\n\n private async removeMovedNode(nodeToMove: AssetNode) {\n for (const parent of nodeToMove.parents as AssetNode[]) {\n if (parent.mo && parent.mo.type === GroupFragment.dynamicGroupType) {\n break; // smart groups don't need to be changed\n }\n if (parent.root) {\n await this.service.inventory.update({\n id: nodeToMove.mo.id,\n type: GroupFragment.subGroupType\n });\n } else {\n await this.service.inventory.childAssetsRemove(nodeToMove.mo, parent.mo);\n }\n parent.remove(nodeToMove);\n }\n }\n\n private updateIcon(open) {\n this.icon = this.service.groups.icon(\n // if it's root we are going to pass a fake mo to get the same icon as groups\n this.root ? { type: GroupFragment.groupType } : this.mo,\n open\n );\n }\n}\n","\nimport { AssetNode } from './asset-node';\nimport { AssetNodeService } from './asset-node.service';\n\nexport class DynamicGroupNode extends AssetNode {\n constructor(\n protected service: AssetNodeService,\n config = {}\n ) {\n super(service, config);\n this.draggable = false;\n this.droppable = false;\n }\n\n get hasChildren() {\n return true;\n }\n\n get query() {\n return this.mo.c8y_DeviceQueryString;\n }\n\n protected fetch(): any {\n return this.service.getDynamicGroupItems(this.query);\n }\n}\n","import { InjectionToken } from '@angular/core';\r\nexport const ASSET_NAVIGATOR_CONFIG = new InjectionToken<AssetNavigatorConfig>('AssetNodeConfig');\r\n\r\nexport interface AssetNavigatorConfig {\r\n smartGroups?: boolean;\r\n openOnStart?: boolean;\r\n rootNodePriority?: number;\r\n disableDragAndDrop?: boolean;\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { GroupFragment } from './group-fragment.model';\nimport { IManagedObject } from '@c8y/client';\n\n@Injectable()\nexport class DeviceGroupService {\n icons = {\n brokerSourceInactive: {\n icon: 'c8y-group-remote-inactive'\n },\n brokerSource: {\n icon: 'c8y-group-remote',\n iconOpen: 'c8y-group-remote-open'\n },\n group: {\n icon: 'c8y-group',\n iconOpen: 'c8y-group-open'\n },\n dynamicGroup: {\n icon: 'c8y-group-smart',\n iconOpen: 'c8y-group-smart-open'\n },\n other: {\n icon: 'circle',\n iconClass: 'statusUnknown'\n }\n };\n dataBrokerSourceFragmentInactive = `_${GroupFragment.dataBrokerSourceFragment}`;\n\n isGroup(mo) {\n return (\n !!mo[GroupFragment.groupFragmentType] ||\n mo.type === GroupFragment.groupType ||\n mo.type === GroupFragment.subGroupType\n );\n }\n\n isDynamicGroup(mo) {\n return !!mo[GroupFragment.dynamicGroupFragment] || mo.type === GroupFragment.dynamicGroupType;\n }\n\n isDataBroker(mo) {\n return (\n !!mo[GroupFragment.dataBrokerSourceFragment] || !!mo[this.dataBrokerSourceFragmentInactive]\n );\n }\n\n isDataBrokerActive(mo) {\n return (\n !!mo[GroupFragment.dataBrokerSourceFragment] && !mo[this.dataBrokerSourceFragmentInactive]\n );\n }\n\n isDevice(mo) {\n return !!mo.c8y_IsDevice;\n }\n\n icon(mo, open = false) {\n let type = 'other';\n if (this.isDynamicGroup(mo)) {\n type = 'dynamicGroup';\n } else if (this.isDataBrokerActive(mo)) {\n type = 'brokerSource';\n } else if (this.isDataBroker(mo)) {\n type = 'brokerSourceInactive';\n } else if (this.isGroup(mo)) {\n type = 'group';\n }\n const icon = this.icons[type];\n return (open && icon.iconOpen) || icon.icon;\n }\n\n isAnyGroup(mo: IManagedObject) {\n return (\n this.isGroup(mo) ||\n this.isDynamicGroup(mo) ||\n this.isDataBroker(mo) ||\n this.isDataBrokerActive(mo)\n );\n }\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { InventoryService, QueriesUtil, UserService, IManagedObject, IResult } from '@c8y/client';\nimport {\n AlertService,\n BreadcrumbService,\n ModalService,\n NavigatorNode,\n AppStateService\n} from '@c8y/ngx-components';\nimport { ApiService } from '@c8y/ngx-components/api';\nimport { empty } from 'rxjs';\nimport { filter, mergeMap } from 'rxjs/operators';\nimport { AssetNode } from './asset-node';\nimport { AssetNavigatorConfig, ASSET_NAVIGATOR_CONFIG } from './asset-node-config.model';\nimport { DynamicGroupNode } from './dynamic-group-node';\nimport { GroupFragment } from './group-fragment.model';\nimport { DeviceGroupService } from './group.service';\n\nexport interface AssetNodeMo {\n id: string;\n type: string;\n}\n\n@Injectable()\nexport class AssetNodeService {\n rootNode: AssetNode;\n firstUrl = true;\n draggedData: AssetNode;\n queriesUtil: QueriesUtil;\n protected PAGE_SIZE = 20;\n\n constructor(\n public inventory: InventoryService,\n public groups: DeviceGroupService,\n public apiService: ApiService,\n public modal: ModalService,\n public alert: AlertService,\n protected breadcrumbService: BreadcrumbService,\n protected user: UserService,\n protected appState: AppStateService,\n @Optional() @Inject(ASSET_NAVIGATOR_CONFIG) public moduleConfig: AssetNavigatorConfig\n ) {\n this.moduleConfig = {\n rootNodePriority: 2000,\n ...(moduleConfig || {})\n };\n this.queriesUtil = new QueriesUtil();\n }\n\n createRootNode() {\n this.rootNode = this.createAssetNode({\n root: true,\n priority: this.moduleConfig.rootNodePriority\n });\n return this.rootNode;\n }\n\n createDynamicGroupNode(config) {\n return new DynamicGroupNode(this, config);\n }\n\n createAssetNode(config) {\n return new AssetNode(this, config);\n }\n\n createChildNode(managedObject) {\n const { type } = managedObject;\n const config: Partial<AssetNode> = { mo: managedObject };\n if (type === GroupFragment.dynamicGroupType) {\n return this.createDynamicGroupNode(config);\n }\n return this.createAssetNode(config);\n }\n\n getRootNodes(customFilter?: any): Promise<any> {\n const defaultFilter = {\n pageSize: this.PAGE_SIZE,\n withChildren: false,\n query: this.queriesUtil.buildQuery(this.rootQueryFilter())\n };\n const groupFilter = customFilter ? customFilter : defaultFilter;\n\n // due to BE performance limitations we do not allow filtering and sorting for a user without inventory roles\n if (!this.user.hasRole(this.appState.currentUser.value, 'ROLE_INVENTORY_READ')) {\n delete groupFilter.query;\n Object.assign(groupFilter, {\n fragmentType: GroupFragment.groupFragmentType,\n onlyRoots: true\n });\n }\n return this.inventory.list(this.createFilter(groupFilter));\n }\n\n getGroupItems(moId: string, extraFilter: object = {}) {\n const queryFilter = {\n withChildren: false,\n pageSize: this.PAGE_SIZE,\n query: this.groupQueryFilter(moId)\n };\n return this.inventory.childAssetsList(moId, { ...queryFilter, ...extraFilter });\n }\n\n getDynamicGroupItems(groupQuery: string, filterObj: any = {}) {\n const { query, ...queryParams } = filterObj;\n const orderByQuery = query;\n const queryFilter = {\n q: this.buildCombinedQuery(groupQuery, orderByQuery),\n ...queryParams\n };\n return this.inventory.list(this.createFilter(queryFilter));\n }\n\n getDeviceChildren(moId: string, extraFilter: object = {}) {\n const queryFilter = {\n withChildren: false,\n pageSize: this.PAGE_SIZE,\n query: this.groupQueryFilter(moId)\n };\n return this.inventory.childDevicesList(moId, { ...queryFilter, ...extraFilter });\n }\n\n groupQueryFilter(moId: string) {\n return `$filter=(bygroupid(${moId}))$orderby=name`;\n }\n\n rootQueryFilter() {\n const { moduleConfig } = this;\n const rootFilter = {\n __filter: {\n type: `${GroupFragment.groupType}`\n },\n __orderby: [{ name: 1 }]\n };\n if (moduleConfig.smartGroups) {\n const queryFilter = {\n __filter: {\n __and: [\n {\n type: `${GroupFragment.dynamicGroupType}`\n },\n {\n __has: `${GroupFragment.dynamicGroupFragment}`\n },\n { __not: { __has: `${GroupFragment.dynamicGroupFragment}.invisible` } }\n ]\n }\n };\n this.queriesUtil.addOrFilter(rootFilter, queryFilter);\n }\n return rootFilter;\n }\n\n onUpdate({ mo, root }) {\n if (mo.id) {\n return this.apiService\n .hookResponse(\n ({ url, method }) =>\n ['PUT', 'DELETE', 'POST'].includes(method) &&\n RegExp(`((inventory/managedObjects)|(service/smartgroup/smartgroups))/${mo.id}`).test(\n url\n )\n )\n .pipe(\n filter(() => !this.draggedData),\n mergeMap(this.apiService.resolveData),\n filter(response => !response.data.c8y_Dashboard)\n );\n } else if (root) {\n return this.apiService\n .hookResponse(\n ({ url, method }) =>\n RegExp('((inventory/managedObjects)|(service/smartgroup/smartgroups))/?$').test(url) &&\n method === 'POST'\n )\n .pipe(\n mergeMap(this.apiService.resolveData),\n filter(response => this.isNewManagedObjectRoot(response))\n );\n } else {\n return empty();\n }\n }\n\n isNewManagedObjectRoot(response: Partial<IResult<IManagedObject>> = {}) {\n const { data } = response;\n let isRootAsset = false;\n\n if (typeof data === 'object') {\n isRootAsset = !!data[GroupFragment.groupFragmentType];\n if (!isRootAsset && this.moduleConfig.smartGroups) {\n isRootAsset = !!data[GroupFragment.dynamicGroupFragment];\n }\n }\n return isRootAsset;\n }\n\n /**\n * There could be multiple breadcrumbs for devices,\n * so we set a preferred one on click on a device.\n * @param parents The parent nodes of the device to select the prefered one.\n */\n preferBreadcrumb(parents: NavigatorNode[]) {\n if (parents.length === 1) {\n this.breadcrumbService.selectPreferredByPath(parents[0].path);\n }\n }\n\n protected createFilter(extraParams: any = {}) {\n const params = {\n currentPage: 1,\n withTotalPages: true,\n pageSize: 10\n };\n return { ...params, ...extraParams };\n }\n\n private buildCombinedQuery(query, orderByQuery) {\n let combinedQuery;\n if (query && orderByQuery) {\n const filterQuery = this.queriesUtil.buildQuery({\n __useFilterQueryString: query\n });\n combinedQuery = `${filterQuery} ${orderByQuery}`;\n } else {\n combinedQuery = query || orderByQuery || '';\n }\n return combinedQuery;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AssetNodeService } from './asset-node.service';\nimport { NavigatorNode } from '@c8y/ngx-components';\n\n@Injectable()\nexport class AssetNodeFactory {\n constructor(private service: AssetNodeService) {}\n\n get(): NavigatorNode {\n if (!this.service.rootNode) {\n this.service.createRootNode();\n }\n return this.service.rootNode;\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { HOOK_NAVIGATOR_NODES, ModalModule, ModalService, DeviceStatusComponent, DeviceStatusModule} from '@c8y/ngx-components';\nimport { ASSET_NAVIGATOR_CONFIG} from './asset-node-config.model';\nimport { AssetNodeFactory } from './asset-node.factory';\nimport { AssetNodeService } from './asset-node.service';\nimport { AssetNavigatorConfig } from './asset-node-config.model';\nimport { DeviceGroupService } from './group.service';\n\n@NgModule({\n declarations: [],\n imports: [\n ModalModule,\n DeviceStatusModule\n ],\n providers: [\n ModalService,\n AssetNodeService,\n DeviceGroupService,\n {\n provide: HOOK_NAVIGATOR_NODES, useClass: AssetNodeFactory, multi: true\n }\n ],\n entryComponents: [DeviceStatusComponent]\n})\nexport class AssetsNavigatorModule {\n static config(config: AssetNavigatorConfig): ModuleWithProviders {\n return {\n ngModule: AssetsNavigatorModule,\n providers: [\n {\n provide: ASSET_NAVIGATOR_CONFIG, useValue: config\n }\n ],\n };\n }\n\n}\n","import { GroupNodeService } from './group-node.service';\nimport { AssetNode } from '../asset-node';\n\nexport class GroupNode extends AssetNode {\n // FIXME: Currently hasChildren returns true if it is a group,\n // Issue is, that we disable the children in the API\n // getGroupItems service call due to performance. This leads\n // to that the dropdown chevron is shown always. Issue is,\n // that even if we return the chevrons, we have no way to determine\n // if the childAssets contain groups or other assets (like dashboards).\n // get hasChildren() {\n // return this.root || this.service.groups.isGroup(this.mo) && (this.mo as IManagedObject).childAssets.references.length > 0;\n // }\n\n /**\n * Creates a new node which shows only groups.\n *\n * @param service The service to use.\n * @param config The default configuration of the node.\n */\n constructor(protected service: GroupNodeService, config = {}) {\n super(service, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AssetNodeService } from '../asset-node.service';\nimport { GroupNode } from './group-node';\nimport { GroupFragment } from '../group-fragment.model';\n\n@Injectable()\nexport class GroupNodeService extends AssetNodeService {\n protected PAGE_SIZE = 5;\n\n createGroupNode(config) {\n return new GroupNode(this, config);\n }\n\n createChildNode(managedObject): GroupNode {\n const config: Partial<GroupNode> = { mo: managedObject };\n return this.createGroupNode(config);\n }\n\n subAssetsQueryFilter() {\n const rootQueryFilter = this.rootQueryFilter();\n const filter = this.queriesUtil.addOrFilter(rootQueryFilter, {\n type: GroupFragment.subGroupType\n });\n return this.queriesUtil.buildQuery(filter);\n }\n\n getGroupItems(moId: string): Promise<any> {\n return this.inventory.childAssetsList(moId, {\n query: this.subAssetsQueryFilter(),\n withChildren: false,\n pageSize: this.PAGE_SIZE,\n withTotalPages: true\n });\n }\n}\n","import { Component, Output, Input, EventEmitter, OnInit } from '@angular/core';\nimport { GroupNodeService } from './group-node.service';\nimport { GroupNode } from './group-node';\nimport { IManagedObject } from '@c8y/client';\n\n/**\n * Displays a hierarchical tree selector for assets.\n */\n@Component({\n selector: 'c8y-asset-selector',\n templateUrl: './asset-selector.component.html'\n})\nexport class AssetSelectorComponent implements OnInit {\n /**\n * An array of predefined nodes.\n */\n @Input() selected: IManagedObject[] = [];\n /**\n * Emits if one item was selected (all currently selected nodes).\n */\n @Output() onChange = new EventEmitter<IManagedObject[]>();\n /**\n * @ignore\n */\n rootNode: GroupNode;\n\n /**\n * @ignore only DI\n */\n constructor(private groupNodeService: GroupNodeService) {}\n\n /**\n * @ignore\n */\n ngOnInit(): void {\n this.rootNode = this.groupNodeService.createGroupNode({ root: true });\n }\n\n /**\n * Adds an managed object to the selected array and emits the change.\n * @param selectedMo The selected asset.\n */\n select(selectedMo: IManagedObject) {\n const index = this.getIndexOfSelected(this.selected, selectedMo);\n if (index === -1) {\n this.selected.push(selectedMo);\n }\n this.onChange.emit(this.selected);\n }\n\n /**\n * Removes a managed object from the selected array and emits the change.\n * @param selectedMo The selected asset.\n */\n deselect(selectedMo: IManagedObject) {\n const index = this.getIndexOfSelected(this.selected, selectedMo);\n if (index > -1) {\n this.selected.splice(index, 1);\n }\n this.onChange.emit(this.selected);\n }\n\n getIndexOfSelected(selected: Array<Partial<IManagedObject>>, selectedMo: IManagedObject) {\n return selected.findIndex(mo => mo.id === selectedMo.id);\n }\n}\n","import { Component, Input, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { GroupNode } from './group-node';\nimport { Subject } from 'rxjs';\nimport { takeUntil, filter } from 'rxjs/operators';\nimport { AssetSelectorComponent } from './asset-selector.component';\nimport { IManagedObject } from '@c8y/client';\nimport { Action } from '../action.enum';\n\n@Component({\n selector: 'c8y-asset-selector-node',\n templateUrl: './asset-selector-node.component.html'\n})\nexport class AssetSelectorNodeComponent implements OnInit {\n /**\n * The current node.\n */\n @Input() node: GroupNode;\n /**\n * All preselected items\n */\n @Input() preselected: Array<Partial<IManagedObject>> = [];\n /**\n * Should the path be shown\n */\n @Input() showPath: boolean = false;\n /**\n * The current path to the node\n */\n breadcrumb: string;\n /**\n * @ignore\n */\n level: number = 0;\n /**\n * The selection status of the node\n */\n checked: boolean = false;\n /**\n * @ignore\n */\n unsubscribe$ = new Subject<any>();\n\n /**\n * @ignore\n */\n get expandTitle() {\n return !this.node.open ? gettext('Expand') : gettext('Collapse');\n }\n\n /**\n * @ignore only di\n */\n constructor(\n private translateService: TranslateService,\n private cd: ChangeDetectorRef,\n private parentNode: AssetSelectorComponent\n ) {}\n\n /**\n * @ignore\n */\n async ngOnInit() {\n this.breadcrumb = this.node.label;\n this.setupBreadcrumbsAndLevel(this.node);\n\n if (this.node instanceof GroupNode) {\n this.node.hookEvents();\n }\n\n // open on startup\n if (this.node.root) {\n this.click();\n }\n\n if (this.node.events) {\n this.node.events\n .pipe(\n takeUntil(this.unsubscribe$),\n filter((a: Action) => a === Action.LOADING_DONE)\n )\n .subscribe(() => {\n this.cd.markForCheck();\n });\n }\n\n this.checked = this.isPreselected();\n }\n\n /**\n * Opens a node.\n */\n click() {\n this.node.open = !this.node.open;\n this.node.click({ open: this.node.open });\n }\n\n /**\n * TODO: Only level used. Breadcrumbs needs to be implemented.\n */\n setupBreadcrumbsAndLevel(node: GroupNode) {\n if (node.parents && node.parents.length) {\n const parent = node.parents[0] as GroupNode;\n this.breadcrumb = this.translateService.instant(parent.label) + ' > ' + this.breadcrumb;\n this.level++;\n\n this.setupBreadcrumbsAndLevel(parent);\n }\n }\n\n /**\n * Selects the node and emits a change on the parent component.\n * @param node The node to select.\n */\n selected(node: GroupNode) {\n this.checked = !this.checked;\n this.updateSelection(node.mo);\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this.unsubscribe$.next(true);\n this.unsubscribe$.complete();\n }\n\n private isPreselected() {\n if (this.node.root || !this.node.mo) {\n return false;\n }\n return this.parentNode.getIndexOfSelected(this.preselected, this.node.mo) > -1;\n }\n\n private updateSelection(selectedMo: IManagedObject) {\n if (this.checked) {\n this.parentNode.select(selectedMo);\n return;\n }\n this.parentNode.deselect(selectedMo);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@c8y/ngx-components';\nimport { CollapseModule } from 'ngx-bootstrap/collapse';\nimport { BsDropdownModule } from 'ngx-bootstrap/dropdown';\nimport { GroupNodeService } from './group-node.service';\n\nimport { AssetSelectorNodeComponent } from './asset-selector-node.component';\nimport { AssetSelectorComponent } from './asset-selector.component';\n\n@NgModule({\n imports: [CommonModule, CollapseModule, BsDropdownModule ],\n exports: [AssetSelectorNodeComponent, AssetSelectorComponent],\n providers: [GroupNodeService],\n declarations: [AssetSelectorNodeComponent, AssetSelectorComponent]\n})\nexport class AssetSelectorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tslib_1.__param","tslib_1.__decorate"],"mappings":";;;;;;;;;;;;MAEa,YAAa,SAAQ,aAAa;IAA/C;;QACE,aAAQ,GAAG,CAAC,QAAQ,CAAC;QACrB,UAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAC7B,SAAI,GAAG,MAAM,CAAC;QACd,cAAS,GAAG,IAAI,CAAC;KAClB;CAAA;;ICPW,aASX;AATD,WAAY,aAAa;IACvB,8CAA6B,CAAA;IAC7B,oDAAmC,CAAA;IACnC,wDAAuC,CAAA;IACvC,8DAA6C,CAAA;IAC7C,sDAAqC,CAAA;IACrC,4DAA2C,CAAA;IAC3C,sEAAqD,CAAA;IACrD,kEAAiD,CAAA;CAClD,EATW,aAAa,KAAb,aAAa,QASxB;;ICTW,MAKX;AALD,WAAY,MAAM;IAChB,qCAAK,CAAA;IACL,mCAAI,CAAA;IACJ,yCAAO,CAAA;IACP,mDAAY,CAAA;CACb,EALW,MAAM,KAAN,MAAM,QAKjB;;MCIY,SAAU,SAAQ,aAAa;IAkC1C,YAAsB,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AAG,CAAA;AAAtB,mBAAmB;IAN/B,QAAQ,CAAC;QACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAE;QAC1D,OAAO,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;QAC7D,SAAS,EAAE,CAAC,gBAAgB,CAAC;QAC7B,YAAY,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;KACnE,CAAC;GACW,mBAAmB,CAAG;;ACfnC;;GAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-assets-navigator.js","sources":["ng://@c8y/ngx-components/assets-navigator/load-more-node.ts","ng://@c8y/ngx-components/assets-navigator/group-fragment.model.ts","ng://@c8y/ngx-components/assets-navigator/action.enum.ts","ng://@c8y/ngx-components/assets-navigator/asset-node.ts","ng://@c8y/ngx-components/assets-navigator/dynamic-group-node.ts","ng://@c8y/ngx-components/assets-navigator/asset-node-config.model.ts","ng://@c8y/ngx-components/assets-navigator/group.service.ts","ng://@c8y/ngx-components/assets-navigator/asset-node.service.ts","ng://@c8y/ngx-components/assets-navigator/asset-node.factory.ts","ng://@c8y/ngx-components/assets-navigator/assets-navigator.module.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/group-node.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/group-node.service.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/asset-selector.component.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/asset-selector-node.component.ts","ng://@c8y/ngx-components/assets-navigator/asset-selector/asset-selector.module.ts","ng://@c8y/ngx-components/assets-navigator/c8y-ngx-components-assets-navigator.ts"],"sourcesContent":["import { NavigatorNode, gettext } from '@c8y/ngx-components';\n\nexport class LoadMoreNode extends NavigatorNode {\n priority = -Infinity;\n label = gettext('Load more');\n icon = 'plus';\n droppable = true;\n}\n","export enum GroupFragment {\n groupType = 'c8y_DeviceGroup',\n subGroupType = 'c8y_DeviceSubgroup',\n groupFragmentType = 'c8y_IsDeviceGroup',\n dataBrokerSourceFragment = 'c8y_BrokerSource',\n dynamicGroupType = 'c8y_DynamicGroup',\n dynamicGroupFragment = 'c8y_IsDynamicGroup',\n dynamicGroupColumnConfig = 'c8y_UIDeviceFilterConfig',\n dynamicGroupQueryString = 'c8y_DeviceQueryString',\n}\n","export enum Action {\n FETCH,\n NEXT,\n REFRESH,\n LOADING_DONE\n}\n","import { Paging } from '@c8y/client';\nimport { ClickOptions, gettext, NavigatorNode, DeviceStatusComponent } from '@c8y/ngx-components';\nimport { get, has } from 'lodash-es';\nimport { Subject, Subscription } from 'rxjs';\nimport { AssetNodeMo, AssetNodeService } from './asset-node.service';\nimport { LoadMoreNode } from './load-more-node';\nimport { GroupFragment } from './group-fragment.model';\nimport { Action } from './action.enum';\n\nexport class AssetNode extends NavigatorNode {\n root: boolean;\n mo: any;\n\n get label() {\n return (this.root && gettext('Groups')) || this.mo.name || '--';\n }\n\n get hasChildren() {\n return this.root || this.service.groups.isGroup(this.mo);\n }\n\n get iconComponent() {\n return this.isDeviceOrProbablyChildDevice ? DeviceStatusComponent : undefined;\n }\n\n get isDevice() {\n return !!this.mo.c8y_IsDevice;\n }\n\n get isDeviceOrProbablyChildDevice() {\n return this.isDevice || this.isNeitherDeviceOrGroup;\n }\n\n get isNeitherDeviceOrGroup() {\n const { isGroup, isDynamicGroup } = this.service.groups;\n return !isGroup(this.mo) && !isDynamicGroup(this.mo) && !this.isDevice && !this.root;\n }\n\n events: Subject<Action>;\n protected paging: Paging<AssetNodeMo>;\n protected loadMoreNode: LoadMoreNode;\n private onUpdateSubscription: Subscription;\n\n constructor(protected service: AssetNodeService, config = {}) {\n super(config);\n this.root = this.root || false;\n this.mo = this.mo || {};\n this.path = this.root\n ? 'group'\n : this.isDeviceOrProbablyChildDevice\n ? `device/${this.mo.id}`\n : `group/${this.mo.id}`;\n this.draggable = !this.service.moduleConfig.disableDragAndDrop && !this.root;\n this.droppable =\n !this.service.moduleConfig.disableDragAndDrop && !this.isDeviceOrProbablyChildDevice;\n this.routerLinkExact = this.root;\n this.updateIcon(false);\n this.onUpdateSubscription = this.service\n .onUpdate(this)\n .subscribe(({ data, method }) => this.refresh(data, method));\n }\n\n openOnStart(url) {\n const urlRegex = /^\\/group\\//;\n if (this.root) {\n if (this.service.moduleConfig.openOnStart || urlRegex.test(url)) {\n return true;\n }\n }\n const matches = url.match(/\\/(group)\\/(\\d+)/);\n let isMatch = false;\n if (matches) {\n const id = matches[2];\n isMatch = []\n .concat(get(this.mo, 'childAssets.references', []))\n .some(({ managedObject }) => managedObject.id === id);\n return isMatch;\n }\n return false;\n }\n\n refresh(mo: any = {}, method = 'GET') {\n if (mo.id === this.mo.id) {\n this.mo = mo;\n } else if (method === 'DELETE') {\n this.parents.forEach((node: AssetNode) => node.refresh());\n return;\n }\n if (this.events) {\n this.events.next(Action.REFRESH);\n }\n }\n\n click(options: ClickOptions = {}) {\n if (this.isDeviceOrProbablyChildDevice) {\n this.service.preferBreadcrumb(this.parents);\n return;\n }\n this.hookEvents();\n\n this.updateIcon(options.open);\n if (options.open) {\n this.events.next(Action.FETCH);\n }\n }\n\n sort() {\n this.children.sort((a, b) => {\n if (a.priority > b.priority) {\n return -1;\n } else if (a.priority < b.priority) {\n return 1;\n } else {\n return 0;\n }\n });\n }\n\n addManagedObject(mo) {\n const { childAdditions } = this.mo;\n if (!this.isChildAddition(childAdditions, mo)) {\n this.add(this.service.createChildNode(mo));\n }\n }\n\n isChildAddition(childAdditions, mo) {\n return (\n childAdditions && childAdditions.references.some(({ managedObject: { id } }) => id === mo.id)\n );\n }\n\n destroy() {\n this.onUpdateSubscription.unsubscribe();\n }\n\n get canDrop() {\n const nodeToMove = this.service.draggedData;\n if (nodeToMove) {\n const shouldGetChildOfItsOwn = !!nodeToMove.find(child => child === this);\n const isAlreadyChild = (this.children as AssetNode[]).some(\n child => child.mo && child.mo.id === nodeToMove.mo.id\n );\n const preventMove = this === nodeToMove || shouldGetChildOfItsOwn || isAlreadyChild;\n return this.droppable && !preventMove;\n }\n return this.droppable;\n }\n\n dragStart($event) {\n super.dragStart($event);\n this.service.draggedData = this;\n this.service.rootNode.droppable = !this.isDeviceOrProbablyChildDevice;\n }\n\n dragEnd($event) {\n super.dragEnd($event);\n }\n\n async drop($event) {\n super.drop($event);\n const nodeToMove = this.service.draggedData;\n if (this.canDrop) {\n await this.moveNode(nodeToMove);\n } else {\n this.draggedHover = false;\n this.service.draggedData = undefined;\n }\n }\n\n hookEvents() {\n if (!this.events) {\n this.events = new Subject();\n this.events.subscribe(evt => {\n if (!this.loading) {\n this.handleEvent(evt);\n }\n });\n }\n }\n\n protected fetch() {\n return this.root ? this.service.getRootNodes() : this.service.getGroupItems(this.mo.id);\n }\n\n protected async handleEvent(evt: Action) {\n if (!this.children.length && evt === Action.FETCH) {\n this.loading = true;\n this.addNodes(await this.fetch());\n this.loading = false;\n } else if (evt === Action.NEXT) {\n this.loadMoreNode.loading = true;\n this.addNodes(await this.paging.next());\n this.loadMoreNode.loading = false;\n } else if (evt === Action.REFRESH) {\n this.loading = false;\n this.paging = undefined;\n this.loadMoreNode = undefined;\n this.empty();\n this.events.next(Action.FETCH);\n }\n }\n\n protected addNodes(res) {\n if (res.paging) {\n const { currentPage, nextPage, pageSize } = (this.paging = res.paging);\n if (currentPage === 1) {\n this.empty();\n }\n const itemsCount = res.data.length;\n const moreItemsAvailable = !!nextPage && itemsCount === pageSize;\n this.toggleLoadMore(moreItemsAvailable);\n }\n (res.data || res).map(mo => this.addManagedObject(mo));\n this.events.next(Action.LOADING_DONE);\n }\n\n protected toggleLoadMore(show: boolean) {\n if (!this.loadMoreNode && show) {\n this.loadMoreNode = new LoadMoreNode();\n this.add(this.loadMoreNode);\n this.loadMoreNode.click = () => this.events.next(Action.NEXT);\n }\n\n if (this.loadMoreNode) {\n this.loadMoreNode.hidden = !show;\n }\n }\n\n private async moveNode(nodeToMove: AssetNode) {\n try {\n const isCopy = await this.showDropConfirm(nodeToMove);\n await this.verifyNodeAccess(nodeToMove);\n await this.addMovedNode(nodeToMove);\n if (!isCopy) {\n await this.removeMovedNode(nodeToMove);\n }\n this.expand();\n } catch (ex) {\n if (ex) {\n this.service.alert.addServerFailure(ex);\n }\n } finally {\n this.draggedHover = false;\n this.service.draggedData = undefined;\n }\n }\n\n private async showDropConfirm(nodeToMove: AssetNode) {\n this.confirm.title = gettext('Move');\n this.confirm.message = gettext('Do you want to move the group?');\n const buttons: any = [\n {\n label: gettext('Cancel'),\n action: () => Promise.reject()\n },\n {\n label: gettext('Move'),\n status: 'default',\n action: () => Promise.resolve(false)\n }\n ];\n if (nodeToMove.isDeviceOrProbablyChildDevice) {\n this.confirm.title = gettext('Move or add');\n this.confirm.message = gettext('Do you want to move or add the device?');\n buttons.push({\n label: gettext('Add'),\n status: 'primary',\n action: () => Promise.resolve(true)\n });\n }\n return this.confirm.show(buttons);\n }\n\n private async verifyNodeAccess(nodeToMove: AssetNode) {\n return this.service.inventory.update({ id: nodeToMove.mo.id });\n }\n\n private async addMovedNode(nodeToMove: AssetNode) {\n let mo;\n if (this.root) {\n const { data } = await this.service.inventory.update({\n id: nodeToMove.mo.id,\n type: GroupFragment.groupType\n });\n mo = data;\n } else {\n const { data } = await this.service.inventory.childAssetsAdd(nodeToMove.mo, this.mo);\n mo = data;\n }\n this.addManagedObject(mo);\n }\n\n private async removeMovedNode(nodeToMove: AssetNode) {\n for (const parent of nodeToMove.parents as AssetNode[]) {\n if (parent.mo && parent.mo.type === GroupFragment.dynamicGroupType) {\n break; // smart groups don't need to be changed\n }\n if (parent.root) {\n await this.service.inventory.update({\n id: nodeToMove.mo.id,\n type: GroupFragment.subGroupType\n });\n } else {\n await this.service.inventory.childAssetsRemove(nodeToMove.mo, parent.mo);\n }\n parent.remove(nodeToMove);\n }\n }\n\n private updateIcon(open) {\n this.icon = this.service.groups.icon(\n // if it's root we are going to pass a fake mo to get the same icon as groups\n this.root ? { type: GroupFragment.groupType } : this.mo,\n open\n );\n }\n}\n","\nimport { AssetNode } from './asset-node';\nimport { AssetNodeService } from './asset-node.service';\n\nexport class DynamicGroupNode extends AssetNode {\n constructor(\n protected service: AssetNodeService,\n config = {}\n ) {\n super(service, config);\n this.draggable = false;\n this.droppable = false;\n }\n\n get hasChildren() {\n return true;\n }\n\n get query() {\n return this.mo.c8y_DeviceQueryString;\n }\n\n protected fetch(): any {\n return this.service.getDynamicGroupItems(this.query);\n }\n}\n","import { InjectionToken } from '@angular/core';\r\nexport const ASSET_NAVIGATOR_CONFIG = new InjectionToken<AssetNavigatorConfig>('AssetNodeConfig');\r\n\r\nexport interface AssetNavigatorConfig {\r\n smartGroups?: boolean;\r\n openOnStart?: boolean;\r\n rootNodePriority?: number;\r\n disableDragAndDrop?: boolean;\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { GroupFragment } from './group-fragment.model';\nimport { IManagedObject } from '@c8y/client';\n\n@Injectable()\nexport class DeviceGroupService {\n icons = {\n brokerSourceInactive: {\n icon: 'c8y-group-remote-inactive'\n },\n brokerSource: {\n icon: 'c8y-group-remote',\n iconOpen: 'c8y-group-remote-open'\n },\n group: {\n icon: 'c8y-group',\n iconOpen: 'c8y-group-open'\n },\n dynamicGroup: {\n icon: 'c8y-group-smart',\n iconOpen: 'c8y-group-smart-open'\n },\n other: {\n icon: 'circle',\n iconClass: 'statusUnknown'\n }\n };\n dataBrokerSourceFragmentInactive = `_${GroupFragment.dataBrokerSourceFragment}`;\n\n isGroup(mo) {\n return (\n !!mo[GroupFragment.groupFragmentType] ||\n mo.type === GroupFragment.groupType ||\n mo.type === GroupFragment.subGroupType\n );\n }\n\n isDynamicGroup(mo) {\n return !!mo[GroupFragment.dynamicGroupFragment] || mo.type === GroupFragment.dynamicGroupType;\n }\n\n isDataBroker(mo) {\n return (\n !!mo[GroupFragment.dataBrokerSourceFragment] || !!mo[this.dataBrokerSourceFragmentInactive]\n );\n }\n\n isDataBrokerActive(mo) {\n return (\n !!mo[GroupFragment.dataBrokerSourceFragment] && !mo[this.dataBrokerSourceFragmentInactive]\n );\n }\n\n isDevice(mo) {\n return !!mo.c8y_IsDevice;\n }\n\n icon(mo, open = false) {\n let type = 'other';\n if (this.isDynamicGroup(mo)) {\n type = 'dynamicGroup';\n } else if (this.isDataBrokerActive(mo)) {\n type = 'brokerSource';\n } else if (this.isDataBroker(mo)) {\n type = 'brokerSourceInactive';\n } else if (this.isGroup(mo)) {\n type = 'group';\n }\n const icon = this.icons[type];\n return (open && icon.iconOpen) || icon.icon;\n }\n\n isAnyGroup(mo: IManagedObject) {\n return (\n this.isGroup(mo) ||\n this.isDynamicGroup(mo) ||\n this.isDataBroker(mo) ||\n this.isDataBrokerActive(mo)\n );\n }\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { InventoryService, QueriesUtil, UserService, IManagedObject, IResult } from '@c8y/client';\nimport {\n AlertService,\n BreadcrumbService,\n ModalService,\n NavigatorNode,\n AppStateService\n} from '@c8y/ngx-components';\nimport { ApiService } from '@c8y/ngx-components/api';\nimport { empty } from 'rxjs';\nimport { filter, mergeMap } from 'rxjs/operators';\nimport { AssetNode } from './asset-node';\nimport { AssetNavigatorConfig, ASSET_NAVIGATOR_CONFIG } from './asset-node-config.model';\nimport { DynamicGroupNode } from './dynamic-group-node';\nimport { GroupFragment } from './group-fragment.model';\nimport { DeviceGroupService } from './group.service';\n\nexport interface AssetNodeMo {\n id: string;\n type: string;\n}\n\n@Injectable()\nexport class AssetNodeService {\n rootNode: AssetNode;\n firstUrl = true;\n draggedData: AssetNode;\n queriesUtil: QueriesUtil;\n protected PAGE_SIZE = 20;\n\n constructor(\n public inventory: InventoryService,\n public groups: DeviceGroupService,\n public apiService: ApiService,\n public modal: ModalService,\n public alert: AlertService,\n protected breadcrumbService: BreadcrumbService,\n protected user: UserService,\n protected appState: AppStateService,\n @Optional() @Inject(ASSET_NAVIGATOR_CONFIG) public moduleConfig: AssetNavigatorConfig\n ) {\n this.moduleConfig = {\n rootNodePriority: 2000,\n ...(moduleConfig || {})\n };\n this.queriesUtil = new QueriesUtil();\n }\n\n createRootNode() {\n this.rootNode = this.createAssetNode({\n root: true,\n priority: this.moduleConfig.rootNodePriority\n });\n return this.rootNode;\n }\n\n createDynamicGroupNode(config) {\n return new DynamicGroupNode(this, config);\n }\n\n createAssetNode(config) {\n return new AssetNode(this, config);\n }\n\n createChildNode(managedObject) {\n const { type } = managedObject;\n const config: Partial<AssetNode> = { mo: managedObject };\n if (type === GroupFragment.dynamicGroupType) {\n return this.createDynamicGroupNode(config);\n }\n return this.createAssetNode(config);\n }\n\n getRootNodes(customFilter?: any): Promise<any> {\n const defaultFilter = {\n pageSize: this.PAGE_SIZE,\n withChildren: false,\n query: this.queriesUtil.buildQuery(this.navRootQueryFilter())\n };\n const groupFilter = customFilter ? customFilter : defaultFilter;\n\n // due to BE performance limitations we do not allow filtering and sorting for a user without inventory roles\n if (!this.user.hasRole(this.appState.currentUser.value, 'ROLE_INVENTORY_READ')) {\n delete groupFilter.query;\n Object.assign(groupFilter, {\n fragmentType: GroupFragment.groupFragmentType,\n onlyRoots: true\n });\n }\n return this.inventory.list(this.createFilter(groupFilter));\n }\n\n getGroupItems(moId: string, extraFilter: object = {}) {\n const queryFilter = {\n withChildren: false,\n pageSize: this.PAGE_SIZE,\n query: this.groupQueryFilter(moId)\n };\n return this.inventory.childAssetsList(moId, { ...queryFilter, ...extraFilter });\n }\n\n getDynamicGroupItems(groupQuery: string, filterObj: any = {}) {\n const { query, ...queryParams } = filterObj;\n const orderByQuery = query;\n const queryFilter = {\n q: this.buildCombinedQuery(groupQuery, orderByQuery),\n ...queryParams\n };\n return this.inventory.list(this.createFilter(queryFilter));\n }\n\n getDeviceChildren(moId: string, extraFilter: object = {}) {\n const queryFilter = {\n withChildren: false,\n pageSize: this.PAGE_SIZE,\n query: this.groupQueryFilter(moId)\n };\n return this.inventory.childDevicesList(moId, { ...queryFilter, ...extraFilter });\n }\n\n groupQueryFilter(moId: string) {\n return `$filter=(bygroupid(${moId}))$orderby=name`;\n }\n\n navRootQueryFilter() {\n const navRootFilter = this.rootQueryFilter();\n navRootFilter.__orderby = [{ name: 1 }];\n return navRootFilter;\n }\n\n rootQueryFilter() {\n const { moduleConfig } = this;\n const rootFilter = {\n __filter: {\n type: `${GroupFragment.groupType}`\n },\n __orderby: []\n };\n if (moduleConfig.smartGroups) {\n const queryFilter = {\n __filter: {\n __and: [\n {\n type: `${GroupFragment.dynamicGroupType}`\n },\n {\n __has: `${GroupFragment.dynamicGroupFragment}`\n },\n { __not: { __has: `${GroupFragment.dynamicGroupFragment}.invisible` } }\n ]\n }\n };\n this.queriesUtil.addOrFilter(rootFilter, queryFilter);\n }\n return rootFilter;\n }\n\n onUpdate({ mo, root }) {\n if (mo.id) {\n return this.apiService\n .hookResponse(\n ({ url, method }) =>\n ['PUT', 'DELETE', 'POST'].includes(method) &&\n RegExp(`((inventory/managedObjects)|(service/smartgroup/smartgroups))/${mo.id}`).test(\n url\n )\n )\n .pipe(\n filter(() => !this.draggedData),\n mergeMap(this.apiService.resolveData),\n filter(response => !response.data.c8y_Dashboard)\n );\n } else if (root) {\n return this.apiService\n .hookResponse(\n ({ url, method }) =>\n RegExp('((inventory/managedObjects)|(service/smartgroup/smartgroups))/?$').test(url) &&\n method === 'POST'\n )\n .pipe(\n mergeMap(this.apiService.resolveData),\n filter(response => this.isNewManagedObjectRoot(response))\n );\n } else {\n return empty();\n }\n }\n\n isNewManagedObjectRoot(response: Partial<IResult<IManagedObject>> = {}) {\n const { data } = response;\n let isRootAsset = false;\n\n if (typeof data === 'object') {\n isRootAsset = !!data[GroupFragment.groupFragmentType];\n if (!isRootAsset && this.moduleConfig.smartGroups) {\n isRootAsset = !!data[GroupFragment.dynamicGroupFragment];\n }\n }\n return isRootAsset;\n }\n\n /**\n * There could be multiple breadcrumbs for devices,\n * so we set a preferred one on click on a device.\n * @param parents The parent nodes of the device to select the prefered one.\n */\n preferBreadcrumb(parents: NavigatorNode[]) {\n if (parents.length === 1) {\n this.breadcrumbService.selectPreferredByPath(parents[0].path);\n }\n }\n\n protected createFilter(extraParams: any = {}) {\n const params = {\n currentPage: 1,\n withTotalPages: true,\n pageSize: 10\n };\n return { ...params, ...extraParams };\n }\n\n private buildCombinedQuery(query, orderByQuery) {\n let combinedQuery;\n if (query && orderByQuery) {\n const filterQuery = this.queriesUtil.buildQuery({\n __useFilterQueryString: query\n });\n combinedQuery = `${filterQuery} ${orderByQuery}`;\n } else {\n combinedQuery = query || orderByQuery || '';\n }\n return combinedQuery;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AssetNodeService } from './asset-node.service';\nimport { NavigatorNode } from '@c8y/ngx-components';\n\n@Injectable()\nexport class AssetNodeFactory {\n constructor(private service: AssetNodeService) {}\n\n get(): NavigatorNode {\n if (!this.service.rootNode) {\n this.service.createRootNode();\n }\n return this.service.rootNode;\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { HOOK_NAVIGATOR_NODES, ModalModule, ModalService, DeviceStatusComponent, DeviceStatusModule} from '@c8y/ngx-components';\nimport { ASSET_NAVIGATOR_CONFIG} from './asset-node-config.model';\nimport { AssetNodeFactory } from './asset-node.factory';\nimport { AssetNodeService } from './asset-node.service';\nimport { AssetNavigatorConfig } from './asset-node-config.model';\nimport { DeviceGroupService } from './group.service';\n\n@NgModule({\n declarations: [],\n imports: [\n ModalModule,\n DeviceStatusModule\n ],\n providers: [\n ModalService,\n AssetNodeService,\n DeviceGroupService,\n {\n provide: HOOK_NAVIGATOR_NODES, useClass: AssetNodeFactory, multi: true\n }\n ],\n entryComponents: [DeviceStatusComponent]\n})\nexport class AssetsNavigatorModule {\n static config(config: AssetNavigatorConfig): ModuleWithProviders {\n return {\n ngModule: AssetsNavigatorModule,\n providers: [\n {\n provide: ASSET_NAVIGATOR_CONFIG, useValue: config\n }\n ],\n };\n }\n\n}\n","import { GroupNodeService } from './group-node.service';\nimport { AssetNode } from '../asset-node';\n\nexport class GroupNode extends AssetNode {\n // FIXME: Currently hasChildren returns true if it is a group,\n // Issue is, that we disable the children in the API\n // getGroupItems service call due to performance. This leads\n // to that the dropdown chevron is shown always. Issue is,\n // that even if we return the chevrons, we have no way to determine\n // if the childAssets contain groups or other assets (like dashboards).\n // get hasChildren() {\n // return this.root || this.service.groups.isGroup(this.mo) && (this.mo as IManagedObject).childAssets.references.length > 0;\n // }\n\n /**\n * Creates a new node which shows only groups.\n *\n * @param service The service to use.\n * @param config The default configuration of the node.\n */\n constructor(protected service: GroupNodeService, config = {}) {\n super(service, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AssetNodeService } from '../asset-node.service';\nimport { GroupNode } from './group-node';\nimport { GroupFragment } from '../group-fragment.model';\n\n@Injectable()\nexport class GroupNodeService extends AssetNodeService {\n protected PAGE_SIZE = 5;\n\n createGroupNode(config) {\n return new GroupNode(this, config);\n }\n\n createChildNode(managedObject): GroupNode {\n const config: Partial<GroupNode> = { mo: managedObject };\n return this.createGroupNode(config);\n }\n\n subAssetsQueryFilter() {\n const rootQueryFilter = this.rootQueryFilter();\n const filter = this.queriesUtil.addOrFilter(rootQueryFilter, {\n type: GroupFragment.subGroupType\n });\n return this.queriesUtil.buildQuery(filter);\n }\n\n getGroupItems(moId: string): Promise<any> {\n return this.inventory.childAssetsList(moId, {\n query: this.subAssetsQueryFilter(),\n withChildren: false,\n pageSize: this.PAGE_SIZE,\n withTotalPages: true\n });\n }\n}\n","import { Component, Output, Input, EventEmitter, OnInit } from '@angular/core';\nimport { GroupNodeService } from './group-node.service';\nimport { GroupNode } from './group-node';\nimport { IManagedObject } from '@c8y/client';\n\n/**\n * Displays a hierarchical tree selector for assets.\n */\n@Component({\n selector: 'c8y-asset-selector',\n templateUrl: './asset-selector.component.html'\n})\nexport class AssetSelectorComponent implements OnInit {\n /**\n * An array of predefined nodes.\n */\n @Input() selected: IManagedObject[] = [];\n /**\n * Emits if one item was selected (all currently selected nodes).\n */\n @Output() onChange = new EventEmitter<IManagedObject[]>();\n /**\n * @ignore\n */\n rootNode: GroupNode;\n\n /**\n * @ignore only DI\n */\n constructor(private groupNodeService: GroupNodeService) {}\n\n /**\n * @ignore\n */\n ngOnInit(): void {\n this.rootNode = this.groupNodeService.createGroupNode({ root: true });\n }\n\n /**\n * Adds an managed object to the selected array and emits the change.\n * @param selectedMo The selected asset.\n */\n select(selectedMo: IManagedObject) {\n const index = this.getIndexOfSelected(this.selected, selectedMo);\n if (index === -1) {\n this.selected.push(selectedMo);\n }\n this.onChange.emit(this.selected);\n }\n\n /**\n * Removes a managed object from the selected array and emits the change.\n * @param selectedMo The selected asset.\n */\n deselect(selectedMo: IManagedObject) {\n const index = this.getIndexOfSelected(this.selected, selectedMo);\n if (index > -1) {\n this.selected.splice(index, 1);\n }\n this.onChange.emit(this.selected);\n }\n\n getIndexOfSelected(selected: Array<Partial<IManagedObject>>, selectedMo: IManagedObject) {\n return selected.findIndex(mo => mo.id === selectedMo.id);\n }\n}\n","import { Component, Input, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { GroupNode } from './group-node';\nimport { Subject } from 'rxjs';\nimport { takeUntil, filter } from 'rxjs/operators';\nimport { AssetSelectorComponent } from './asset-selector.component';\nimport { IManagedObject } from '@c8y/client';\nimport { Action } from '../action.enum';\n\n@Component({\n selector: 'c8y-asset-selector-node',\n templateUrl: './asset-selector-node.component.html'\n})\nexport class AssetSelectorNodeComponent implements OnInit {\n /**\n * The current node.\n */\n @Input() node: GroupNode;\n /**\n * All preselected items\n */\n @Input() preselected: Array<Partial<IManagedObject>> = [];\n /**\n * Should the path be shown\n */\n @Input() showPath: boolean = false;\n /**\n * The current path to the node\n */\n breadcrumb: string;\n /**\n * @ignore\n */\n level: number = 0;\n /**\n * The selection status of the node\n */\n checked: boolean = false;\n /**\n * @ignore\n */\n unsubscribe$ = new Subject<any>();\n\n /**\n * @ignore\n */\n get expandTitle() {\n return !this.node.open ? gettext('Expand') : gettext('Collapse');\n }\n\n /**\n * @ignore only di\n */\n constructor(\n private translateService: TranslateService,\n private cd: ChangeDetectorRef,\n private parentNode: AssetSelectorComponent\n ) {}\n\n /**\n * @ignore\n */\n async ngOnInit() {\n this.breadcrumb = this.node.label;\n this.setupBreadcrumbsAndLevel(this.node);\n\n if (this.node instanceof GroupNode) {\n this.node.hookEvents();\n }\n\n // open on startup\n if (this.node.root) {\n this.click();\n }\n\n if (this.node.events) {\n this.node.events\n .pipe(\n takeUntil(this.unsubscribe$),\n filter((a: Action) => a === Action.LOADING_DONE)\n )\n .subscribe(() => {\n this.cd.markForCheck();\n });\n }\n\n this.checked = this.isPreselected();\n }\n\n /**\n * Opens a node.\n */\n click() {\n this.node.open = !this.node.open;\n this.node.click({ open: this.node.open });\n }\n\n /**\n * TODO: Only level used. Breadcrumbs needs to be implemented.\n */\n setupBreadcrumbsAndLevel(node: GroupNode) {\n if (node.parents && node.parents.length) {\n const parent = node.parents[0] as GroupNode;\n this.breadcrumb = this.translateService.instant(parent.label) + ' > ' + this.breadcrumb;\n this.level++;\n\n this.setupBreadcrumbsAndLevel(parent);\n }\n }\n\n /**\n * Selects the node and emits a change on the parent component.\n * @param node The node to select.\n */\n selected(node: GroupNode) {\n this.checked = !this.checked;\n this.updateSelection(node.mo);\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this.unsubscribe$.next(true);\n this.unsubscribe$.complete();\n }\n\n private isPreselected() {\n if (this.node.root || !this.node.mo) {\n return false;\n }\n return this.parentNode.getIndexOfSelected(this.preselected, this.node.mo) > -1;\n }\n\n private updateSelection(selectedMo: IManagedObject) {\n if (this.checked) {\n this.parentNode.select(selectedMo);\n return;\n }\n this.parentNode.deselect(selectedMo);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@c8y/ngx-components';\nimport { CollapseModule } from 'ngx-bootstrap/collapse';\nimport { BsDropdownModule } from 'ngx-bootstrap/dropdown';\nimport { GroupNodeService } from './group-node.service';\n\nimport { AssetSelectorNodeComponent } from './asset-selector-node.component';\nimport { AssetSelectorComponent } from './asset-selector.component';\n\n@NgModule({\n imports: [CommonModule, CollapseModule, BsDropdownModule ],\n exports: [AssetSelectorNodeComponent, AssetSelectorComponent],\n providers: [GroupNodeService],\n declarations: [AssetSelectorNodeComponent, AssetSelectorComponent]\n})\nexport class AssetSelectorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["tslib_1.__param","tslib_1.__decorate"],"mappings":";;;;;;;;;;;;MAEa,YAAa,SAAQ,aAAa;IAA/C;;QACE,aAAQ,GAAG,CAAC,QAAQ,CAAC;QACrB,UAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAC7B,SAAI,GAAG,MAAM,CAAC;QACd,cAAS,GAAG,IAAI,CAAC;KAClB;CAAA;;ICPW,aASX;AATD,WAAY,aAAa;IACvB,8CAA6B,CAAA;IAC7B,oDAAmC,CAAA;IACnC,wDAAuC,CAAA;IACvC,8DAA6C,CAAA;IAC7C,sDAAqC,CAAA;IACrC,4DAA2C,CAAA;IAC3C,sEAAqD,CAAA;IACrD,kEAAiD,CAAA;CAClD,EATW,aAAa,KAAb,aAAa,QASxB;;ICTW,MAKX;AALD,WAAY,MAAM;IAChB,qCAAK,CAAA;IACL,mCAAI,CAAA;IACJ,yCAAO,CAAA;IACP,mDAAY,CAAA;CACb,EALW,MAAM,KAAN,MAAM,QAKjB;;MCIY,SAAU,SAAQ,aAAa;IAkC1C,YAAsB,OAAyB,EAAE,MAAM,GAAG,EAAE;QAC1D,KAAK,CAAC,MAAM,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAkB;QAE7C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC;QAC/B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;cACjB,OAAO;cACP,IAAI,CAAC,6BAA6B;kBAClC,UAAU,IAAI,CAAC,EAAE,CAAC,EA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EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;KACnE,CAAC;GACW,mBAAmB,CAAG;;ACfnC;;GAEG;;;;"}
|
|
@@ -1063,6 +1063,11 @@ let AddFirmwareModalComponent = class AddFirmwareModalComponent {
|
|
|
1063
1063
|
};
|
|
1064
1064
|
this.saving = false;
|
|
1065
1065
|
this.firmwarePreselected = false;
|
|
1066
|
+
this.textForFirmwareUrlPopover = gettext(`Path for binaries can vary depending on device agent implementation, e.g.:
|
|
1067
|
+
/firmware/binaries/firmware1.bin
|
|
1068
|
+
https://firmware/binary/123
|
|
1069
|
+
ftp://firmware/binary/123.tar.gz
|
|
1070
|
+
`);
|
|
1066
1071
|
}
|
|
1067
1072
|
ngOnInit() {
|
|
1068
1073
|
this.setInitialState();
|
|
@@ -1164,7 +1169,7 @@ __decorate([
|
|
|
1164
1169
|
AddFirmwareModalComponent = __decorate([
|
|
1165
1170
|
Component({
|
|
1166
1171
|
selector: 'c8y-add-firmware-software-modal',
|
|
1167
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!firmwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new firmware\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #firmwareForm=\"ngForm\"\n (ngSubmit)=\"firmwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"firmwarePreselected\">\n <c8y-form-group>\n <label for=\"firmwareName\" translate>Firmware</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"firmwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let firmware of firmwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onFirmwareSelect(firmware)\"\n [active]=\"model.selected === firmware\"\n >\n <c8y-highlight\n [text]=\"firmware.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`firmware`? </span>\n <button\n title=\"{{ 'Create new`firmware`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`firmware`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDescription\" translate>Description</label>\n <input\n id=\"firmwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Firmware for hardware revision b' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"firmwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"firmwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"firmwareVersion\" translate>Version</label>\n <input\n id=\"firmwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Firmware file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add firmware' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !firmwareForm.form.valid ||\n firmwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add firmware\n </button>\n </div>\n </form>\n</div>\n"
|
|
1172
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!firmwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new firmware\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #firmwareForm=\"ngForm\"\n (ngSubmit)=\"firmwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"firmwarePreselected\">\n <c8y-form-group>\n <label for=\"firmwareName\" translate>Firmware</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"firmwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let firmware of firmwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onFirmwareSelect(firmware)\"\n [active]=\"model.selected === firmware\"\n >\n <c8y-highlight\n [text]=\"firmware.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`firmware`? </span>\n <button\n title=\"{{ 'Create new`firmware`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`firmware`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDescription\" translate>Description</label>\n <input\n id=\"firmwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Firmware for hardware revision b' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"firmwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"firmwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"firmwareVersion\" translate>Version</label>\n <input\n id=\"firmwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Firmware file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\" [fileUrlPopover]=\"textForFirmwareUrlPopover\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add firmware' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !firmwareForm.form.valid ||\n firmwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add firmware\n </button>\n </div>\n </form>\n</div>\n"
|
|
1168
1173
|
})
|
|
1169
1174
|
], AddFirmwareModalComponent);
|
|
1170
1175
|
|
|
@@ -1174,6 +1179,11 @@ let AddFirmwarePatchModalComponent = class AddFirmwarePatchModalComponent {
|
|
|
1174
1179
|
this.repository = repository;
|
|
1175
1180
|
this.alert = alert;
|
|
1176
1181
|
this.saved = new EventEmitter();
|
|
1182
|
+
this.textForFirmwareUrlPopover = gettext(`Path for binaries can vary depending on device agent implementation, e.g.:
|
|
1183
|
+
/firmware/binaries/firmware1.bin
|
|
1184
|
+
https://firmware/binary/123
|
|
1185
|
+
ftp://firmware/binary/123.tar.gz
|
|
1186
|
+
`);
|
|
1177
1187
|
this.model = {
|
|
1178
1188
|
selected: undefined,
|
|
1179
1189
|
dependency: null,
|
|
@@ -1278,7 +1288,7 @@ __decorate([
|
|
|
1278
1288
|
AddFirmwarePatchModalComponent = __decorate([
|
|
1279
1289
|
Component({
|
|
1280
1290
|
selector: 'c8y-add-firmware-patch-modal.component',
|
|
1281
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware patch\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\">\n <p class=\"lead m-0\" translate>\n Select a firmware version\n </p>\n </div>\n\n <form
|
|
1291
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware patch\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\">\n <p class=\"lead m-0\" translate>\n Select a firmware version\n </p>\n </div>\n\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #firmwarePatchForm=\"ngForm\"\n (ngSubmit)=\"firmwarePatchForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"firmwarePreselected\">\n <c8y-form-group>\n <label for=\"firmwareName\" translate>Firmware</label>\n <c8y-typeahead\n [ngModel]=\"model.selected\"\n name=\"firmwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"firmwareInput$.next($event)\"\n [allowFreeEntries]=\"false\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"let firmware of firmwares$ | async; loadMore: 'auto'\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"model.selected = firmware; firmwareSelected$.next(firmware)\"\n [active]=\"model.selected === firmware\"\n >\n <c8y-highlight\n [text]=\"firmware.name || '--'\"\n [pattern]=\"firmwareInput$ | async\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <c8y-messages\n ><c8y-message\n name=\"notExisting\"\n [text]=\"'Select one of the existing firmwares.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"patchDependency\" class=\"m-r-8\" translate>Version</label>\n <c8y-typeahead\n [ngModel]=\"model.dependency\"\n name=\"patchDependency\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"patchDependencyInput$.next($event)\"\n [displayProperty]=\"'c8y_Firmware.version'\"\n [allowFreeEntries]=\"false\"\n [disabled]=\"\n (baseVersions$ | async) === null || (baseVersions$ | async)?.data.length === 0\n \"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let baseVersion of baseVersions$;\n loadMore: 'auto';\n pipe: baseVersionsFilterPipe\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"model.dependency = baseVersion\"\n [active]=\"model.dependency === baseVersion\"\n >\n <c8y-highlight\n [text]=\"baseVersion.c8y_Firmware.version || '--'\"\n [pattern]=\"patchDependencyInput$ | async\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <c8y-messages\n ><c8y-message\n name=\"notExisting\"\n [text]=\"'Select one of the existing versions.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"patchVersion\" translate>Patch</label>\n <input\n id=\"patchVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"patchVersion\"\n [(ngModel)]=\"model.patchVersion\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n required\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Patch file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\" [fileUrlPopover]=\"textForFirmwareUrlPopover\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n <button\n title=\"{{ 'Add firmware patch' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !firmwarePatchForm.form.valid ||\n firmwarePatchForm.form.pristine ||\n (!model.binary?.url && !model.binary?.file) ||\n saving\n \"\n translate\n >\n Add firmware patch\n </button>\n </div>\n </form>\n</div>\n"
|
|
1282
1292
|
})
|
|
1283
1293
|
], AddFirmwarePatchModalComponent);
|
|
1284
1294
|
|
|
@@ -1544,6 +1554,11 @@ let AddSoftwareModalComponent = class AddSoftwareModalComponent {
|
|
|
1544
1554
|
};
|
|
1545
1555
|
this.saving = false;
|
|
1546
1556
|
this.softwarePreselected = false;
|
|
1557
|
+
this.textForSoftwareUrlPopover = gettext(`Path for binaries can vary depending on device agent implementation, e.g.:
|
|
1558
|
+
/software/binaries/software1.bin
|
|
1559
|
+
https://software/binary/123
|
|
1560
|
+
ftp://software/binary/123.tar.gz
|
|
1561
|
+
`);
|
|
1547
1562
|
}
|
|
1548
1563
|
ngOnInit() {
|
|
1549
1564
|
this.setInitialState();
|
|
@@ -1645,7 +1660,7 @@ __decorate([
|
|
|
1645
1660
|
AddSoftwareModalComponent = __decorate([
|
|
1646
1661
|
Component({
|
|
1647
1662
|
selector: 'c8y-add-software-software-modal',
|
|
1648
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n <h4 translate>\n Add software\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!softwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new software\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #softwareForm=\"ngForm\"\n (ngSubmit)=\"softwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"softwarePreselected\">\n <c8y-form-group>\n <label for=\"softwareName\" translate>Software</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"softwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let software of softwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onSoftwareSelect(software)\"\n [active]=\"model.selected === software\"\n >\n <c8y-highlight\n [text]=\"software.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`software`? </span>\n <button\n title=\"{{ 'Create new`software`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`software`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDescription\" translate>Description</label>\n <input\n id=\"softwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Cloud connectivity software' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"softwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"softwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"softwareVersion\" translate>Version</label>\n <input\n id=\"softwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Software file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add software' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !softwareForm.form.valid ||\n softwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add software\n </button>\n </div>\n </form>\n</div>\n"
|
|
1663
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n <h4 translate>\n Add software\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!softwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new software\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #softwareForm=\"ngForm\"\n (ngSubmit)=\"softwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"softwarePreselected\">\n <c8y-form-group>\n <label for=\"softwareName\" translate>Software</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"softwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let software of softwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onSoftwareSelect(software)\"\n [active]=\"model.selected === software\"\n >\n <c8y-highlight\n [text]=\"software.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`software`? </span>\n <button\n title=\"{{ 'Create new`software`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`software`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDescription\" translate>Description</label>\n <input\n id=\"softwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Cloud connectivity software' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"softwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"softwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"softwareVersion\" translate>Version</label>\n <input\n id=\"softwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Software file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\" [fileUrlPopover]=\"textForSoftwareUrlPopover\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add software' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !softwareForm.form.valid ||\n softwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add software\n </button>\n </div>\n </form>\n</div>\n"
|
|
1649
1664
|
})
|
|
1650
1665
|
], AddSoftwareModalComponent);
|
|
1651
1666
|
|
|
@@ -1841,6 +1856,11 @@ let ConfigurationDetailComponent = class ConfigurationDetailComponent {
|
|
|
1841
1856
|
this.mo = {};
|
|
1842
1857
|
this.saving = false;
|
|
1843
1858
|
this.uploadChoice = 'uploadBinary';
|
|
1859
|
+
this.textForConfigurationUrlPopover = gettext(`Path for binaries can vary depending on device agent implementation, e.g.:
|
|
1860
|
+
/configuration/binaries/configuration1.bin
|
|
1861
|
+
https://configuration/binary/123
|
|
1862
|
+
ftp://configuration/binary/123.tar.gz
|
|
1863
|
+
`);
|
|
1844
1864
|
this.result = new Promise((resolve, reject) => {
|
|
1845
1865
|
this._save = resolve;
|
|
1846
1866
|
this._cancel = reject;
|
|
@@ -1925,7 +1945,7 @@ __decorate([
|
|
|
1925
1945
|
ConfigurationDetailComponent = __decorate([
|
|
1926
1946
|
Component({
|
|
1927
1947
|
selector: 'c8y-configuration-detail',
|
|
1928
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4 translate *ngIf=\"mo.id\">Update configuration</h4>\n <h4 translate *ngIf=\"!mo.id\">Add configuration</h4>\n </div>\n\n <form class=\"d-contents\" #configurationForm=\"ngForm\" (ngSubmit)=\"configurationForm.form.valid && save()\">\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <c8y-form-group>\n <label translate>Name</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n name=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"deviceType\"\n name=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"description\"\n name=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n [(ngModel)]=\"selected\"\n name=\"confType\"\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"selected = config; setPipe('')\"\n [active]=\"selected === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"pattern.length > 0\">\n <span translate>No match found, add new`configuration`?</span>\n <button title=\"Create new`configuration`\" type=\"button\" class=\"btn btn-primary btn-xs m-l-16\" translate>\n Create new`configuration`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Configuration file</div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n >\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n (click)=\"cancel()\"\n type=\"button\"\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n title=\"{{ submitButtonTitle | translate }}\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n"
|
|
1948
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4 translate *ngIf=\"mo.id\">Update configuration</h4>\n <h4 translate *ngIf=\"!mo.id\">Add configuration</h4>\n </div>\n\n <form class=\"d-contents\" #configurationForm=\"ngForm\" (ngSubmit)=\"configurationForm.form.valid && save()\">\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <c8y-form-group>\n <label translate>Name</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n name=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"deviceType\"\n name=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"description\"\n name=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n [(ngModel)]=\"selected\"\n name=\"confType\"\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"selected = config; setPipe('')\"\n [active]=\"selected === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"pattern.length > 0\">\n <span translate>No match found, add new`configuration`?</span>\n <button title=\"Create new`configuration`\" type=\"button\" class=\"btn btn-primary btn-xs m-l-16\" translate>\n Create new`configuration`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Configuration file</div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n (click)=\"cancel()\"\n type=\"button\"\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n title=\"{{ submitButtonTitle | translate }}\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n"
|
|
1929
1949
|
})
|
|
1930
1950
|
], ConfigurationDetailComponent);
|
|
1931
1951
|
|