view client/src/components/importoverview/LogItem.vue @ 3750:dbdef91a3ff3 infiniscroll

first implementation
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 20 Jun 2019 17:21:09 +0200
parents
children 7ca3b288ac5e
line wrap: on
line source

<template>
  <div>
    <span
      :class="[
        'kind',
        {
          'text-danger': /error/.test(line.kind),
          'text-warning': /warn/.test(line.kind),
          'font-weight-bold': /warn|error/.test(line.kind)
        }
      ]"
      >{{ line.kind.toUpperCase() }}</span
    >
    <span
      :class="[
        'time',
        {
          'text-danger': /error/.test(line.kind),
          'text-warning': /warn/.test(line.kind),
          'font-weight-bold': /warn|error/.test(line.kind)
        }
      ]"
      >{{ line.time | dateTime }}</span
    >
    <span
      :class="[
        'message',
        {
          'text-danger': /error/.test(line.kind),
          'text-warning': /warn/.test(line.kind),
          'font-weight-bold': /warn|error/.test(line.kind)
        }
      ]"
      >{{ line.message }}</span
    >
  </div>
</template>

<script>
export default {
  name: "Item",
  props: ["height", "line", "index"]
};
</script>

<style lang="sass" scoped>
  .kind
    width: 9%

  .time
    width: 26%

  .message
    width: 65%
    word-wrap: break-word
</style>