Exemplo n.º 1
0
  static {
    RendererHints.register(REGISTERED_AT, RendererHints.displayValue(Time.toDateString()));

    RendererHints.register(
        MEMORY_AVAILABLE,
        RendererHints.displayValue(
            Functionals.chain(MathFunctions.times(1024L * 1024L), ByteSizeStrings.iso())));
    RendererHints.register(
        MEMORY_USED,
        RendererHints.displayValue(
            Functionals.chain(MathFunctions.times(1024L * 1024L), ByteSizeStrings.iso())));
    RendererHints.register(
        DISK_AVAILABLE,
        RendererHints.displayValue(
            Functionals.chain(MathFunctions.times(1024L * 1024L), ByteSizeStrings.iso())));
    RendererHints.register(
        DISK_USED,
        RendererHints.displayValue(
            Functionals.chain(MathFunctions.times(1024L * 1024L), ByteSizeStrings.iso())));
  }
Exemplo n.º 2
0
  static {
    RendererHints.register(
        MESOS_SLAVES, RendererHints.openWithUrl(DelegateEntity.EntityUrl.entityUrl()));
    RendererHints.register(
        MESOS_FRAMEWORKS, RendererHints.openWithUrl(DelegateEntity.EntityUrl.entityUrl()));
    RendererHints.register(
        MESOS_TASKS, RendererHints.openWithUrl(DelegateEntity.EntityUrl.entityUrl()));
    RendererHints.register(
        MESOS_APPLICATIONS, RendererHints.openWithUrl(DelegateEntity.EntityUrl.entityUrl()));
    RendererHints.register(
        SDN_PROVIDER, RendererHints.openWithUrl(DelegateEntity.EntityUrl.entityUrl()));

    RendererHints.register(START_TIME, RendererHints.displayValue(Time.toDateString()));

    RendererHints.register(LOAD_1MIN, RendererHints.displayValue(MathFunctions.percent(2)));
    RendererHints.register(LOAD_5MIN, RendererHints.displayValue(MathFunctions.percent(2)));
    RendererHints.register(LOAD_15MIN, RendererHints.displayValue(MathFunctions.percent(2)));

    RendererHints.register(MEMORY_FREE_BYTES, RendererHints.displayValue(ByteSizeStrings.iso()));
    RendererHints.register(MEMORY_TOTAL_BYTES, RendererHints.displayValue(ByteSizeStrings.iso()));
  }