constructor()

in console/react/src/topology/clientInfoComponent.js [37:174]


  constructor(props) {
    super(props);
    this.state = {
      toolTip: null,
      detail: null,
      columns: [
        "Container",
        "Encrypted",
        "Host",
        {
          title: "Links",
          cellTransforms: [compoundExpand]
        }
      ],
      rows: [
        {
          isOpen: false,
          cells: [
            {
              title: <span>container</span>,
              props: { component: "th" }
            },
            {
              title: <span>False</span>
            },
            {
              title: <span>host</span>
            },
            {
              title: (
                <React.Fragment>
                  <CodeBranchIcon key="icon" /> 1
                </React.Fragment>
              ),
              props: {
                isOpen: false,
                ariaControls: "compound-expansion-table-1"
              }
            }
          ]
        },
        {
          parent: 0,
          compoundParent: 3,
          cells: [
            {
              title: "",
              props: { colSpan: 4, className: "pf-m-no-padding" }
            }
          ]
        }
      ]
    };
    this.rates = {};
    this.d = this.props.d; // the node object

    this.dStart = 0;
    this.dStop = Math.min(this.d.normals.length, PERPAGE);
    this.cachedInfo = [];
    this.updateTimer = null;

    // which attributes to fetch and display
    this.fields = {
      detailFields: {
        cols: [
          "version",
          "mode",
          "presettledDeliveries",
          "droppedPresettledDeliveries",
          "acceptedDeliveries",
          "rejectedDeliveries",
          "releasedDeliveries",
          "modifiedDeliveries",
          "deliveriesIngress",
          "deliveriesEgress",
          "deliveriesTransit",
          "deliveriesIngressRouteContainer",
          "deliveriesEgressRouteContainer"
        ]
      },
      linkFields: {
        attrs: [
          "linkType",
          "owningAddr",
          "settleRate",
          "deliveriesDelayed1Sec",
          "deliveriesDelayed10Sec",
          "unsettledCount",
          "capacity"
        ],
        cols: ["linkType", "addr", "settleRate", "delayed1", "delayed10", "usage"],
        columns: ["Link type", "Addr", "Settle rate", "Delayed1", "Delayed10", "Usage"],
        calc: {
          addr: link => {
            return utils.addr_text(link.owningAddr);
          },
          delayed1: link => {
            return link.deliveriesDelayed1Sec;
          },
          delayed10: link => {
            return link.deliveriesDelayed10Sec;
          },
          usage: link => {
            return link.unsettledCount / link.capacity;
          }
        }
      },
      linkRouteFields: {
        cols: ["prefix", "direction", "containerId"]
      },
      autoLinkFields: {
        cols: ["addr", "direction", "containerId"]
      },
      addressFields: {
        cols: ["name", "distribution", "deliveriesEgress"]
      },
      clients: [
        "Container",
        "Encrypted",
        "Host",
        {
          title: "Links",
          cellTransforms: [compoundExpand]
        }
      ],
      edgeRouters: [
        "Name",
        "Connections",
        "Accepted rate",
        {
          title: "Addresses",
          cellTransforms: [compoundExpand]
        },
        ""
      ],
      edgeColumns: ["Name", "Distribution", "Deliveries egress"]
    };
  }