constructor()

in source/ui/src/Components/Dashboard/Dashboard.js [26:96]


    constructor(props) {
      super(props);
      
      this.state = {

        selectedRow:"",
        selectedSubnetId:"",
        showHistoryModal: false,
        btnDisabled: true,

        //List attribute/column names from the ddb table
        dataFields:[{
          SubnetId:"",
          Version:"",
          Status:"",
          TgwId:"",
          VpcId:"",
          UserId:"",
          RequestTimeStamp:"",
          ResponseimeStamp:"",
          AssociationRouteTable:"",
          PropagationRouteTablesString:"",
          TagEventSource:"",
          Action:"",
          AWSSpokeAccountId:"",
          TimeToLive:"",
          AvailabilityZone:"",
          VpcCidr:"",
          AdminAction:"",
          Comment:"",
          items:[]
        }],
        
        //define columns in the grid: field names in the grid should match attribute/column names from the ddb table
        columnDefs: [{
          headerName: "VPC Id", field: "VpcId", width: 220, checkboxSelection: true
        },{
          headerName: "VPC CIDR", field: "VpcCidr"
        },{
          headerName: "Action", field: "Action"
        },{
          headerName: "Status", field: "Status",
          cellClassRules: {
            "rag-red": function(params) {
              return params.value === "rejected" || params.value === "auto-rejected";
            }}
        },{
          headerName: "Comment", field: "Comment", autoHeight:true, cellStyle: {'white-space': 'normal'}
        },{
          headerName: "Association RT", field: "AssociationRouteTable"
        },{
          headerName: "Propagation RTs", field: "PropagationRouteTablesString"
        },{
          headerName: "Spoke Account", field: "AWSSpokeAccountId"
        },{
          headerName: "Subnet Id", field: "SubnetId", width: 210
        },{
          headerName: "AZ", field: "AvailabilityZone"
        },{
          headerName: "Tag Event Source", field: "TagEventSource"
        },{
          headerName: "Request Time", field: "RequestTimeStamp"
        }, {
          headerName: "Response Time", field: "ResponseTimeStamp" 
        },{
          headerName: "User Id", field: "UserId"
        },{
          headerName: "Transit Gateway Id", field: "TgwId"
        }]
      }//end this.state
    }//end constructor()