constructor()

in source/ui/src/Components/Action/VersionHistoryModal.js [23:88]


    constructor(props) {
      super(props);

      this.state = {

          //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
          },{
            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"|| params.value === "failed";
              }}
          },{
            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()