Class CardSection

java.lang.Object
org.apache.juneau.console.freemarker.Section
org.apache.juneau.console.freemarker.CardSection

public final class CardSection extends Section
A rail section holding one ordinary card.

The card publishes what it publishes; the section owns no topic. The card is added to the page by PageSpec.dashboard(...).

Example:

CardSection.of(ChartDef.donut("share").src("/stats/share").label("reason").value("count"));

Since:
10.0.0
  • Method Details

    • of

      public static CardSection of(ChartDef chart)
      Creates a card section from a chart.
      Parameters:
      chart - The chart.
      Returns:
      A new section.
    • of

      public static CardSection of(CardSpec card)
      Creates a card section from any card.
      Parameters:
      card - The card. It must not be bare.
      Returns:
      A new section.
    • publishes

      public CardSection publishes(String topic)
      Not allowed: a card section publishes through its card. Calling this makes the dashboard fail with E-77.
      Overrides:
      publishes in class Section
      Parameters:
      topic - Ignored.
      Returns:
      This object.
    • label

      public CardSection label(String label)
      Description copied from class: Section
      Sets the section's legend text.
      Overrides:
      label in class Section
      Parameters:
      label - The label.
      Returns:
      This object.