<commit_before>package blended.mgmt.ui.components

import blended.updater.config.ContainerInfo
import japgolly.scalajs.react.ReactComponentB
import japgolly.scalajs.react.vdom.prefix_<^._
import blended.mgmt.ui.util.I18n
import blended.mgmt.ui.util.Logger
import japgolly.scalajs.react.BackendScope

object CompContainerDetail {

  private[this] val log = Logger[CompContainerDetail.type]
  private[this] val i18n = I18n()

  class Backend(scope: BackendScope[Option[ContainerInfo], Unit]) {
    def render(ci: Option[ContainerInfo]) = {
      <.div(
        i18n.tr("Container ID: {0}", ci.map(_.containerId).getOrElse(i18n.tr("<NONE>")))
      )
    }
  }
<commit_msg>Show some container detail<commit_after>package blended.mgmt.ui.components

import blended.updater.config.ContainerInfo
import japgolly.scalajs.react.ReactComponentB
import japgolly.scalajs.react.vdom.prefix_<^._
import blended.mgmt.ui.util.I18n
import blended.mgmt.ui.util.Logger
import japgolly.scalajs.react.BackendScope

object CompContainerDetail {

  private[this] val log = Logger[CompContainerDetail.type]
  private[this] val i18n = I18n()

  class Backend(scope: BackendScope[Option[ContainerInfo], Unit]) {
    def render(ci: Option[ContainerInfo]) = {
      ci match {
        case None => <.span(i18n.tr("No Container selected"))
        case Some(containerInfo) =>

          val props = containerInfo.properties.map(p => <.div(<.span(p._1, ": "), <.span(p._2))).toSeq
          val profiles = containerInfo.profiles.map(p => <.span(p.name))

          <.div(
            <.div(
              i18n.tr("Container ID:"),
              containerInfo.containerId
            ),
            <.div(
              i18n.tr("Properties:"),
              <.div(props: _*)
            ),
            <.div(
              i18n.tr("Profiles:"),
              <.span(profiles: _*)
            )
          )

      }
    }
  }

{'fraction_non_alphanumeric': 0.1345646437994723, 'fraction_numerical': 0.01424802110817942, 'mean_word_length': 2.7768924302788847, 'pattern_counts': {'":': 1, '<': 18, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3319967', 'n_tokens_mistral': 643, 'n_tokens_neox': 623, 'n_words': 99}