view client/src/components/importoverview/AdditionalLog.vue @ 2708:cefef8234d27

import_overview: larger fonts for log and details
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 18 Mar 2019 16:38:19 +0100
parents c887666b110f
children 5b990f612420
line wrap: on
line source

<template>
  <div class="additionallog d-flex flex-column text-left">
    <div class="d-flex flex-row" v-for="(line, index) in logLines" :key="index">
      <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 }}</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>
  </div>
</template>

<script>
/* This is Free Software under GNU Affero General Public License v >= 3.0
 * without warranty, see README.md and license for details.
 *
 * SPDX-License-Identifier: AGPL-3.0-or-later
 * License-Filename: LICENSES/AGPL-3.0.txt
 *
 * Copyright (C) 2018 by via donau
 *   – Österreichische Wasserstraßen-Gesellschaft mbH
 * Software engineering by Intevation GmbH
 *
 * Author(s):
 * Thomas Junk <thomas.junk@intevation.de>
 */
export default {
  name: "additionallogs",
  props: ["details"],
  data() {
    return {
      logLines: this.details.entries
    };
  }
};
</script>

<style lang="scss" scoped>
.additionallog {
  width: 600px;
  max-height: 20vh;
  overflow-y: auto;
}
.kind {
  width: 9%;
}
.time {
  width: 26%;
}
</style>