Skip to content
Snippets Groups Projects
Select Git revision
  • ec9fff9561cc12f5280ac0e2fc63ab2d9b554722
  • main default protected
2 results

ToeHistory.vue

Blame
    • Zitnik, Anze's avatar
      7961c00b
      Support for multiple ToEs and history. v0.2.0. · 7961c00b
      Zitnik, Anze authored
      Squashed commit of the following:
      
      commit 568b4460
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon Oct 10 12:48:56 2022 +0200
      
          Version 0.2.0
      
      commit 14ea1373
      Merge: cf7dd2f6 2e79e6d8
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Thu Oct 6 08:38:05 2022 +0000
      
          Support for multiple trees (ToEs) and history
      
          Merge branch 'feature/multiple-trees' into 'develop'
          See merge request medina/cce-frontend!5
      
      commit 2e79e6d8
      Author: Špela Dragan <spela.dragan@xlab.si>
      Date:   Thu Oct 6 08:38:05 2022 +0000
      
          Feature/multiple trees
      
      commit cf7dd2f6
      Merge: d2b5365c fe39a876
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri Jun 17 14:14:40 2022 +0200
      
          Merge branch 'master' into develop
      
      commit d2b5365c
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri Jun 17 13:59:13 2022 +0200
      
          Version 0.1.6
      
      commit 80caeaf7
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri Jun 17 13:55:41 2022 +0200
      
          Upgrade dependencies, prettify code (linter).
      
          Squashed commit of the following:
      
          commit 7d756575507f136d1a760c429b437b00bdff2e5b
          Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
          Date:   Fri Jun 17 13:16:58 2022 +0200
      
              Fix problem with marking of sequential permanent opening of the node info-box
      
          commit cacf992409eafd839d5a0f7ebd433da113204be4
          Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
          Date:   Fri Jun 17 13:16:34 2022 +0200
      
              Use eslint prettier
      
          commit 9c632288a885e5087575bcb6a04fee55fd5356da
          Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
          Date:   Fri Jun 17 12:22:40 2022 +0200
      
              Fix vulnerabilities and update packages
      
      commit 00434fb5
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 17:09:08 2022 +0200
      
          Version 0.1.5
      
      commit 8c3a83fe
      Merge: 41cff35a f05e3580
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 15:08:02 2022 +0000
      
          Merge branch 'settable-api-url' into 'develop'
      
          Enable setting of API URL via environment variable.
      
          See merge request medina/cce-frontend!4
      
      commit f05e3580
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 15:08:01 2022 +0000
      
          Enable setting of API URL via environment variable.
      
      commit 41cff35a
      Merge: a83a43f5 0e63df2e
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 15:48:32 2022 +0200
      
          Merge branch 'master' into develop
      
      commit a83a43f5
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 13:31:46 2022 +0200
      
          Version 0.1.4
      
      commit 05820fd4
      Merge: a19afbab 023e3fdd
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 11:30:14 2022 +0000
      
          Merge branch 'auto-collapse' into 'develop'
      
          Start with collapsed nodes
      
          See merge request medina/cce-frontend!3
      
      commit 023e3fdd
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 11:30:14 2022 +0000
      
          Start with collapsed nodes
      
      commit a19afbab
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 27 13:33:56 2022 +0200
      
          Version up: 0.1.3
      
      commit a2bf39a7
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Thu May 26 17:39:06 2022 +0200
      
          Add targetValue property.
      
          Rearrange properties in infoBox.
          Don't show 'code' if same as 'name'.
      
      commit d7dd3b66
      Merge: 0bedbed3 dc3d4b90
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 10:04:47 2022 +0200
      
          Merge branch 'master' into develop
      
      commit 0bedbed3
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 10:00:02 2022 +0200
      
          Minor fix in instructions.
      
      commit 8df42ada
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 09:47:09 2022 +0200
      
          Revert "Updated getting for CI from package.json"
      
          This reverts commit 64b5b515.
      
      commit e318c485
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 09:31:26 2022 +0200
      
          Version up - 1.1.2
      
      commit 95f07516
      Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
      Date:   Thu May 19 19:26:49 2022 +0200
      
          Added word breaking, permanent node description box option, instructions
      
      commit 64b5b515
      Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
      Date:   Thu May 19 19:25:53 2022 +0200
      
          Updated getting for CI from package.json
      7961c00b
      History
      Support for multiple ToEs and history. v0.2.0.
      Zitnik, Anze authored
      Squashed commit of the following:
      
      commit 568b4460
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon Oct 10 12:48:56 2022 +0200
      
          Version 0.2.0
      
      commit 14ea1373
      Merge: cf7dd2f6 2e79e6d8
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Thu Oct 6 08:38:05 2022 +0000
      
          Support for multiple trees (ToEs) and history
      
          Merge branch 'feature/multiple-trees' into 'develop'
          See merge request medina/cce-frontend!5
      
      commit 2e79e6d8
      Author: Špela Dragan <spela.dragan@xlab.si>
      Date:   Thu Oct 6 08:38:05 2022 +0000
      
          Feature/multiple trees
      
      commit cf7dd2f6
      Merge: d2b5365c fe39a876
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri Jun 17 14:14:40 2022 +0200
      
          Merge branch 'master' into develop
      
      commit d2b5365c
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri Jun 17 13:59:13 2022 +0200
      
          Version 0.1.6
      
      commit 80caeaf7
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri Jun 17 13:55:41 2022 +0200
      
          Upgrade dependencies, prettify code (linter).
      
          Squashed commit of the following:
      
          commit 7d756575507f136d1a760c429b437b00bdff2e5b
          Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
          Date:   Fri Jun 17 13:16:58 2022 +0200
      
              Fix problem with marking of sequential permanent opening of the node info-box
      
          commit cacf992409eafd839d5a0f7ebd433da113204be4
          Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
          Date:   Fri Jun 17 13:16:34 2022 +0200
      
              Use eslint prettier
      
          commit 9c632288a885e5087575bcb6a04fee55fd5356da
          Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
          Date:   Fri Jun 17 12:22:40 2022 +0200
      
              Fix vulnerabilities and update packages
      
      commit 00434fb5
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 17:09:08 2022 +0200
      
          Version 0.1.5
      
      commit 8c3a83fe
      Merge: 41cff35a f05e3580
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 15:08:02 2022 +0000
      
          Merge branch 'settable-api-url' into 'develop'
      
          Enable setting of API URL via environment variable.
      
          See merge request medina/cce-frontend!4
      
      commit f05e3580
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 15:08:01 2022 +0000
      
          Enable setting of API URL via environment variable.
      
      commit 41cff35a
      Merge: a83a43f5 0e63df2e
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 15:48:32 2022 +0200
      
          Merge branch 'master' into develop
      
      commit a83a43f5
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 13:31:46 2022 +0200
      
          Version 0.1.4
      
      commit 05820fd4
      Merge: a19afbab 023e3fdd
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 11:30:14 2022 +0000
      
          Merge branch 'auto-collapse' into 'develop'
      
          Start with collapsed nodes
      
          See merge request medina/cce-frontend!3
      
      commit 023e3fdd
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Mon May 30 11:30:14 2022 +0000
      
          Start with collapsed nodes
      
      commit a19afbab
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 27 13:33:56 2022 +0200
      
          Version up: 0.1.3
      
      commit a2bf39a7
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Thu May 26 17:39:06 2022 +0200
      
          Add targetValue property.
      
          Rearrange properties in infoBox.
          Don't show 'code' if same as 'name'.
      
      commit d7dd3b66
      Merge: 0bedbed3 dc3d4b90
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 10:04:47 2022 +0200
      
          Merge branch 'master' into develop
      
      commit 0bedbed3
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 10:00:02 2022 +0200
      
          Minor fix in instructions.
      
      commit 8df42ada
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 09:47:09 2022 +0200
      
          Revert "Updated getting for CI from package.json"
      
          This reverts commit 64b5b515.
      
      commit e318c485
      Author: Anže Žitnik <anze.zitnik@xlab.si>
      Date:   Fri May 20 09:31:26 2022 +0200
      
          Version up - 1.1.2
      
      commit 95f07516
      Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
      Date:   Thu May 19 19:26:49 2022 +0200
      
          Added word breaking, permanent node description box option, instructions
      
      commit 64b5b515
      Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
      Date:   Thu May 19 19:25:53 2022 +0200
      
          Updated getting for CI from package.json
    ToeHistory.vue 1.68 KiB
    <template>
      <div class="dropdown">
        <button
          class="btn btn-primary dropdown-toggle"
          type="button"
          data-bs-toggle="dropdown"
          aria-expanded="false"
        >
          {{ currentTreeShown }}
        </button>
        <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
          <li
            v-for="tree in toeHistory"
            :key="tree.treeStateId"
            :class="disabled(tree)"
            @click="getHistoryTree(tree)"
            class="dropdown-item"
          >
            <a>
              {{ formatDatetime(tree.timeUpdated) }}
            </a>
          </li>
        </ul>
      </div>
    </template>
    
    <script>
    import { DateTime } from "luxon";
    import { getLastTree } from "@/helpers/helpers";
    
    export default {
      name: "ToeHistory",
      props: ["toeHistory", "currentTreeState"],
      data: function () {
        return {
          formatDatetime(datetime) {
            return DateTime.fromISO(datetime).toLocaleString(
              DateTime.DATETIME_FULL
            );
          },
          disabled(tree) {
            if (tree.treeStateId === this.currentTreeState.treeStateId) {
              return "disabled";
            }
            return "";
          },
        };
      },
      computed: {
        currentTreeShown() {
          if (
            this.currentTreeState.treeStateId ===
            getLastTree(this.toeHistory).treeStateId
          ) {
            return "Current tree state";
          } else {
            return this.formatDatetime(this.currentTreeState.timeUpdated);
          }
        },
      },
      methods: {
        getHistoryTree(tree) {
          this.$store.dispatch("getTreeDataByStateId", tree.treeStateId);
        },
      },
    };
    </script>
    
    <style scoped lang="scss">
    @import "@/styles/_variables.scss";
    .disabled {
      pointer-events: none;
      opacity: 0.6;
    }
    .dropdown-item {
      cursor: pointer;
    }
    </style>