-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* trigger release workflows on github release publish * Better storage info (#258) * created card dummy for drive representation * create drive cards dynamically * display drive size in drive card * usagebar represents actual filling of a drive * display label if drive is nor mounted * bring back license headers * brings back update method on chart * cleanup * fix lint * bump version, update changelogs
- Loading branch information
Showing
17 changed files
with
511 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
.github/workflows/push-copr-build.yml → .github/workflows/release-copr.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
* libgtop2-dev | ||
* libwingpanel-3.0-dev | ||
* libhandy-1-dev | ||
* libudisks2-dev | ||
* meson | ||
* sassc | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
com.github.stsdc.monitor (0.11.0) focal; urgency=low | ||
|
||
* Add info about drives (based on Dirli's code) | ||
|
||
-- Stanisław Dac <[email protected]> Sun, 24 Oct 2021 21:38:26 +0200 | ||
|
||
com.github.stsdc.monitor (0.10.1) focal; urgency=low | ||
|
||
* Add support for vdx (vm) and nvme disks | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* Copyright (c) 2020 Dirli <[email protected]> | ||
* Copyright (c) 2021 stsdc | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
public struct Monitor.DriveSmart { | ||
public bool enabled; | ||
public uint64 updated; | ||
public bool failing; | ||
public uint64 power_seconds; | ||
public uint64 power_counts; | ||
public string selftest_status; | ||
public uint life_left; | ||
} | ||
|
||
public struct Monitor.DriveVolume { | ||
public string device; | ||
public string label; | ||
public string type; | ||
public string uuid; | ||
public string mount_point; | ||
public uint64 size; | ||
public uint64 free; | ||
public uint64 offset; | ||
} | ||
|
||
public class Monitor.DiskDrive : GLib.Object { | ||
public string model; | ||
public uint64 size; | ||
public uint64 free; | ||
public string revision; | ||
public string id; | ||
public string device; | ||
public string partition; | ||
public GLib.Icon drive_icon; | ||
|
||
|
||
|
||
private Gee.ArrayList<DriveVolume?> volumes; | ||
|
||
private DriveSmart? smart = null; | ||
public bool has_smart { | ||
get { | ||
return smart != null; | ||
} | ||
} | ||
|
||
public DiskDrive () { | ||
free = 0; | ||
volumes = new Gee.ArrayList <DriveVolume?> (); | ||
} | ||
|
||
public DriveSmart? get_smart () { | ||
return smart; | ||
} | ||
|
||
public void add_smart (DriveSmart _smart) { | ||
smart = _smart; | ||
} | ||
|
||
public void add_volume (DriveVolume vol) { | ||
volumes.add (vol); | ||
free = free + vol.free; | ||
} | ||
|
||
public Gee.ArrayList<DriveVolume?> get_volumes () { | ||
var volumes_arr = new Gee.ArrayList<DriveVolume?> (); | ||
|
||
volumes.foreach ((vol) => { | ||
|
||
volumes_arr.add (vol); | ||
|
||
return true; | ||
}); | ||
|
||
volumes_arr.sort (compare_volumes); | ||
|
||
return volumes_arr; | ||
} | ||
|
||
private int compare_volumes (DriveVolume? vol1, DriveVolume? vol2) { | ||
if (vol1 == null) { | ||
return (vol2 == null) ? 0 : -1; | ||
} | ||
|
||
if (vol2 == null) { | ||
return 1; | ||
} | ||
|
||
return GLib.strcmp (vol1.device, vol2.device); | ||
} | ||
} |
Oops, something went wrong.