File

repository/software/list/software-list.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(repositoryService: RepositoryService, gridService: DataGridService, modalService: ModalService, bsModalService: BsModalService, translateService: TranslateService, alertService: AlertService, router: Router, activatedRoute: ActivatedRoute)
Parameters :
Name Type Optional
repositoryService RepositoryService No
gridService DataGridService No
modalService ModalService No
bsModalService BsModalService No
translateService TranslateService No
alertService AlertService No
router Router No
activatedRoute ActivatedRoute No

Methods

addSoftware
addSoftware()
Returns : void
Async deleteSoftware
deleteSoftware(software: IManagedObject)
Parameters :
Name Type Optional
software IManagedObject No
Returns : any
editSoftware
editSoftware(software: Partial)
Parameters :
Name Type Optional
software Partial<IManagedObject> No
Returns : void
ngOnInit
ngOnInit()
Returns : void
Async onDataSourceModifier
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
Parameters :
Name Type Optional
dataSourceModifier DataSourceModifier No
trackByName
trackByName(_index, column: Column)
Parameters :
Name Type Optional
_index No
column Column No
Returns : string

Properties

actionControls
Type : ActionControl[]
Default value : []
columns
Type : Column[]
Default value : [ new RepositoryItemNameGridColumn({ filterLabel: gettext('Filter software by name') }), new DescriptionGridColumn({ filterLabel: gettext('Filter software by description'), placeholder: gettext('Cloud connectivity software') }), new DeviceTypeGridColumn({ filterLabel: gettext('Filter software by device type') }), new TypeGridColumn({ header: gettext('Software type'), filterLabel: gettext('Filter by software type'), example: 'yum', path: 'softwareType', repositoryType: RepositoryType.SOFTWARE }), new VersionsGridColumn() ]
noDataMessage
Default value : gettext('No software to display.')
noDataSubtitle
Default value : gettext('Add a new software by clicking below.')
noResultsMessage
Default value : gettext('No results to display.')
noResultsSubtitle
Default value : gettext('Refine your search terms or check your spelling.')
pagination
Type : object
Default value : { pageSize: 50, currentPage: 1 }
refresh$
Type : EventEmitter<void>
Default value : new EventEmitter()
serverSideDataCallback
Type : ServerSideDataCallback
sizeRequest
Type : Promise<number>
sizeRequestDone
Default value : false
<c8y-title>
  {{ 'Software repository' | translate }}
</c8y-title>
<c8y-breadcrumb>
  <c8y-breadcrumb-item
    icon="c8y-management"
    label="{{ 'Management' | translate }}"
  ></c8y-breadcrumb-item>
  <c8y-breadcrumb-item
    icon="c8y-tools"
    label="{{ 'Software repository' | translate }}"
  ></c8y-breadcrumb-item>
</c8y-breadcrumb>

<c8y-action-bar-item [placement]="'right'">
  <button
    class="btn btn-link"
    title="{{ 'Add software' | translate }}"
    type="button"
    (click)="addSoftware()"
  >
    <i c8yIcon="plus-circle"></i>
    {{ 'Add software' | translate }}
  </button>
</c8y-action-bar-item>

<c8y-help
  src="/docs/device-management-application/managing-device-data/#managing-software"
></c8y-help>

<div class="content-fullpage border-top border-bottom">
  <c8y-data-grid
    [title]="'Software' | translate"
    [refresh]="refresh$"
    [pagination]="pagination"
    [columns]="columns"
    [actionControls]="actionControls"
    [infiniteScroll]="'auto'"
    [serverSideDataCallback]="serverSideDataCallback"
  >
    <c8y-ui-empty-state
      [icon]="stats?.size > 0 ? 'search' : 'c8y-tools'"
      [title]="stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)"
      [subtitle]="stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)"
      *emptyStateContext="let stats"
      [horizontal]="stats?.size > 0"
    >
      <p *ngIf="stats?.size === 0">
        <button
          class="btn btn-primary"
          [title]="'Add software' | translate"
          type="button"
          (click)="addSoftware()"
        >
          {{ 'Add software' | translate }}
        </button>
      </p>
    </c8y-ui-empty-state>
    <ng-container *ngFor="let column of columns; trackBy: trackByName">
      <c8y-column [name]="column.name"></c8y-column>
    </ng-container>
  </c8y-data-grid>
</div>

results matching ""

    No results matching ""