LCOV - code coverage report
Current view: top level - pkg/storaged/lvm2 - inactive-logical-volume.jsx Coverage Total Hit
Test: cockpit Lines: 94.4 % 18 17
Test Date: 2026-07-13 10:00:01

            Line data    Source code
       1              : /*
       2              :  * Copyright (C) 2023 Red Hat, Inc.
       3              :  * SPDX-License-Identifier: LGPL-2.1-or-later
       4              :  */
       5              : 
       6          113 : import cockpit from "cockpit";
       7              : 
       8              : import {
       9              :     StorageCard, new_page, new_card
      10              : } from "../pages.jsx";
      11              : 
      12              : import { lvol_delete } from "./block-logical-volume.jsx";
      13              : import { lvm2_create_snapshot_action } from "./volume-group.jsx";
      14              : 
      15          113 : const _ = cockpit.gettext;
      16              : 
      17            4 : export function make_inactive_logical_volume_page(parent, vgroup, lvol, next_card) {
      18            4 :     const inactive_card = new_card({
      19            4 :         title: _("Inactive logical volume"),
      20            4 :         next: next_card,
      21            4 :         page_location: ["vg", vgroup.Name, lvol.Name],
      22            4 :         page_name: lvol.Name,
      23            4 :         page_size: lvol.Size,
      24            4 :         component: StorageCard,
      25            4 :         actions: [
      26            1 :             { title: _("Activate"), action: () => lvol.Activate({}) },
      27            4 :             lvm2_create_snapshot_action(lvol),
      28            0 :             { title: _("Delete"), action: () => lvol_delete(lvol, inactive_card), danger: true },
      29            4 :         ]
      30            4 :     });
      31              : 
      32            4 :     new_page(parent, inactive_card);
      33            4 : }
        

Generated by: LCOV version 2.0-1