module Sfx { export interface ISystemAppsViewScope extends angular . IScope { systemApp : SystemApplication ; listSettings : ListSettings ; healthEventsListSettings : ListSettings ; unhealthyEvaluationsListSettings : ListSettings ; } export class SystemAppsViewController extends MainViewController { constructor ( $injector , private $scope ) { super ( $injector , { "essentials" : { name : "Essentials" } , "details" : { name : "Details" } } ) ; this . tabs [ "essentials" ] . refresh = ( messageHandler ) => this . refreshEssentials ( messageHandler ) ; this . selectTreeNode ( [ IdGenerator . cluster ( ) , IdGenerator . systemAppGroup ( ) ] ) ; this . $scope . listSettings = this . settings . getNewOrExistingListSettings ( "systemServices" , [ "name" ] , [ new ListColumnSettingForLink ( "name" , "Name" , item => item . viewPath ) , new ListColumnSetting ( "raw.TypeName" , "Service Type" ) , new ListColumnSetting ( "raw.ManifestVersion" , "Version" ) , new ListColumnSettingWithFilter ( "raw.ServiceKind" , "Service Kind" ) , new ListColumnSettingForBadge ( "healthState" , "Health State" ) , new ListColumnSettingWithFilter ( "raw.ServiceStatus" , "Status" ) ] ) ; this . $scope . healthEventsListSettings = this . settings . getNewOrExistingHealthEventsListSettings ( ) ; this . $scope . unhealthyEvaluationsListSettings = this . settings . getNewOrExistingUnhealthyEvaluationsListSettings ( ) ; this . refresh ( ) ; } protected refreshCommon ( messageHandler ? ) { return this . data . getSystemApp ( true , messageHandler ) . then ( systemApp => { this . $scope . systemApp = systemApp ; } ) ; } private refreshEssentials ( messageHandler ? ) { return this . $scope . systemApp . services . refresh ( messageHandler ) ; } } ( function ( ) { let module = angular . module ( "systemAppsViewController" , [ "dataService" , "filters" ] ) ; module . controller ( "SystemAppsViewController" , [ "$injector" , "$scope" , SystemAppsViewController ] ) ; } ) ( ) ; }