in source/ui/src/Components/Action/Action.js [35:115]
constructor(props) {
super(props);
let firstCommaIndex = this.props.location.state.indexOf(",");
const user = this.props.location.state.substring(0,firstCommaIndex);
const group = this.props.location.state.substring(firstCommaIndex+1);
this.state = {
currentUser:user.trim(), //this is the user who logged in the console
currentGroup:group.trim(), //this is the group(s) to which the user belongs
selectedRow:"",
selectedSubnetId:"",
showHistoryModal: false,
showAcceptConfirmationModal: false,
showRejectConfirmationModal: false,
btnAdminActionDisabled: true, //determine button accept or reject. By default it is set to disabled
btnHistoryDisabled: true, //determine button view history. By default it is set to disabled
versionHistoryItems:[],
refresh:false,
confirmChoice:"",
//List of 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",
cellClass: function(params) {
return params.value === "failed" ? "rag-red" : "rag-transparent";
}
},{
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()