view client/src/components/importoverview/AdditionalLog.vue @ 2685:39a05f8c34e6 import-overview-rework

import_overview: Refactoring of detailed information. When the entry is opened, a request is made to retrieve the detailed information for this entry. It contains the log protocol information as well as the executive summary. This is passed down to child components of the entry.
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 15 Mar 2019 13:42:49 +0100
parents b219ca1514f4
children c887666b110f
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">
      <small
        :class="[
          'kind',
          {
            'text-warning': /warn/.test(line.kind),
            'font-weight-bold': /warn/.test(line.kind)
          }
        ]"
        >{{ line.kind.toUpperCase() }}</small
      >
      <small
        :class="[
          'time',
          {
            'text-warning': /warn/.test(line.kind),
            'font-weight-bold': /warn/.test(line.kind)
          }
        ]"
        >{{ line.time }}</small
      >
      <small
        :class="[
          'message',
          {
            'text-warning': /warn/.test(line.kind),
            'font-weight-bold': /warn/.test(line.kind)
          }
        ]"
        >{{ line.message }}</small
      >
    </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: 7%;
}
.time {
  width: 24%;
}
</style>