Class NodeManagerView

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
com.decs.application.views.nodemanager.NodeManagerView
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable

@Route(value="node-manager", layout=MainLayout.class) @Uses(com.vaadin.flow.component.icon.Icon.class) public class NodeManagerView extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
Node Manager Class

This class implements the web application node manager page. It is responsible for all visual components and their behavior.

Version:
1.0
Author:
Bruno Guiomar
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private com.vaadin.flow.component.html.Span
     
    private final com.vaadin.flow.function.SerializableBiConsumer<com.vaadin.flow.component.button.Button,SlaveInfo>
    Creates the node info button and defines its behavior
    private com.vaadin.flow.component.grid.Grid<SlaveInfo>
     
    private com.vaadin.flow.component.orderedlayout.VerticalLayout
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.html.Span
     
    private com.vaadin.flow.component.button.Button
     
    private com.vaadin.flow.component.icon.Icon
     
    private com.vaadin.flow.component.grid.dataview.GridListDataView<SlaveInfo>
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private SlaveManager
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Class Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    private com.vaadin.flow.component.dialog.Dialog
    buildSlaveInfoDialog(SlaveInfo currentSlave, SystemInformation systemInformation)
    Builds a dialog component for the node info information
    private com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.button.Button,SlaveInfo>
    Creates a component renderer for the node info button
    private void
    Builds the nodes list view and its visual components
    private void
    updateSlaveList(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    Defines the event handler for updating the connected slaves list

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement, initContent

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

    • slaveManager

      private SlaveManager slaveManager
    • nodeListLayoutGroup

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout nodeListLayoutGroup
    • nodeListGridLayout

      private com.vaadin.flow.component.orderedlayout.VerticalLayout nodeListGridLayout
    • nodeListUpperGroup

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout nodeListUpperGroup
    • nodeListTitle

      private com.vaadin.flow.component.html.Span nodeListTitle
    • nodeListTitleUpdateBtnIcon

      private com.vaadin.flow.component.icon.Icon nodeListTitleUpdateBtnIcon
    • nodeListTitleUpdateBtn

      private com.vaadin.flow.component.button.Button nodeListTitleUpdateBtn
    • nodeListGrid

      private com.vaadin.flow.component.grid.Grid<SlaveInfo> nodeListGrid
    • connectedSlaves

      private com.vaadin.flow.component.html.Span connectedSlaves
    • nodeListUpdater

      private com.vaadin.flow.component.grid.dataview.GridListDataView<SlaveInfo> nodeListUpdater
    • nodeInfoButton

      private final com.vaadin.flow.function.SerializableBiConsumer<com.vaadin.flow.component.button.Button,SlaveInfo> nodeInfoButton
      Creates the node info button and defines its behavior
  • Constructor Details

    • NodeManagerView

      public NodeManagerView(SlaveManager slaveManager)
      Class Constructor
      Parameters:
      slaveManager - Slave manager object
  • Method Details

    • createNodeList

      private void createNodeList()
      Builds the nodes list view and its visual components
    • updateSlaveList

      private void updateSlaveList(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
      Defines the event handler for updating the connected slaves list
      Parameters:
      event - Button click event
    • createNodeInfoRenderer

      private com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.button.Button,SlaveInfo> createNodeInfoRenderer()
      Creates a component renderer for the node info button
      Returns:
      Component renderer object
    • buildSlaveInfoDialog

      private com.vaadin.flow.component.dialog.Dialog buildSlaveInfoDialog(SlaveInfo currentSlave, SystemInformation systemInformation)
      Builds a dialog component for the node info information
      Parameters:
      currentSlave - Slave object to be displayed
      systemInformation - System information object
      Returns:
      Dialog object