Révision 56
src/gZFS/gui.java (revision 56) | ||
---|---|---|
1725 | 1725 |
|
1726 | 1726 |
//zfs.zfsGetInfoByProperty(zfsList.get(i).toString(), "type"); |
1727 | 1727 |
if ("filesystem".equals(zfs.getZvol().zProperties.get("type").getValue())){ |
1728 |
infoUsedSize=zfs.getZvol().zProperties.get("usedbydataset").getValue()+"/"+zfs.getZvol().zProperties.get("available").getValue(); |
|
1728 |
if (!zfs.getZvol().zProperties.get("quota").getValue().isEmpty() && !"none".equalsIgnoreCase(zfs.getZvol().zProperties.get("quota").getValue())){ |
|
1729 |
infoUsedSize=zfs.getZvol().zProperties.get("usedbydataset").getValue()+"/"+zfs.getZvol().zProperties.get("quota").getValue(); |
|
1730 |
}else{ |
|
1731 |
infoUsedSize=zfs.getZvol().zProperties.get("usedbydataset").getValue()+"/"+zfs.getZvol().zProperties.get("available").getValue(); |
|
1732 |
} |
|
1733 |
|
|
1729 | 1734 |
}else{ |
1730 | 1735 |
infoUsedSize=zfs.getZvol().zProperties.get("used").getValue()+" / "+zfs.getZvol().zProperties.get("volsize").getValue(); |
1731 | 1736 |
} |
... | ... | |
2744 | 2749 |
this.dataCharset.put("Used By Data : "+zfs.getZvol().zProperties.get("usedbydataset").getValue(), guiTrt.getZfsUsedByData()) ; |
2745 | 2750 |
this.dataCharset.put("Used By Snapshots : "+zfs.getZvol().zProperties.get("usedbysnapshots").getValue(), guiTrt.getZfsUsedBySnapshots()) ; |
2746 | 2751 |
this.dataCharset.put("Free : "+BigDecimal.valueOf(guiTrt.getZfsFree()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()+guiTrt.getUnit(), guiTrt.getZfsFreePourcent()) ; |
2747 |
PieDataset dataset = guiTrt.createDataset(dataCharset); |
|
2748 |
JFreeChart chartVolumeConfig = guiTrt.createChart(dataset, "Total Volume size : "+zfs.getZvol().zProperties.get("volsize").getValue()); |
|
2752 |
PieDataset dataset = guiTrt.createDataset(dataCharset); |
|
2753 |
JFreeChart chartVolumeConfig =null; |
|
2754 |
if ( "filesystem".equalsIgnoreCase(zfs.getZvol().zProperties.get("type").getValue())){ |
|
2755 |
if (!zfs.getZvol().zProperties.get("quota").getValue().isEmpty() && !"none".equalsIgnoreCase(zfs.getZvol().zProperties.get("quota").getValue())){ |
|
2756 |
chartVolumeConfig = guiTrt.createChart(dataset, "Total FileSystem Quota : "+zfs.getZvol().zProperties.get("quota").getValue()); |
|
2757 |
}else{ |
|
2758 |
chartVolumeConfig = guiTrt.createChart(dataset, "Total FileSystem size : "+zfs.getZvol().zProperties.get("available").getValue()); |
|
2759 |
} |
|
2760 |
|
|
2761 |
}else{ |
|
2762 |
chartVolumeConfig = guiTrt.createChart(dataset, "Total Volume size : "+zfs.getZvol().zProperties.get("volsize").getValue()); |
|
2763 |
} |
|
2764 |
|
|
2749 | 2765 |
if ( chartVolumeComposite != null){ |
2750 | 2766 |
if ( !chartVolumeComposite.isDisposed()){ |
2751 | 2767 |
chartVolumeComposite.dispose(); |
... | ... | |
2759 | 2775 |
//gridDataChart.heightHint =compositeConfig. |
2760 | 2776 |
gridDataChart.horizontalSpan = 2; |
2761 | 2777 |
//Create Composite for Chart |
2762 |
chartVolumeComposite= new ChartComposite(compositeConfig, SWT.BORDER, chartVolumeConfig, true); |
|
2763 |
chartVolumeComposite.setLayoutData(gridDataChart); |
|
2764 |
chartVolumeComposite.layout(); |
|
2778 |
if (chartVolumeConfig != null){ |
|
2779 |
chartVolumeComposite= new ChartComposite(compositeConfig, SWT.BORDER, chartVolumeConfig, true); |
|
2780 |
chartVolumeComposite.setLayoutData(gridDataChart); |
|
2781 |
chartVolumeComposite.layout(); |
|
2782 |
} |
|
2783 |
|
|
2765 | 2784 |
compositeConfig.layout(); |
2766 | 2785 |
} |
2767 | 2786 |
|
... | ... | |
2953 | 2972 |
} |
2954 | 2973 |
}); |
2955 | 2974 |
|
2956 |
MenuItem replicaVol = new MenuItem(treeZFSMenu, SWT.PUSH); |
|
2975 |
/*Pour le moment je desactive cette fonctionnalite : j'ai un probleme car je ne sais pas encore comment recuperer la main. Et je me pose la question sur l'utilite |
|
2976 |
* MenuItem replicaVol = new MenuItem(treeZFSMenu, SWT.PUSH); |
|
2957 | 2977 |
replicaVol.setText("Launch Replication"); |
2958 | 2978 |
replicaVol.addListener(SWT.Selection, new Listener() { |
2959 | 2979 |
public void handleEvent(final Event event) { |
... | ... | |
2973 | 2993 |
messageBoxError.open(); |
2974 | 2994 |
} |
2975 | 2995 |
} |
2976 |
}); |
|
2996 |
}); */
|
|
2977 | 2997 |
} |
2978 | 2998 |
|
2979 | 2999 |
if ("volume".equalsIgnoreCase(zfs.getZvol().zProperties.get("type").getValue())|| |
Formats disponibles : Unified diff