class InfrastructureKeyTable(Table): columns = [ Column('name', header='Name'), Column('id', header='ID'), Column('description', header='Description') ]
class DummyTableNoHeaders(Table): columns = [ Column('name'), Column('status', accessor=lambda x: 'OK' if x.get('status', None) in ['Excellent', 'Good'] else 'Unhealthy'), ]
class ScenarioTable(Table): columns = [ Column('id', header='ID'), Column('name', header='Name'), Column('description', header='Description') ]
class ResourceDriverTable(Table): columns = [ Column('id', header='ID'), Column('type', header='Type'), Column('baseUri', header='Base URI') ]
class ResourceManagerTable(Table): columns = [ Column('name', header='Name'), Column('type', header='Type'), Column('url', header='URL') ]
class ResourceManagerOnboardingReportTable(Table): columns = [ Column('name', header='Name'), Column('operation', header='Operation'), Column('success', header='Success'), Column('reason', header='Failure Reason'), ]
class AssemblyTable(Table): columns = [ Column('id', header='ID'), Column('name', header='Name'), Column('descriptorName', header='Descriptor Name'), Column('state', header='State') ]
class DeploymentLocationTable(Table): columns = [ Column('name', header='Name'), Column('resourceManager', header='Resource Manager'), Column('infrastructureType', header='Infrastructure Type'), Column('description', header='Description') ]
class AssemblyConfigurationTable(Table): columns = [ Column('id', header='ID'), Column('name', header='Name'), Column('description', header='Description'), Column('descriptorName', header='Descriptor Name') ]
class EnvironmentTable(Table): columns = [ Column('name', header='Name'), Column('description', header='Description'), Column('tnco', header='TNCO/ALM', accessor=lambda x: x.tnco.address if x.tnco else None), Column('auth', header='Auth', accessor=lambda x: x.tnco.auth_mode if x.tnco else None), Column('arm', header='Ansible RM', accessor=build_arms_string) ]
class ScenarioExecutionTable(Table): columns = [ Column('id', header='ID'), Column('name', header='Execution Name'), Column('scenarioId', header='Scenario'), Column('startedAt', header='Started At'), Column('status', header='Status') ]
class DescriptorTemplatesTable(Table): columns = [ Column('name', header='Name'), Column('description', header='Description', accessor=lambda x: (x.get('description')[:75].strip() + '..') if x.get('description', None) is not None and len( x.get('description')) > 75 else x.get('description')) ]
class ProcessTable(Table): columns = [ Column('startTime', header='Start Time'), Column('intentType', header='Intent'), Column('status', header='Status'), Column('assembly', header='Assembly', accessor=lambda x: x.get('assemblyName') + ' (' + x.get( 'assemblyId') + ')'), ]
class ProjectTable(Table): columns = [ Column('name', header='Name'), Column('description', header='Description') ]
class PingTable(Table): columns = [ Column('name', header='Test Name'), Column('result', header='Result', accessor=lambda x: 'OK' if x.passed else 'Failed'), Column('error', header='Error') ]