LCOV - code coverage report
Current view: top level - pkg/storaged/block - actions.jsx Coverage Total Hit
Test: cockpit Lines: 100.0 % 11 11
Test Date: 2026-07-03 14:25:32

            Line data    Source code
       1              : /*
       2              :  * Copyright (C) 2024 Red Hat, Inc.
       3              :  * SPDX-License-Identifier: LGPL-2.1-or-later
       4              :  */
       5              : 
       6          113 : import cockpit from "cockpit";
       7              : import client from "../client";
       8              : 
       9              : import { format_dialog } from "./format-dialog.jsx";
      10              : 
      11          113 : const _ = cockpit.gettext;
      12              : 
      13          112 : export function std_format_action(backing_block, content_block) {
      14          102 :     const excuse = backing_block.ReadOnly ? _("Device is read-only") : null;
      15              : 
      16          112 :     return {
      17          112 :         title: _("Format"),
      18           40 :         action: () => format_dialog(client, backing_block.path),
      19          112 :         excuse,
      20          112 :         danger: true
      21          112 :     };
      22          112 : }
        

Generated by: LCOV version 2.0-1