diff --git a/src/organization/device/device_list.component.html b/src/organization/device/device_list.component.html index bbc6bc11032..c04c89946ee 100755 --- a/src/organization/device/device_list.component.html +++ b/src/organization/device/device_list.component.html @@ -78,7 +78,10 @@

-
{{col.header}}
+
+ {{ col.field === 'cis' ? primaryFrameworkName : col.header }} + +
{{col.header}}
@@ -190,7 +193,9 @@
- +
diff --git a/src/organization/device/device_list.component.ts b/src/organization/device/device_list.component.ts index f1e37f42c02..73239376b7f 100755 --- a/src/organization/device/device_list.component.ts +++ b/src/organization/device/device_list.component.ts @@ -1,7 +1,7 @@ import { Component, ViewChild, Injector } from '@angular/core'; import { DeviceService } from './device.service'; import { FormGroup, FormControl } from '@angular/forms'; -import { DeviceListItem, RequestExportForm } from './device_response'; +import { DeviceListItem, RequestExportForm, DeviceListResponse } from './device_response'; import { LabelListItem } from 'organization/admin/label/label.response'; import { ColumnWithSort } from 'common/object'; import { LabelCreateDialogComponent } from 'organization/admin/label/label_create_dialog.component'; @@ -40,6 +40,7 @@ export class DeviceListComponent extends BaseDevice { { field: 'risc_rating_a', header: 'A', tooltip: 'Availability', order: 0, width: '50px', disabled: false } ]; public isUpgrade: boolean = false; + public primaryFrameworkName: string; constructor( service: DeviceService, @@ -94,6 +95,11 @@ export class DeviceListComponent extends BaseDevice { this.service.setDisabledColumns(this.disabledColumns); } + listResponseHandler(response: DeviceListResponse) { + super.listResponseHandler(response); + this.primaryFrameworkName = response.hasOwnProperty('primary_framework_name') ? `${response.primary_framework_name} Score` : 'Benchmark Score'; + } + refresh() { super.refresh(); this.setLabels(); diff --git a/src/organization/device/device_response.ts b/src/organization/device/device_response.ts index 5dfb46ea757..748f1194a04 100755 --- a/src/organization/device/device_response.ts +++ b/src/organization/device/device_response.ts @@ -1,11 +1,11 @@ -import {BasicListResponse} from '../../common/response'; -import {LoggedInUserDetailItem} from '../loggedin_user/loggedin_user_response'; -import {BasicListRequest} from '../../common/request'; +import { BasicListResponse } from '../../common/response'; +import { LoggedInUserDetailItem } from '../loggedin_user/loggedin_user_response'; import { DeviceSoftwareItem } from './detail/software/device-software.response'; import { SubnetDevice } from 'organization/admin/subnets/subnet_response'; export interface DeviceListResponse extends BasicListResponse { items: Array; + primary_framework_name: string; } export interface BenchmarkTemp {