diff options
Diffstat (limited to 'src')
17 files changed, 517 insertions, 96 deletions
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java index 7c268630..765735fb 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java +++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java @@ -25,7 +25,7 @@ package com.gluster.storage.management.client.constants; */ public class ClientConstants { public static final String SYS_PROP_SERVER_URL = "gluster.server.url"; - public static final String DEFAULT_SERVER_URL = "https://10.1.12.186:8443/glustermg/linux.gtk.x86_64"; + public static final String DEFAULT_SERVER_URL = "https://localhost:8443/glustermg/linux.gtk.x86_64"; public static final String CONTEXT_ROOT = "glustermg"; public static final String REST_API_VERSION = "1.0"; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Device.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Device.java index 7c1d3d54..4a00ac5a 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Device.java +++ b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Device.java @@ -88,6 +88,10 @@ public class Device extends Entity { return getStatus() == DEVICE_STATUS.IO_ERROR; } + public boolean isInitialized() { + return getStatus() == DEVICE_STATUS.INITIALIZED; + } + public boolean isReady() { return (getStatus() == DEVICE_STATUS.INITIALIZED && getType() == DEVICE_TYPE.DATA); } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Disk.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Disk.java index d464ee9e..f06ca258 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Disk.java +++ b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Disk.java @@ -166,7 +166,7 @@ public class Disk extends Device { Double space = 0d; if (hasPartitions()) { for (Partition partition : getPartitions()) { - if (partition.isReady()) { + if (partition.isInitialized()) { space += partition.getSpace(); } } @@ -181,7 +181,7 @@ public class Disk extends Device { Double spaceInUse = 0d; if (hasPartitions()) { for (Partition partition : getPartitions()) { - if (partition.isReady()) { + if (partition.isInitialized()) { spaceInUse += partition.getSpaceInUse(); } } diff --git a/src/com.gluster.storage.management.gui/icons/tango/32x32/remove-server.png b/src/com.gluster.storage.management.gui/icons/tango/32x32/remove-server.png Binary files differnew file mode 100644 index 00000000..4026b48f --- /dev/null +++ b/src/com.gluster.storage.management.gui/icons/tango/32x32/remove-server.png diff --git a/src/com.gluster.storage.management.gui/icons/tango/48x48/remove-server.svg b/src/com.gluster.storage.management.gui/icons/tango/48x48/remove-server.svg new file mode 100644 index 00000000..4280df60 --- /dev/null +++ b/src/com.gluster.storage.management.gui/icons/tango/48x48/remove-server.svg @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg id="svg2327" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <defs id="defs3"> + <linearGradient id="linearGradient2752"> + <stop id="stop2754" stop-color="#9d9d9d" offset="0"/> + <stop id="stop2756" stop-color="#b9b9b9" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2711"> + <stop id="stop2713" stop-color="#909090" offset="0"/> + <stop id="stop2715" stop-color="#bebebe" stop-opacity="0.0000000" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2454"> + <stop id="stop2456" stop-color="#000" offset="0"/> + <stop id="stop2458" stop-color="#000" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2253"> + <stop id="stop2255" stop-color="#8f8f8f" offset="0"/> + <stop id="stop2257" stop-color="#494949" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2245"> + <stop id="stop2247" stop-color="#dde1d9" offset="0"/> + <stop id="stop2249" stop-color="#cacdc6" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2251" y2="33.34" xlink:href="#linearGradient2245" gradientUnits="userSpaceOnUse" x2="34.784" gradientTransform="matrix(1.129863,0.000000,0.000000,0.885063,-1.625000,-1.304372)" y1="7.2294" x1="8.6116"/> + <linearGradient id="linearGradient2421" y2="55.201" gradientUnits="userSpaceOnUse" x2="34.975" gradientTransform="matrix(1.108069,0.000000,0.000000,0.902471,1.000000,1.000000)" y1="13.005" x1="17.698"> + <stop id="stop2417" stop-color="#FFF" offset="0"/> + <stop id="stop2419" stop-color="#FFF" stop-opacity="0" offset="1"/> + </linearGradient> + <radialGradient id="radialGradient2460" xlink:href="#linearGradient2454" gradientUnits="userSpaceOnUse" cy="67.502" cx="12.576" gradientTransform="scale(1.925808,0.519262)" r="8.7663"/> + <linearGradient id="linearGradient2673" y2="26.729" gradientUnits="userSpaceOnUse" y1="1.6538" gradientTransform="matrix(1.238977,0.000000,0.000000,0.895955,0.590553,-1.331524)" x2="17.199" x1="11.492"> + <stop id="stop2669" stop-color="#FFF" offset="0"/> + <stop id="stop2671" stop-color="#fcfcff" stop-opacity="0.0000000" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2681" y2="8.8666" gradientUnits="userSpaceOnUse" y1="32.622" gradientTransform="matrix(1.174139,0.000000,0.000000,0.945431,0.721825,-1.331524)" x2="16.316" x1="19.15"> + <stop id="stop2677" stop-color="#5b5b97" offset="0"/> + <stop id="stop2679" stop-color="#1b1b43" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2689" y2="162.45" gradientUnits="userSpaceOnUse" y1="171.29" gradientTransform="matrix(5.705159,0.000000,0.000000,0.175280,1.000000,-0.679373)" x2="3.707" x1="3.707"> + <stop id="stop2685" stop-color="#000" offset="0"/> + <stop id="stop2687" stop-color="#000" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2707" y2="64.893" gradientUnits="userSpaceOnUse" y1="53.535" gradientTransform="scale(1.816345,0.550556)" x2="12.128" x1="12.207"> + <stop id="stop2703" stop-color="#585956" offset="0"/> + <stop id="stop2705" stop-color="#bbbeb8" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2717" y2="3.8451" xlink:href="#linearGradient2711" gradientUnits="userSpaceOnUse" y1="3.9384" x2="35.521" x1="34.301"/> + <linearGradient id="linearGradient2741" y2="74.098" gradientUnits="userSpaceOnUse" y1="101.28" gradientTransform="matrix(2.143634,0.000000,0.000000,0.466498,1.000000,-0.508826)" x2="8.6485" x1="13.629"> + <stop id="stop2637" stop-color="#f9fff5" offset="0"/> + <stop id="stop2639" stop-color="#f9fff5" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2758" y2="100.2" xlink:href="#linearGradient2752" gradientUnits="userSpaceOnUse" y1="88.509" gradientTransform="scale(2.309851,0.432928)" x2="8.1134" x1="8.1134"/> + <linearGradient id="linearGradient2979" y2="31.246" xlink:href="#linearGradient2253" gradientUnits="userSpaceOnUse" y1="5.3818" gradientTransform="scale(1.104397,0.905471)" x2="32.537" x1="10.391"/> + <linearGradient id="linearGradient2981" y2="52.536" xlink:href="#linearGradient2245" gradientUnits="userSpaceOnUse" y1="48.643" gradientTransform="scale(1.129863,0.885063)" x2="18.177" x1="18.317"/> + <linearGradient id="linearGradient2991" y2="44.879" gradientUnits="userSpaceOnUse" y1="49.953" gradientTransform="scale(1.492875,0.669848)" x2="-23.886" x1="-23.886"> + <stop id="stop2987" stop-color="#d8dfd6" offset="0"/> + <stop id="stop2989" stop-color="#d8dfd6" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient3982" y2="15.815" gradientUnits="userSpaceOnUse" x2="20.917" gradientTransform="matrix(0.52418134,0,0,0.51217408,23.919646,19.999045)" y1="33.955" x1="21.994"> + <stop id="stop3959" stop-color="#fffeff" stop-opacity="0.33333334" offset="0"/> + <stop id="stop3961" stop-color="#fffeff" stop-opacity="0.21568628" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient3978" y2="5.541" gradientUnits="userSpaceOnUse" x2="19.071" y1="66.288" x1="36.918"> + <stop id="stop2538" stop-color="#a40000" offset="0"/> + <stop id="stop2540" stop-color="#ff1717" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient3980" y2="-8.5627" gradientUnits="userSpaceOnUse" x2="20.065" y1="53.836" x1="43.936"> + <stop id="stop2481" stop-color="#ffe69b" offset="0"/> + <stop id="stop2483" stop-color="#FFF" offset="1"/> + </linearGradient> + <radialGradient id="radialGradient2880" gradientUnits="userSpaceOnUse" cx="23.857" cy="40" r="17.143" gradientTransform="matrix(1,0,0,0.5,0,20)"> + <stop id="stop4128" stop-color="#000" offset="0"/> + <stop id="stop4130" stop-color="#000" stop-opacity="0" offset="1"/> + </radialGradient> + </defs> + <metadata id="metadata4"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + <dc:date>2005-03-08</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:creator> + <dc:subject> + <rdf:Bag> + <rdf:li>workstation</rdf:li> + <rdf:li>computer</rdf:li> + <rdf:li>node</rdf:li> + <rdf:li>client</rdf:li> + </rdf:Bag> + </dc:subject> + <cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/> + <dc:source>http://jimmac.musichall.cz/</dc:source> + </cc:Work> + <cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/> + <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/> + <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/> + </cc:License> + </rdf:RDF> + </metadata> + <g id="layer1"> + <path id="path2452" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M41.101,35.051a16.882,4.552,0,1,1,-33.765,0,16.882,4.552,0,1,1,33.765,0z" fill-rule="evenodd" transform="matrix(1.000000,0.000000,0.000000,1.368932,-1.978553,-13.61713)" fill="url(#radialGradient2460)"/> + <path id="path2407" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M-26.264,29.716a9.3944,3.9396,0,1,1,-18.789,0,9.3944,3.9396,0,1,1,18.789,0z" fill-rule="evenodd" transform="translate(57.53339,3.203427)" stroke-dashoffset="0.0000000" stroke="#4b4d4a" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="#adb0aa"/> + <path id="path1825" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M-26.264,29.716a9.3944,3.9396,0,1,1,-18.789,0,9.3944,3.9396,0,1,1,18.789,0z" transform="matrix(0.940273,0.000000,0.000000,0.940273,55.40361,4.271194)" stroke-dashoffset="0.0000000" stroke="#7b7f7a" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="none"/> + <path id="path2983" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M-26.264,29.716a9.3944,3.9396,0,1,1,-18.789,0,9.3944,3.9396,0,1,1,18.789,0z" transform="matrix(0.940273,0.000000,0.000000,0.940273,55.40361,3.521194)" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2991)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.68065339" fill="none"/> + <path id="path2411" stroke-linejoin="round" d="M25.688,28.766l-0.063,1s4.324,3.599,9,4.203c2.338,0.301,4.754,0.702,6.75,1.187s3.588,1.12,4.125,1.656c0.31,0.311,0.451,0.574,0.5,0.782,0.049,0.207,0.038,0.355-0.094,0.562-0.264,0.416-1.08,0.968-2.468,1.406-2.778,0.878-7.721,1.438-14.563,1.438v1c6.896,0,11.864-0.528,14.844-1.469,1.49-0.47,2.525-1.015,3.031-1.812,0.253-0.399,0.357-0.889,0.25-1.344s-0.385-0.885-0.781-1.281c-0.878-0.878-2.537-1.407-4.594-1.906-2.057-0.5-4.516-0.915-6.875-1.219-4.719-0.609-9.062-4.203-9.062-4.203z" fill-rule="evenodd" stroke="#979797" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.40000001" fill="#d0d0d0"/> + <path id="path2462" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M41.101,35.051a16.882,4.552,0,1,1,-33.765,0,16.882,4.552,0,1,1,33.765,0z" fill-rule="evenodd" transform="matrix(1.000000,0.000000,0.000000,1.368932,-1.978553,-19.02126)" fill="url(#radialGradient2460)"/> + <rect id="rect2699" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" height="2.74" width="9.0397" y="30.704" x="17.472" fill="url(#linearGradient2707)"/> + <path id="rect2404" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M7.0809,1.6956h29.588c0.911,0,1.624,0.5835,1.667,1.4016l1.332,25.578c0.058,1.118-0.901,2.021-2.02,2.021h-31.546c-1.1192,0-2.0785-0.903-2.0203-2.021l1.3321-25.578c0.0402-0.7735,0.5475-1.4016,1.6667-1.4016z" fill-rule="evenodd" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2979)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="url(#linearGradient2251)"/> + <path id="path2377" stroke-linejoin="round" style="stroke-dasharray:none;" d="M8.4105,4.3058l-1.2422,22.045h27.651l-1.335-21.952-25.074-0.0935z" fill-rule="evenodd" stroke="#000079" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.50000000" fill="url(#linearGradient2681)"/> + <path id="path2393" stroke-linejoin="miter" d="M6.1774,28.736h31.429" stroke-opacity="0.24840762" stroke="url(#linearGradient2689)" stroke-linecap="round" stroke-miterlimit="4.0000000" stroke-width="0.99618119" fill="none"/> + <path id="path2397" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M6.9146,2.7063l29.845-0.0378c0.284-0.0003,0.559,0.2373,0.582,0.6526l1.362,24.803c0.058,1.057-0.54,1.786-1.598,1.786h-30.524c-1.0587,0-1.5931-0.729-1.5359-1.786l1.3241-24.494c0.0387-0.7159,0.1664-0.9234,0.5446-0.9239z" stroke-opacity="0.70063692" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2421)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.99999964" fill="none"/> + <path id="path2443" opacity="0.53142858" d="M8.7115,4.7464l-0.8025,17.871c11.045-2.401,11.421-10.493,25.154-13.147l-0.161-4.6575-24.19-0.066z" fill-rule="evenodd" fill="url(#linearGradient2673)"/> + <path id="path2657" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M41.101,35.051a16.882,4.552,0,1,1,-33.765,0,16.882,4.552,0,1,1,33.765,0z" fill-rule="evenodd" transform="matrix(1.264398,0.000000,0.000000,1.291262,-6.216332,-4.000423)" fill="url(#radialGradient2460)"/> + <path id="path2409" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;stroke-dasharray:none;marker-mid:none;" d="M6.4622,36.817h31.003c1.119,0,0.977,0.272,1.092,0.613l2.834,8.425c0.115,0.342,0.027,0.613-1.092,0.613h-36.672c-1.1192,0-1.2071-0.271-1.0922-0.613l2.8347-8.425c0.1148-0.341-0.0271-0.613,1.0922-0.613z" fill-rule="evenodd" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2979)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="url(#linearGradient2981)"/> + <path id="path2611" d="M6.3917,38.829l-1.7678,5.127h5.4801l0.53-2.033h14.85l0.549,2.075h6.168l-1.679-5.169h-24.13z" fill-rule="evenodd" fill="#7a7d77"/> + <path id="path2613" fill-rule="evenodd" fill="#777874" d="M11.076,42.276l-0.442,1.68h14.761l-0.442-1.768-13.877,0.088z"/> + <path id="path2619" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" fill="#777a75" d="M37.593,38.829l1.679,5.038-5.48-0.088-1.503-4.861,5.304-0.089z"/> + <path id="path2615" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" fill="url(#linearGradient2758)" d="M37.593,38.299l1.679,5.038-5.48-0.088-1.503-4.862,5.304-0.088z"/> + <path id="path2617" d="M6.3917,38.21l-1.7678,5.127h5.4801l0.53-2.033h14.85l0.549,2.075h6.168l-1.679-5.169h-24.13z" fill-rule="evenodd" fill="url(#linearGradient2758)"/> + <path id="path2621" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" fill="url(#linearGradient2758)" d="M11.076,41.746l-0.442,1.679h14.761l-0.442-1.767-13.877,0.088z"/> + <path id="path2631" stroke-linejoin="round" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M6.1278,37.578h31.826l2.637,8.093h-37.261l2.7981-8.093z" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2741)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.50000000" fill="none"/> + <path id="path2709" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.41933,2.853866)" fill="url(#linearGradient2717)"/> + <path id="path2719" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.30573,4.959651)" fill="url(#linearGradient2717)"/> + <path id="path2723" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.19213,6.959651)" fill="url(#linearGradient2717)"/> + <path id="path2727" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.07853,8.959651)" fill="url(#linearGradient2717)"/> + <path id="path2731" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-9.964930,10.95965)" fill="url(#linearGradient2717)"/> + <path id="text2735" fill="#4a4a4a" d="M20,27.318h0.282c0.083,0,0.148,0.018,0.192,0.056,0.045,0.037,0.068,0.09,0.068,0.158,0,0.069-0.023,0.123-0.068,0.16-0.044,0.037-0.109,0.056-0.192,0.056h-0.112v0.228h-0.17v-0.658m0.17,0.123v0.184h0.094c0.033,0,0.058-0.008,0.076-0.024s0.027-0.039,0.027-0.069c0-0.029-0.009-0.052-0.027-0.068-0.018-0.015-0.043-0.023-0.076-0.023h-0.094m0.792-0.012c-0.052,0-0.092,0.019-0.12,0.057-0.029,0.038-0.043,0.092-0.043,0.161,0,0.07,0.014,0.123,0.043,0.161,0.028,0.039,0.068,0.058,0.12,0.058s0.092-0.019,0.121-0.058c0.028-0.038,0.043-0.091,0.043-0.161,0-0.069-0.015-0.123-0.043-0.161-0.029-0.038-0.069-0.057-0.121-0.057m0-0.123c0.106,0,0.189,0.03,0.249,0.091,0.06,0.06,0.09,0.144,0.09,0.25,0,0.107-0.03,0.19-0.09,0.251-0.06,0.06-0.143,0.091-0.249,0.091s-0.188-0.031-0.249-0.091c-0.06-0.061-0.09-0.144-0.09-0.251,0-0.106,0.03-0.19,0.09-0.25,0.061-0.061,0.143-0.091,0.249-0.091m0.466,0.012h0.19l0.239,0.451v-0.451h0.161v0.658h-0.189l-0.24-0.452v0.452h-0.161v-0.658m0.663,0h0.186l0.15,0.234,0.15-0.234h0.186l-0.251,0.381v0.277h-0.17v-0.277l-0.251-0.381"/> + <path id="path6548" opacity="0.6" style="color:#000000;" d="M41,40a17.143,8.5714,0,1,1,-34.286,0,17.143,8.5714,0,1,1,34.286,0z" fill-rule="nonzero" transform="matrix(0.55948985,0,0,0.26808874,23.490632,31.478511)" display="block" fill="url(#radialGradient2880)"/> + <g id="g4006" stroke-linejoin="miter" stroke-linecap="butt" stroke-miterlimit="4" transform="matrix(0.52261663,0,0,0.51064521,23.957201,19.988993)"> + <path id="path1314" style="stroke-dasharray:none;" d="m46.857,23.929c0,12.9-10.457,23.357-23.357,23.357s-23.357-10.457-23.357-23.357,10.457-23.357,23.357-23.357,23.357,10.457,23.357,23.357z" fill-rule="nonzero" transform="matrix(0.920488,0,0,0.920488,2.368532,0.97408)" stroke="#b20000" stroke-width="1.08638" fill="url(#linearGradient3978)"/> + <path id="path3560" opacity="0.34659089" style="stroke-dasharray:none;" d="m49.902,26.635c0,13.25-10.741,23.991-23.991,23.991s-23.991-10.741-23.991-23.991,10.741-23.991,23.991-23.991,23.991,10.741,23.991,23.991z" fill-opacity="0" transform="matrix(0.856093,0,0,0.856093,1.818275,0.197769)" stroke="url(#linearGradient3980)" stroke-width="1.16809607"/> + </g> + <rect id="rect2070" fill-rule="nonzero" height="4.0852" width="14.633" y="29.691" x="29.183" fill="#efefef"/> + <path id="path3955" fill-rule="nonzero" fill="url(#linearGradient3982)" d="m46.654,31.121c0,5.5472-5.4276-3.2094-9.7889,0.1979-4.2597,3.3279-10.797,6.2437-10.797,0.69652,0-5.677,4.558-10.944,10.235-10.944,5.6772,0,10.35,4.502,10.35,10.049z"/> + </g> +</svg>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gui/icons/tango/scalable/remove-server.svg b/src/com.gluster.storage.management.gui/icons/tango/scalable/remove-server.svg new file mode 100644 index 00000000..4280df60 --- /dev/null +++ b/src/com.gluster.storage.management.gui/icons/tango/scalable/remove-server.svg @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg id="svg2327" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <defs id="defs3"> + <linearGradient id="linearGradient2752"> + <stop id="stop2754" stop-color="#9d9d9d" offset="0"/> + <stop id="stop2756" stop-color="#b9b9b9" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2711"> + <stop id="stop2713" stop-color="#909090" offset="0"/> + <stop id="stop2715" stop-color="#bebebe" stop-opacity="0.0000000" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2454"> + <stop id="stop2456" stop-color="#000" offset="0"/> + <stop id="stop2458" stop-color="#000" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2253"> + <stop id="stop2255" stop-color="#8f8f8f" offset="0"/> + <stop id="stop2257" stop-color="#494949" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2245"> + <stop id="stop2247" stop-color="#dde1d9" offset="0"/> + <stop id="stop2249" stop-color="#cacdc6" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2251" y2="33.34" xlink:href="#linearGradient2245" gradientUnits="userSpaceOnUse" x2="34.784" gradientTransform="matrix(1.129863,0.000000,0.000000,0.885063,-1.625000,-1.304372)" y1="7.2294" x1="8.6116"/> + <linearGradient id="linearGradient2421" y2="55.201" gradientUnits="userSpaceOnUse" x2="34.975" gradientTransform="matrix(1.108069,0.000000,0.000000,0.902471,1.000000,1.000000)" y1="13.005" x1="17.698"> + <stop id="stop2417" stop-color="#FFF" offset="0"/> + <stop id="stop2419" stop-color="#FFF" stop-opacity="0" offset="1"/> + </linearGradient> + <radialGradient id="radialGradient2460" xlink:href="#linearGradient2454" gradientUnits="userSpaceOnUse" cy="67.502" cx="12.576" gradientTransform="scale(1.925808,0.519262)" r="8.7663"/> + <linearGradient id="linearGradient2673" y2="26.729" gradientUnits="userSpaceOnUse" y1="1.6538" gradientTransform="matrix(1.238977,0.000000,0.000000,0.895955,0.590553,-1.331524)" x2="17.199" x1="11.492"> + <stop id="stop2669" stop-color="#FFF" offset="0"/> + <stop id="stop2671" stop-color="#fcfcff" stop-opacity="0.0000000" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2681" y2="8.8666" gradientUnits="userSpaceOnUse" y1="32.622" gradientTransform="matrix(1.174139,0.000000,0.000000,0.945431,0.721825,-1.331524)" x2="16.316" x1="19.15"> + <stop id="stop2677" stop-color="#5b5b97" offset="0"/> + <stop id="stop2679" stop-color="#1b1b43" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2689" y2="162.45" gradientUnits="userSpaceOnUse" y1="171.29" gradientTransform="matrix(5.705159,0.000000,0.000000,0.175280,1.000000,-0.679373)" x2="3.707" x1="3.707"> + <stop id="stop2685" stop-color="#000" offset="0"/> + <stop id="stop2687" stop-color="#000" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2707" y2="64.893" gradientUnits="userSpaceOnUse" y1="53.535" gradientTransform="scale(1.816345,0.550556)" x2="12.128" x1="12.207"> + <stop id="stop2703" stop-color="#585956" offset="0"/> + <stop id="stop2705" stop-color="#bbbeb8" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2717" y2="3.8451" xlink:href="#linearGradient2711" gradientUnits="userSpaceOnUse" y1="3.9384" x2="35.521" x1="34.301"/> + <linearGradient id="linearGradient2741" y2="74.098" gradientUnits="userSpaceOnUse" y1="101.28" gradientTransform="matrix(2.143634,0.000000,0.000000,0.466498,1.000000,-0.508826)" x2="8.6485" x1="13.629"> + <stop id="stop2637" stop-color="#f9fff5" offset="0"/> + <stop id="stop2639" stop-color="#f9fff5" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient2758" y2="100.2" xlink:href="#linearGradient2752" gradientUnits="userSpaceOnUse" y1="88.509" gradientTransform="scale(2.309851,0.432928)" x2="8.1134" x1="8.1134"/> + <linearGradient id="linearGradient2979" y2="31.246" xlink:href="#linearGradient2253" gradientUnits="userSpaceOnUse" y1="5.3818" gradientTransform="scale(1.104397,0.905471)" x2="32.537" x1="10.391"/> + <linearGradient id="linearGradient2981" y2="52.536" xlink:href="#linearGradient2245" gradientUnits="userSpaceOnUse" y1="48.643" gradientTransform="scale(1.129863,0.885063)" x2="18.177" x1="18.317"/> + <linearGradient id="linearGradient2991" y2="44.879" gradientUnits="userSpaceOnUse" y1="49.953" gradientTransform="scale(1.492875,0.669848)" x2="-23.886" x1="-23.886"> + <stop id="stop2987" stop-color="#d8dfd6" offset="0"/> + <stop id="stop2989" stop-color="#d8dfd6" stop-opacity="0" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient3982" y2="15.815" gradientUnits="userSpaceOnUse" x2="20.917" gradientTransform="matrix(0.52418134,0,0,0.51217408,23.919646,19.999045)" y1="33.955" x1="21.994"> + <stop id="stop3959" stop-color="#fffeff" stop-opacity="0.33333334" offset="0"/> + <stop id="stop3961" stop-color="#fffeff" stop-opacity="0.21568628" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient3978" y2="5.541" gradientUnits="userSpaceOnUse" x2="19.071" y1="66.288" x1="36.918"> + <stop id="stop2538" stop-color="#a40000" offset="0"/> + <stop id="stop2540" stop-color="#ff1717" offset="1"/> + </linearGradient> + <linearGradient id="linearGradient3980" y2="-8.5627" gradientUnits="userSpaceOnUse" x2="20.065" y1="53.836" x1="43.936"> + <stop id="stop2481" stop-color="#ffe69b" offset="0"/> + <stop id="stop2483" stop-color="#FFF" offset="1"/> + </linearGradient> + <radialGradient id="radialGradient2880" gradientUnits="userSpaceOnUse" cx="23.857" cy="40" r="17.143" gradientTransform="matrix(1,0,0,0.5,0,20)"> + <stop id="stop4128" stop-color="#000" offset="0"/> + <stop id="stop4130" stop-color="#000" stop-opacity="0" offset="1"/> + </radialGradient> + </defs> + <metadata id="metadata4"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + <dc:date>2005-03-08</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:creator> + <dc:subject> + <rdf:Bag> + <rdf:li>workstation</rdf:li> + <rdf:li>computer</rdf:li> + <rdf:li>node</rdf:li> + <rdf:li>client</rdf:li> + </rdf:Bag> + </dc:subject> + <cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/> + <dc:source>http://jimmac.musichall.cz/</dc:source> + </cc:Work> + <cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/> + <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/> + <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/> + </cc:License> + </rdf:RDF> + </metadata> + <g id="layer1"> + <path id="path2452" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M41.101,35.051a16.882,4.552,0,1,1,-33.765,0,16.882,4.552,0,1,1,33.765,0z" fill-rule="evenodd" transform="matrix(1.000000,0.000000,0.000000,1.368932,-1.978553,-13.61713)" fill="url(#radialGradient2460)"/> + <path id="path2407" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M-26.264,29.716a9.3944,3.9396,0,1,1,-18.789,0,9.3944,3.9396,0,1,1,18.789,0z" fill-rule="evenodd" transform="translate(57.53339,3.203427)" stroke-dashoffset="0.0000000" stroke="#4b4d4a" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="#adb0aa"/> + <path id="path1825" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M-26.264,29.716a9.3944,3.9396,0,1,1,-18.789,0,9.3944,3.9396,0,1,1,18.789,0z" transform="matrix(0.940273,0.000000,0.000000,0.940273,55.40361,4.271194)" stroke-dashoffset="0.0000000" stroke="#7b7f7a" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="none"/> + <path id="path2983" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M-26.264,29.716a9.3944,3.9396,0,1,1,-18.789,0,9.3944,3.9396,0,1,1,18.789,0z" transform="matrix(0.940273,0.000000,0.000000,0.940273,55.40361,3.521194)" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2991)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.68065339" fill="none"/> + <path id="path2411" stroke-linejoin="round" d="M25.688,28.766l-0.063,1s4.324,3.599,9,4.203c2.338,0.301,4.754,0.702,6.75,1.187s3.588,1.12,4.125,1.656c0.31,0.311,0.451,0.574,0.5,0.782,0.049,0.207,0.038,0.355-0.094,0.562-0.264,0.416-1.08,0.968-2.468,1.406-2.778,0.878-7.721,1.438-14.563,1.438v1c6.896,0,11.864-0.528,14.844-1.469,1.49-0.47,2.525-1.015,3.031-1.812,0.253-0.399,0.357-0.889,0.25-1.344s-0.385-0.885-0.781-1.281c-0.878-0.878-2.537-1.407-4.594-1.906-2.057-0.5-4.516-0.915-6.875-1.219-4.719-0.609-9.062-4.203-9.062-4.203z" fill-rule="evenodd" stroke="#979797" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.40000001" fill="#d0d0d0"/> + <path id="path2462" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M41.101,35.051a16.882,4.552,0,1,1,-33.765,0,16.882,4.552,0,1,1,33.765,0z" fill-rule="evenodd" transform="matrix(1.000000,0.000000,0.000000,1.368932,-1.978553,-19.02126)" fill="url(#radialGradient2460)"/> + <rect id="rect2699" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" height="2.74" width="9.0397" y="30.704" x="17.472" fill="url(#linearGradient2707)"/> + <path id="rect2404" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M7.0809,1.6956h29.588c0.911,0,1.624,0.5835,1.667,1.4016l1.332,25.578c0.058,1.118-0.901,2.021-2.02,2.021h-31.546c-1.1192,0-2.0785-0.903-2.0203-2.021l1.3321-25.578c0.0402-0.7735,0.5475-1.4016,1.6667-1.4016z" fill-rule="evenodd" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2979)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="url(#linearGradient2251)"/> + <path id="path2377" stroke-linejoin="round" style="stroke-dasharray:none;" d="M8.4105,4.3058l-1.2422,22.045h27.651l-1.335-21.952-25.074-0.0935z" fill-rule="evenodd" stroke="#000079" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.50000000" fill="url(#linearGradient2681)"/> + <path id="path2393" stroke-linejoin="miter" d="M6.1774,28.736h31.429" stroke-opacity="0.24840762" stroke="url(#linearGradient2689)" stroke-linecap="round" stroke-miterlimit="4.0000000" stroke-width="0.99618119" fill="none"/> + <path id="path2397" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M6.9146,2.7063l29.845-0.0378c0.284-0.0003,0.559,0.2373,0.582,0.6526l1.362,24.803c0.058,1.057-0.54,1.786-1.598,1.786h-30.524c-1.0587,0-1.5931-0.729-1.5359-1.786l1.3241-24.494c0.0387-0.7159,0.1664-0.9234,0.5446-0.9239z" stroke-opacity="0.70063692" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2421)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.99999964" fill="none"/> + <path id="path2443" opacity="0.53142858" d="M8.7115,4.7464l-0.8025,17.871c11.045-2.401,11.421-10.493,25.154-13.147l-0.161-4.6575-24.19-0.066z" fill-rule="evenodd" fill="url(#linearGradient2673)"/> + <path id="path2657" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M41.101,35.051a16.882,4.552,0,1,1,-33.765,0,16.882,4.552,0,1,1,33.765,0z" fill-rule="evenodd" transform="matrix(1.264398,0.000000,0.000000,1.291262,-6.216332,-4.000423)" fill="url(#radialGradient2460)"/> + <path id="path2409" stroke-linejoin="miter" style="marker-end:none;color:#000000;marker-start:none;stroke-dasharray:none;marker-mid:none;" d="M6.4622,36.817h31.003c1.119,0,0.977,0.272,1.092,0.613l2.834,8.425c0.115,0.342,0.027,0.613-1.092,0.613h-36.672c-1.1192,0-1.2071-0.271-1.0922-0.613l2.8347-8.425c0.1148-0.341-0.0271-0.613,1.0922-0.613z" fill-rule="evenodd" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2979)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="1.0000000" fill="url(#linearGradient2981)"/> + <path id="path2611" d="M6.3917,38.829l-1.7678,5.127h5.4801l0.53-2.033h14.85l0.549,2.075h6.168l-1.679-5.169h-24.13z" fill-rule="evenodd" fill="#7a7d77"/> + <path id="path2613" fill-rule="evenodd" fill="#777874" d="M11.076,42.276l-0.442,1.68h14.761l-0.442-1.768-13.877,0.088z"/> + <path id="path2619" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" fill="#777a75" d="M37.593,38.829l1.679,5.038-5.48-0.088-1.503-4.861,5.304-0.089z"/> + <path id="path2615" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" fill="url(#linearGradient2758)" d="M37.593,38.299l1.679,5.038-5.48-0.088-1.503-4.862,5.304-0.088z"/> + <path id="path2617" d="M6.3917,38.21l-1.7678,5.127h5.4801l0.53-2.033h14.85l0.549,2.075h6.168l-1.679-5.169h-24.13z" fill-rule="evenodd" fill="url(#linearGradient2758)"/> + <path id="path2621" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" fill-rule="evenodd" fill="url(#linearGradient2758)" d="M11.076,41.746l-0.442,1.679h14.761l-0.442-1.767-13.877,0.088z"/> + <path id="path2631" stroke-linejoin="round" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M6.1278,37.578h31.826l2.637,8.093h-37.261l2.7981-8.093z" stroke-dashoffset="0.0000000" stroke="url(#linearGradient2741)" stroke-linecap="butt" stroke-miterlimit="4.0000000" stroke-width="0.50000000" fill="none"/> + <path id="path2709" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.41933,2.853866)" fill="url(#linearGradient2717)"/> + <path id="path2719" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.30573,4.959651)" fill="url(#linearGradient2717)"/> + <path id="path2723" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.19213,6.959651)" fill="url(#linearGradient2717)"/> + <path id="path2727" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-10.07853,8.959651)" fill="url(#linearGradient2717)"/> + <path id="path2731" style="marker-end:none;color:#000000;marker-start:none;marker-mid:none;" d="M35.621,3.9384a0.83969,0.83969,0,1,1,-1.68,0,0.83969,0.83969,0,1,1,1.68,0z" fill-rule="evenodd" transform="matrix(1.331237,0.000000,0.000000,0.658449,-9.964930,10.95965)" fill="url(#linearGradient2717)"/> + <path id="text2735" fill="#4a4a4a" d="M20,27.318h0.282c0.083,0,0.148,0.018,0.192,0.056,0.045,0.037,0.068,0.09,0.068,0.158,0,0.069-0.023,0.123-0.068,0.16-0.044,0.037-0.109,0.056-0.192,0.056h-0.112v0.228h-0.17v-0.658m0.17,0.123v0.184h0.094c0.033,0,0.058-0.008,0.076-0.024s0.027-0.039,0.027-0.069c0-0.029-0.009-0.052-0.027-0.068-0.018-0.015-0.043-0.023-0.076-0.023h-0.094m0.792-0.012c-0.052,0-0.092,0.019-0.12,0.057-0.029,0.038-0.043,0.092-0.043,0.161,0,0.07,0.014,0.123,0.043,0.161,0.028,0.039,0.068,0.058,0.12,0.058s0.092-0.019,0.121-0.058c0.028-0.038,0.043-0.091,0.043-0.161,0-0.069-0.015-0.123-0.043-0.161-0.029-0.038-0.069-0.057-0.121-0.057m0-0.123c0.106,0,0.189,0.03,0.249,0.091,0.06,0.06,0.09,0.144,0.09,0.25,0,0.107-0.03,0.19-0.09,0.251-0.06,0.06-0.143,0.091-0.249,0.091s-0.188-0.031-0.249-0.091c-0.06-0.061-0.09-0.144-0.09-0.251,0-0.106,0.03-0.19,0.09-0.25,0.061-0.061,0.143-0.091,0.249-0.091m0.466,0.012h0.19l0.239,0.451v-0.451h0.161v0.658h-0.189l-0.24-0.452v0.452h-0.161v-0.658m0.663,0h0.186l0.15,0.234,0.15-0.234h0.186l-0.251,0.381v0.277h-0.17v-0.277l-0.251-0.381"/> + <path id="path6548" opacity="0.6" style="color:#000000;" d="M41,40a17.143,8.5714,0,1,1,-34.286,0,17.143,8.5714,0,1,1,34.286,0z" fill-rule="nonzero" transform="matrix(0.55948985,0,0,0.26808874,23.490632,31.478511)" display="block" fill="url(#radialGradient2880)"/> + <g id="g4006" stroke-linejoin="miter" stroke-linecap="butt" stroke-miterlimit="4" transform="matrix(0.52261663,0,0,0.51064521,23.957201,19.988993)"> + <path id="path1314" style="stroke-dasharray:none;" d="m46.857,23.929c0,12.9-10.457,23.357-23.357,23.357s-23.357-10.457-23.357-23.357,10.457-23.357,23.357-23.357,23.357,10.457,23.357,23.357z" fill-rule="nonzero" transform="matrix(0.920488,0,0,0.920488,2.368532,0.97408)" stroke="#b20000" stroke-width="1.08638" fill="url(#linearGradient3978)"/> + <path id="path3560" opacity="0.34659089" style="stroke-dasharray:none;" d="m49.902,26.635c0,13.25-10.741,23.991-23.991,23.991s-23.991-10.741-23.991-23.991,10.741-23.991,23.991-23.991,23.991,10.741,23.991,23.991z" fill-opacity="0" transform="matrix(0.856093,0,0,0.856093,1.818275,0.197769)" stroke="url(#linearGradient3980)" stroke-width="1.16809607"/> + </g> + <rect id="rect2070" fill-rule="nonzero" height="4.0852" width="14.633" y="29.691" x="29.183" fill="#efefef"/> + <path id="path3955" fill-rule="nonzero" fill="url(#linearGradient3982)" d="m46.654,31.121c0,5.5472-5.4276-3.2094-9.7889,0.1979-4.2597,3.3279-10.797,6.2437-10.797,0.69652,0-5.677,4.558-10.944,10.235-10.944,5.6772,0,10.35,4.502,10.35,10.049z"/> + </g> +</svg>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gui/plugin.xml b/src/com.gluster.storage.management.gui/plugin.xml index 3f7943ce..db5605f3 100644 --- a/src/com.gluster.storage.management.gui/plugin.xml +++ b/src/com.gluster.storage.management.gui/plugin.xml @@ -677,7 +677,7 @@ allowLabelUpdate="false" class="com.gluster.storage.management.gui.actions.RemoveServerAction" definitionId="com.gluster.storage.management.gui.commands.RemoveServer" - icon="icons/server-remove.png" + icon="icons/tango/32x32/remove-server.png" id="com.gluster.storage.management.gui.actions.RemoveServerAction" label="&Remove Server(s)" menubarPath="com.gluster.storage.management.gui.menu.servers/servers" @@ -735,7 +735,7 @@ allowLabelUpdate="false" class="com.gluster.storage.management.gui.actions.RemoveServerAction" definitionId="com.gluster.storage.management.gui.commands.RemoveServer" - icon="icons/server-remove.png" + icon="icons/tango/32x32/remove-server.png" id="com.gluster.storage.management.gui.actions.RemoveServerAction" label="&Remove Server(s)" menubarPath="com.gluster.storage.management.gui.menu.glusterserver/glusterserver" diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/DeviceTableLabelProvider.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/DeviceTableLabelProvider.java index 50e842b4..26795ebd 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/DeviceTableLabelProvider.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/DeviceTableLabelProvider.java @@ -65,6 +65,11 @@ public class DeviceTableLabelProvider extends LabelProvider implements ITableLab if (status == null) { return null; } + + if(element instanceof Disk && ((Disk)element).hasPartitions()) { + // disk has partitions. so don't show status image at disk level. + return null; + } // TODO: Use different images for all four statuses switch (status) { @@ -113,12 +118,20 @@ public class DeviceTableLabelProvider extends LabelProvider implements ITableLab Device device = (Device) element; if (columnIndex == DEVICE_COLUMN_INDICES.DISK.ordinal()) { + // show value in "disk" column only if it's a disk if (device instanceof Disk) { return device.getQualifiedName(); } else { return ""; } - } else if (columnIndex == DEVICE_COLUMN_INDICES.FREE_SPACE.ordinal()) { + } + + if(element instanceof Disk && ((Disk)element).hasPartitions()) { + // disk has partitions. so don't show any other details + return ""; + } + + if (columnIndex == DEVICE_COLUMN_INDICES.FREE_SPACE.ordinal()) { return "" + getDeviceFreeSpace(device); } else if (columnIndex == DEVICE_COLUMN_INDICES.SPACE_IN_USE.ordinal()) { return "" + getTotalDeviceSpace(device); diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/GlusterDataModelManager.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/GlusterDataModelManager.java index 56681a40..5ec3aedf 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/GlusterDataModelManager.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/GlusterDataModelManager.java @@ -94,25 +94,18 @@ public class GlusterDataModelManager { return instance; } - public void initializeModel(String clusterName) { + public void initializeModel(String clusterName, IProgressMonitor monitor) { setClusterName(clusterName); - model = fetchData(clusterName); + model = fetchData(clusterName, monitor); } - private GlusterDataModel fetchData(String clusterName) { - GlusterDataModel model = new GlusterDataModel("Gluster Data Model"); - Cluster cluster = new Cluster(clusterName, model); - - initializeGlusterServers(cluster); - initializeVolumes(cluster); - - initializeAutoDiscoveredServers(cluster); - initializeTasks(cluster); - initializeAlerts(cluster); + private GlusterDataModel fetchData(String clusterName, IProgressMonitor monitor) { + GlusterDataModel model = fetchModel(monitor); + + initializeAlerts(model.getCluster()); initializeVolumeOptionsDefaults(); - model.addCluster(cluster); return model; } diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/ServerDiskTableLabelProvider.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/ServerDiskTableLabelProvider.java index 15c222fc..96d3dc8a 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/ServerDiskTableLabelProvider.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/ServerDiskTableLabelProvider.java @@ -49,6 +49,11 @@ public class ServerDiskTableLabelProvider extends TableLabelProviderAdapter { if (status == null) { return null; } + + if(element instanceof Disk && ((Disk)element).hasPartitions()) { + // disk has partitions. so don't show status image at disk level. + return null; + } // TODO: Use different images for all four statuses switch (status) { @@ -87,12 +92,20 @@ public class ServerDiskTableLabelProvider extends TableLabelProviderAdapter { public String getColumnText(Object element, int columnIndex) { Device device = (Device) element; if (columnIndex == DEVICE_COLUMN_INDICES.DISK.ordinal()) { + // show value in "disk" column only if it's a disk if (device instanceof Disk) { return device.getName(); } else { return ""; } - } else if (columnIndex == DEVICE_COLUMN_INDICES.FREE_SPACE.ordinal()) { + } + + if(element instanceof Disk && ((Disk)element).hasPartitions()) { + // disk has partitions. so don't show any other details + return ""; + } + + if (columnIndex == DEVICE_COLUMN_INDICES.FREE_SPACE.ordinal()) { return "" + getDeviceFreeSpace(device); } else if (columnIndex == DEVICE_COLUMN_INDICES.SPACE_IN_USE.ordinal()) { return "" + getTotalDeviceSpace(device); diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/dialogs/LoginDialog.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/dialogs/LoginDialog.java index cb129a32..f041495e 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/dialogs/LoginDialog.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/dialogs/LoginDialog.java @@ -18,14 +18,19 @@ *******************************************************************************/ package com.gluster.storage.management.gui.dialogs; +import java.lang.reflect.InvocationTargetException; + import org.eclipse.core.databinding.DataBindingContext; import org.eclipse.core.databinding.UpdateValueStrategy; import org.eclipse.core.databinding.beans.PojoProperties; +import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.databinding.swt.SWTObservables; import org.eclipse.jface.databinding.swt.WidgetProperties; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.window.Window; import org.eclipse.swt.SWT; @@ -40,6 +45,7 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.PlatformUI; import com.gluster.storage.management.client.ClustersClient; import com.gluster.storage.management.client.UsersClient; @@ -261,7 +267,15 @@ public class LoginDialog extends Dialog { try { createOrRegisterCluster(clustersClient, clusterName, serverName, mode); - GlusterDataModelManager.getInstance().initializeModel(clusterName); + + final String clusterName1 = clusterName; + new ProgressMonitorDialog(getShell()).run(true, false, new IRunnableWithProgress() { + + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + GlusterDataModelManager.getInstance().initializeModel(clusterName1, monitor); + } + }); super.okPressed(); } catch (Exception e) { setReturnCode(RETURN_CODE_ERROR); diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/ChartViewerComposite.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/ChartViewerComposite.java index edf18011..f7ebd0ec 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/ChartViewerComposite.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/ChartViewerComposite.java @@ -18,7 +18,8 @@ *******************************************************************************/ package com.gluster.storage.management.gui.utils; -import java.util.Date; +import java.lang.reflect.InvocationTargetException; +import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; @@ -38,22 +39,26 @@ import org.eclipse.birt.chart.model.attribute.ChartDimension; import org.eclipse.birt.chart.model.attribute.FontDefinition; import org.eclipse.birt.chart.model.attribute.LineAttributes; import org.eclipse.birt.chart.model.attribute.LineStyle; -import org.eclipse.birt.chart.model.attribute.Marker; +import org.eclipse.birt.chart.model.attribute.NumberFormatSpecifier; import org.eclipse.birt.chart.model.attribute.TickStyle; import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl; import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl; import org.eclipse.birt.chart.model.attribute.impl.FontDefinitionImpl; import org.eclipse.birt.chart.model.attribute.impl.JavaDateFormatSpecifierImpl; import org.eclipse.birt.chart.model.attribute.impl.LineAttributesImpl; +import org.eclipse.birt.chart.model.attribute.impl.NumberFormatSpecifierImpl; import org.eclipse.birt.chart.model.attribute.impl.TextAlignmentImpl; import org.eclipse.birt.chart.model.component.Axis; import org.eclipse.birt.chart.model.component.Series; import org.eclipse.birt.chart.model.component.impl.SeriesImpl; +import org.eclipse.birt.chart.model.data.DateTimeDataElement; import org.eclipse.birt.chart.model.data.DateTimeDataSet; import org.eclipse.birt.chart.model.data.NumberDataSet; import org.eclipse.birt.chart.model.data.SeriesDefinition; import org.eclipse.birt.chart.model.data.TextDataSet; +import org.eclipse.birt.chart.model.data.impl.DateTimeDataElementImpl; import org.eclipse.birt.chart.model.data.impl.DateTimeDataSetImpl; +import org.eclipse.birt.chart.model.data.impl.NumberDataElementImpl; import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl; import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl; import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl; @@ -62,13 +67,21 @@ import org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl; import org.eclipse.birt.chart.model.layout.Legend; import org.eclipse.birt.chart.model.layout.Plot; import org.eclipse.birt.chart.model.type.AreaSeries; -import org.eclipse.birt.chart.model.type.LineSeries; import org.eclipse.birt.chart.model.type.PieSeries; import org.eclipse.birt.chart.model.type.impl.AreaSeriesImpl; -import org.eclipse.birt.chart.model.type.impl.LineSeriesImpl; import org.eclipse.birt.chart.model.type.impl.PieSeriesImpl; import org.eclipse.birt.core.framework.PlatformConfig; import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; import org.eclipse.swt.events.PaintEvent; @@ -79,6 +92,7 @@ import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import com.ibm.icu.util.Calendar; +import com.ibm.icu.util.ULocale; /** * @@ -126,11 +140,11 @@ public final class ChartViewerComposite extends Composite implements PaintListen * Values of each category in the pie chart Constructs a pie * chart viewer composite for given categories and values */ - public ChartViewerComposite(Composite parent, int style, Calendar[] categories, Double[] values) { + public ChartViewerComposite(Composite parent, int style, Calendar[] categories, Double[] values, String unit) { super(parent, style); init(); - chart = createLineChart(categories, values); + chart = createLineChart(categories, values, unit); addPaintListener(this); } @@ -156,8 +170,8 @@ public final class ChartViewerComposite extends Composite implements PaintListen }); } - private Chart createLineChart(Calendar[] timestamps, Double[] values) { - return createAreaChart(timestamps, new Double[][] {values}); + private Chart createLineChart(Calendar[] timestamps, Double[] values, String unit) { + return createAreaChart(timestamps, new Double[][] {values}, unit); } /** @@ -166,47 +180,66 @@ public final class ChartViewerComposite extends Composite implements PaintListen * @return An instance of the simulated runtime chart model (containing * filled datasets) */ - public static final Chart createAreaChart(Calendar[] timestamps, Double[][] values) { + public static final Chart createAreaChart(Calendar[] timestamps, Double[][] values, final String unit) { ChartWithAxes cwaLine = ChartWithAxesImpl.create(); - // Plot - cwaLine.getBlock().setBackground(ColorDefinitionImpl.TRANSPARENT()); + cwaLine.getBlock().setBackground(ColorDefinitionImpl.WHITE()); Plot p = cwaLine.getPlot(); - p.getClientArea().setBackground(ColorDefinitionImpl.TRANSPARENT()); - //p.getClientArea().setBackground(ColorDefinitionImpl.TRANSPARENT()); - + p.getClientArea().setBackground(ColorDefinitionImpl.WHITE()); + p.setBackground(ColorDefinitionImpl.WHITE()); // Title - //cwaLine.getTitle().getLabel().getCaption().setValue("Line Chart");//$NON-NLS-1$ + cwaLine.getTitle().getLabel().getCaption().setValue("Line Chart");//$NON-NLS-1$ cwaLine.getTitle().setVisible(false); + cwaLine.getTitle().getLabel().setVisible(true); + cwaLine.getTitle().getInsets().set(0, 10, 0, 0); + cwaLine.getTitle().setAnchor(Anchor.SOUTH_LITERAL); // Legend - cwaLine.getLegend().setVisible(false); Legend lg = cwaLine.getLegend(); + lg.setVisible(false); LineAttributes lia = lg.getOutline( ); - lg.getText( ).getFont( ).setSize( 16 ); lia.setStyle( LineStyle.SOLID_LITERAL ); - lg.getInsets( ).set( 10, 5, 0, 0 ); + lg.getText( ).getFont( ).setSize( 10 ); + //lg.getInsets( ).set( 10, 5, 0, 0 ); + lg.getInsets( ).set( 0, 0, 0, 0 ); lg.getOutline( ).setVisible( false ); lg.setAnchor( Anchor.NORTH_LITERAL ); // X-Axis Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes()[0]; xAxisPrimary.setType(AxisType.TEXT_LITERAL); - xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.BELOW_LITERAL); - xAxisPrimary.getMajorGrid().setLineAttributes(LineAttributesImpl.create(ColorDefinitionImpl.GREY(), LineStyle.DOTTED_LITERAL, 1)); + DateTimeDataElement dtde = DateTimeDataElementImpl.create(timestamps[timestamps.length-1]); + DateTimeDataElement dtde1 = DateTimeDataElementImpl.create(timestamps[0]); + xAxisPrimary.getScale().setMax(dtde); + xAxisPrimary.getScale().setStep((dtde.getValue() - dtde1.getValue())/ 10); + xAxisPrimary.getScale().setMajorGridsStepNumber(timestamps.length / 10); + //xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.ABOVE_LITERAL); + xAxisPrimary.getMajorGrid().getTickAttributes().setVisible(false); + xAxisPrimary.getMajorGrid().setLineAttributes(LineAttributesImpl.create(ColorDefinitionImpl.GREY(), LineStyle.SOLID_LITERAL, 1)); xAxisPrimary.getTitle().setVisible(false); - xAxisPrimary.setInterval(4); + xAxisPrimary.getTitle().getInsets().set(1, 1, 1, 1); + xAxisPrimary.getLabel().getInsets().set(1, 1, 1, 1); xAxisPrimary.getLabel().getCaption().setFont(createChartFont()); xAxisPrimary.setFormatSpecifier( JavaDateFormatSpecifierImpl.create( "HH:mm" ) ); // Y-Axis Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis(xAxisPrimary); + yAxisPrimary.getScale().setMax(NumberDataElementImpl.create(100)); + yAxisPrimary.getScale().setMin(NumberDataElementImpl.create(0)); + yAxisPrimary.setGapWidth(0); + yAxisPrimary.getScale().setStep(20); + yAxisPrimary.getScale().setMajorGridsStepNumber(1); yAxisPrimary.getMajorGrid().setTickStyle(TickStyle.LEFT_LITERAL); yAxisPrimary.getMajorGrid().setLineAttributes(LineAttributesImpl.create(ColorDefinitionImpl.GREY(), LineStyle.SOLID_LITERAL, 1)); - yAxisPrimary.setInterval(2); yAxisPrimary.getLabel().setVisible(true); yAxisPrimary.getLabel().getCaption().setFont(createChartFont()); + yAxisPrimary.setFormatSpecifier(new NumberFormatSpecifierImpl() { + @Override + public String getSuffix() { + return " " + unit; + } + }); // Data Set DateTimeDataSet categoryValues = DateTimeDataSetImpl.create(timestamps); @@ -231,10 +264,10 @@ public final class ChartViewerComposite extends Composite implements PaintListen NumberDataSet orthoValues = NumberDataSetImpl.create(values[i]); ls.setDataSet(orthoValues); ls.getLineAttributes().setColor(ColorDefinitionImpl.create(50, 50, 255)); - for (int j = 0; j < ls.getMarkers().size(); j++) { - // ( (Marker) ls.getMarkers( ).get( j ) ).setType( MarkerType.CIRCLE_LITERAL); - ((Marker) ls.getMarkers().get(j)).setVisible(false); - } +// for (int j = 0; j < ls.getMarkers().size(); j++) { +// ( (Marker) ls.getMarkers( ).get( j ) ).setType( MarkerType.CIRCLE_LITERAL); +// ((Marker) ls.getMarkers().get(j)).setVisible(true); +// } ls.setTranslucent(true); // don't show values on each point on the line chart ls.getLabel().setVisible(false); @@ -325,7 +358,7 @@ public final class ChartViewerComposite extends Composite implements PaintListen deviceReader.setProperty(IDeviceRenderer.UPDATE_NOTIFIER, this); Bounds bo = BoundsImpl.create(0, 0, d.width, d.height); - bo.scale(58d / deviceReader.getDisplayServer().getDpiResolution()); + bo.scale(71d / deviceReader.getDisplayServer().getDpiResolution()); Generator gr = Generator.instance(); if (needsGeneration) { diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/GUIHelper.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/GUIHelper.java index c4ddc31b..59006431 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/GUIHelper.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/utils/GUIHelper.java @@ -141,9 +141,9 @@ public class GUIHelper { GridLayout layout = new GridLayout(); layout.marginWidth = layout.marginHeight = 0; layout.numColumns = numColumns; - layout.verticalSpacing = 15; - layout.marginBottom = 20; - layout.marginTop = 5; + layout.verticalSpacing = 10; + layout.marginBottom = 15; + layout.marginTop = 10; client.setLayout(layout); section.setClient(client); diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java index bff21548..3f344d8b 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java @@ -59,7 +59,6 @@ import com.gluster.storage.management.gui.utils.GUIHelper; import com.ibm.icu.util.Calendar; /** - * @author root * */ public class ClusterSummaryView extends ViewPart { @@ -134,8 +133,8 @@ public class ClusterSummaryView extends ViewPart { chartViewerComposite.setLayoutData(data); } - private void createLineChart(Composite section, Calendar timestamps[], Double values[]) { - ChartViewerComposite chartViewerComposite = new ChartViewerComposite(section, SWT.NONE, timestamps, values); + private void createLineChart(Composite section, Calendar timestamps[], Double values[], String unit) { + ChartViewerComposite chartViewerComposite = new ChartViewerComposite(section, SWT.NONE, timestamps, values, unit); GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); data.widthHint = 400; data.heightHint = 300; @@ -233,25 +232,28 @@ public class ClusterSummaryView extends ViewPart { return; } - ServerStats stats = new GlusterServersClient().getAggregatedCPUStats(); - List<Calendar> timestamps = new ArrayList<Calendar>(); - List<Double> data = new ArrayList<Double>(); - for(ServerStatsRow row : stats.getRows()) { - timestamps.add(new CDateTime(row.getTimestamp() * 1000)); - // in case of CPU usage, there are three elements in usage data: user, system and total. we use total. - data.add(row.getUsageData().get(2)); - } +// ServerStats stats = new GlusterServersClient().getAggregatedCPUStats(); +// List<Calendar> timestamps = new ArrayList<Calendar>(); +// List<Double> data = new ArrayList<Double>(); +// for(ServerStatsRow row : stats.getRows()) { +// // in case of CPU usage, there are three elements in usage data: user, system and total. we use total. +// Double cpuUsage = row.getUsageData().get(2); +// if(!cpuUsage.isNaN()) { +// timestamps.add(new CDateTime(row.getTimestamp() * 1000)); +// data.add(cpuUsage); +// } +// } +// createLineChart(section, timestamps.toArray(new Calendar[0]), data.toArray(new Double[0])); -// Calendar[] timestamps = new Calendar[] { new CDateTime(1000l*1310468100), new CDateTime(1000l*1310468400), new CDateTime(1000l*1310468700), -// new CDateTime(1000l*1310469000), new CDateTime(1000l*1310469300), new CDateTime(1000l*1310469600), new CDateTime(1000l*1310469900), -// new CDateTime(1000l*1310470200), new CDateTime(1000l*1310470500), new CDateTime(1000l*1310470800), new CDateTime(1000l*1310471100), -// new CDateTime(1000l*1310471400), new CDateTime(1000l*1310471700), new CDateTime(1000l*1310472000), new CDateTime(1000l*1310472300), -// new CDateTime(1000l*1310472600), new CDateTime(1000l*1310472900), new CDateTime(1000l*1310473200), new CDateTime(1000l*1310473500), -// new CDateTime(1000l*1310473800) }; + Calendar[] timestamps = new Calendar[] { new CDateTime(1000l*1310468100), new CDateTime(1000l*1310468400), new CDateTime(1000l*1310468700), + new CDateTime(1000l*1310469000), new CDateTime(1000l*1310469300), new CDateTime(1000l*1310469600), new CDateTime(1000l*1310469900), + new CDateTime(1000l*1310470200), new CDateTime(1000l*1310470500), new CDateTime(1000l*1310470800), new CDateTime(1000l*1310471100), + new CDateTime(1000l*1310471400), new CDateTime(1000l*1310471700), new CDateTime(1000l*1310472000), new CDateTime(1000l*1310472300), + new CDateTime(1000l*1310472600), new CDateTime(1000l*1310472900), new CDateTime(1000l*1310473200), new CDateTime(1000l*1310473500), + new CDateTime(1000l*1310473800) }; - //String[] timestampsarr = new String[] {"t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", "t10", "t11", "t12", "t13", "t14", "t15", "t16", "t17", "t18", "t19", "t20"}; - //Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 89.31d, 57.39d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 21.43d, 16.45d, 14.86d, 15.27d }; - createLineChart(section, timestamps.toArray(new Calendar[0]), data.toArray(new Double[0])); + Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 89.31d, 57.39d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 21.43d, 16.45d, 14.86d, 15.27d }; + createLineChart(section, timestamps, values, "%"); } private void createNetworkUsageSection() { @@ -270,9 +272,8 @@ public class ClusterSummaryView extends ViewPart { // new Date(1310471400), new Date(1310471700), new Date(1310472000), new Date(1310472300), // new Date(1310472600), new Date(1310472900), new Date(1310473200), new Date(1310473500), // new Date(1310473800) }; - String[] timestampsarr = new String[] {"t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", "t10", "t11", "t12", "t13", "t14", "t15", "t16", "t17", "t18", "t19", "t20"}; Double[] values = new Double[] { 32d, 31.23d, 27.92d, 48.69d, 58.62d, 49.11d, 72.43d, 69.31d, 87.39d, 78.46d, 60.44d, 56.28d, 33.51d, 27.53d, 12.21, 10d, 21.43d, 36.45d, 34.86d, 35.27d }; - createLineChart(section, timestamps, values); + createLineChart(section, timestamps, values, "KiB/s"); } private void createRunningTasksSection() { diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServerSummaryView.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServerSummaryView.java index 784fddfc..bae6b9e3 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServerSummaryView.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServerSummaryView.java @@ -29,16 +29,20 @@ import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.ProgressBar; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.eclipse.ui.forms.widgets.Hyperlink; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; @@ -67,6 +71,7 @@ public class GlusterServerSummaryView extends ViewPart { private ScrolledForm form; private GlusterServer server; private ClusterListener serverChangedListener; + private static final int CHART_WIDTH = 350; public enum NETWORK_INTERFACE_TABLE_COLUMN_INDICES { INTERFACE, MODEL, SPEED, IP_ADDRESS, NETMASK, GATEWAY @@ -105,36 +110,97 @@ public class GlusterServerSummaryView extends ViewPart { GlusterDataModelManager.getInstance().removeClusterListener(serverChangedListener); } - private void createLineChart(Composite section, Calendar timestamps[], Double values[]) { - ChartViewerComposite chartViewerComposite = new ChartViewerComposite(section, SWT.NONE, timestamps, values); + private void createLineChart(Composite section, Calendar timestamps[], Double values[], String unit) { + ChartViewerComposite chartViewerComposite = new ChartViewerComposite(section, SWT.NONE, timestamps, values, unit); GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); - data.widthHint = 450; - data.heightHint = 300; - data.verticalAlignment = SWT.CENTER; +// data.widthHint = CHART_WIDTH; + data.heightHint = 250; +// data.verticalAlignment = SWT.CENTER; +// data.grabExcessVerticalSpace = false; +// data.horizontalSpan = 5; +// data.verticalIndent = 0; +// data.verticalSpan = 1; chartViewerComposite.setLayoutData(data); } private void createMemoryUsageSection() { - Composite section = guiHelper.createSection(form, toolkit, "Memory Usage (aggregated)", null, 1, false); - toolkit.createLabel(section, "Historical Memory Usage graph aggregated across all servers will be displayed here."); + Composite section = guiHelper.createSection(form, toolkit, "Memory Usage", null, 1, false); + Calendar[] timestamps = new Calendar[] { new CDateTime(1000l*1310468100), new CDateTime(1000l*1310468400), new CDateTime(1000l*1310468700), + new CDateTime(1000l*1310469000), new CDateTime(1000l*1310469300), new CDateTime(1000l*1310469600), new CDateTime(1000l*1310469900), + new CDateTime(1000l*1310470200), new CDateTime(1000l*1310470500), new CDateTime(1000l*1310470800), new CDateTime(1000l*1310471100), + new CDateTime(1000l*1310471400), new CDateTime(1000l*1310471700), new CDateTime(1000l*1310472000), new CDateTime(1000l*1310472300), + new CDateTime(1000l*1310472600), new CDateTime(1000l*1310472900), new CDateTime(1000l*1310473200), new CDateTime(1000l*1310473500), + new CDateTime(1000l*1310473800) }; + //Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 20.31d, 19.63d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 40d, 10d, 90d, 40d }; + Double[] values = new Double[] { 35d, 34.23d, 37.92d, 28.69d, 38.62d, 39.11d, 38.46d, 30.44d, 36.28d, 72.43d, 79.31d, 77.39d, 33.51d, 37.53d, 32.21, 30d, 31.43d, 36.45d, 34.86d, 35.27d }; + createLineChart(section, timestamps, values, "%"); + Composite graphComposite = createChartLinks(section, 4); } + private void createNetworkUsageSection() { + Composite section = guiHelper.createSection(form, toolkit, "Network Usage", null, 1, false); + + Calendar[] timestamps = new Calendar[] { new CDateTime(1000l*1310468100), new CDateTime(1000l*1310468400), new CDateTime(1000l*1310468700), + new CDateTime(1000l*1310469000), new CDateTime(1000l*1310469300), new CDateTime(1000l*1310469600), new CDateTime(1000l*1310469900), + new CDateTime(1000l*1310470200), new CDateTime(1000l*1310470500), new CDateTime(1000l*1310470800), new CDateTime(1000l*1310471100), + new CDateTime(1000l*1310471400), new CDateTime(1000l*1310471700), new CDateTime(1000l*1310472000), new CDateTime(1000l*1310472300), + new CDateTime(1000l*1310472600), new CDateTime(1000l*1310472900), new CDateTime(1000l*1310473200), new CDateTime(1000l*1310473500), + new CDateTime(1000l*1310473800) }; + Double[] values = new Double[] { 32d, 31.23d, 27.92d, 48.69d, 58.62d, 49.11d, 72.43d, 69.31d, 87.39d, 78.46d, 60.44d, 56.28d, 33.51d, 27.53d, 12.21, 10d, 21.43d, 36.45d, 34.86d, 35.27d }; + + createLineChart(section, timestamps, values, "Kib/s"); + + Composite graphComposite = createChartLinks(section, 5); + CCombo interfaceCombo = new CCombo(graphComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER | SWT.FLAT); + interfaceCombo.setItems(new String[] {"eth0"}); + interfaceCombo.select(0); + } + + private void createCPUUsageSection() { - Composite section = guiHelper.createSection(form, toolkit, "CPU Usage (aggregated)", null, 1, false); + Composite section = guiHelper.createSection(form, toolkit, "CPU Usage", null, 1, false); //toolkit.createLabel(section, "Historical CPU Usage graph aggregated across\nall servers will be displayed here."); -// String[] timestamps = new String[] {"t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", "t10", "t11", "t12", "t13", "t14", "t15", "t16", "t17", "t18", "t19", "t20"}; -// Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 20.31d, 19.63d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 40d, 10d, 90d, 40d }; - ServerStats stats = new GlusterServersClient().getAggregatedCPUStats(); - List<Calendar> timestamps = new ArrayList<Calendar>(); - List<Double> data = new ArrayList<Double>(); - for(ServerStatsRow row : stats.getRows()) { - timestamps.add(new CDateTime(row.getTimestamp() * 1000)); - // in case of CPU usage, there are three elements in usage data: user, system and total. we use total. - data.add(row.getUsageData().get(2)); - } + Calendar[] timestamps = new Calendar[] { new CDateTime(1000l*1310468100), new CDateTime(1000l*1310468400), new CDateTime(1000l*1310468700), + new CDateTime(1000l*1310469000), new CDateTime(1000l*1310469300), new CDateTime(1000l*1310469600), new CDateTime(1000l*1310469900), + new CDateTime(1000l*1310470200), new CDateTime(1000l*1310470500), new CDateTime(1000l*1310470800), new CDateTime(1000l*1310471100), + new CDateTime(1000l*1310471400), new CDateTime(1000l*1310471700), new CDateTime(1000l*1310472000), new CDateTime(1000l*1310472300), + new CDateTime(1000l*1310472600), new CDateTime(1000l*1310472900), new CDateTime(1000l*1310473200), new CDateTime(1000l*1310473500), + new CDateTime(1000l*1310473800) }; + //Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 20.31d, 19.63d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 40d, 10d, 90d, 40d }; + Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 89.31d, 57.39d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 21.43d, 16.45d, 14.86d, 15.27d }; + createLineChart(section, timestamps, values, "%"); + +// ServerStats stats = new GlusterServersClient().getAggregatedCPUStats(); +// List<Calendar> timestamps = new ArrayList<Calendar>(); +// List<Double> data = new ArrayList<Double>(); +// for(ServerStatsRow row : stats.getRows()) { +// timestamps.add(new CDateTime(row.getTimestamp() * 1000)); +// // in case of CPU usage, there are three elements in usage data: user, system and total. we use total. +// data.add(row.getUsageData().get(2)); +// } +// +// createLineChart(section, timestamps.toArray(new Calendar[0]), data.toArray(new Double[0])); + Composite graphComposite = createChartLinks(section, 4); + } + + private Composite createChartLinks(Composite section, int columnCount) { + GridLayout layout = new org.eclipse.swt.layout.GridLayout(columnCount, false); + layout.marginBottom = 0; + layout.marginTop = 0; + layout.marginLeft = (CHART_WIDTH - (50*columnCount)) / 2; + Composite graphComposite = toolkit.createComposite(section, SWT.NONE); + graphComposite.setLayout(layout); + GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); + data.widthHint = CHART_WIDTH; + graphComposite.setLayoutData(data); + + Label label1 = toolkit.createLabel(graphComposite, "1 day"); + Hyperlink link1 = toolkit.createHyperlink(graphComposite, "1 week", SWT.NONE); + Hyperlink link2 = toolkit.createHyperlink(graphComposite, "1 month", SWT.NONE); + Hyperlink link3 = toolkit.createHyperlink(graphComposite, "1 year", SWT.NONE); - createLineChart(section, timestamps.toArray(new Calendar[0]), data.toArray(new Double[0])); + return graphComposite; } private void createSections(Composite parent) { @@ -144,6 +210,7 @@ public class GlusterServerSummaryView extends ViewPart { if (server.getStatus() == SERVER_STATUS.ONLINE) { createMemoryUsageSection(); + createNetworkUsageSection(); createCPUUsageSection(); createNetworkInterfacesSection(server, toolkit, form); } diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterViewsManager.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterViewsManager.java index a13d41d7..ca8788e5 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterViewsManager.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterViewsManager.java @@ -94,7 +94,7 @@ public class GlusterViewsManager implements ViewsManager { page.showView(GlusterServerSummaryView.ID); if (server.getStatus() == GlusterServer.SERVER_STATUS.ONLINE) { page.showView(GlusterServerDisksView.ID, null, IWorkbenchPage.VIEW_CREATE); - page.showView(GlusterServerLogsView.ID, null, IWorkbenchPage.VIEW_CREATE); + //page.showView(GlusterServerLogsView.ID, null, IWorkbenchPage.VIEW_CREATE); } } diff --git a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/ServerUtil.java b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/ServerUtil.java index 775ca221..31342329 100644 --- a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/ServerUtil.java +++ b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/ServerUtil.java @@ -208,8 +208,8 @@ public class ServerUtil { if (tryGenericResponseOnFailure) { // unmarshalling failed. try to unmarshal a GenericResponse object return unmarshal(GenericResponse.class, input, false); - } + } return new Status(Status.STATUS_CODE_FAILURE, "Error during unmarshalling string [" + input + "] for class [" + expectedClass.getName() + ": [" + e.getMessage() + "]"); } @@ -227,8 +227,9 @@ public class ServerUtil { } public ServerStats fetchCPUUsageData(String serverName) { - String cpuUsageData = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> <xport> <meta> <start>1310468100</start> <step>300</step> <end>1310471700</end> <rows>13</rows> <columns>3</columns> <legend> <entry>user</entry> <entry>system</entry> <entry>total</entry> </legend> </meta> <data> <row><t>1310468100</t><v>2.23802952e-1</v><v>4.3747778209e-01</v><v>6.6128073384e-01</v></row> <row><t>1310468400</t><v>2.3387347338e-01</v><v>4.4642717442e-01</v><v>6.8030064780e-01</v></row> <row><t>1310468700</t><v>5.5043873220e+00</v><v>6.2462376636e+00</v><v>1.1750624986e+01</v></row> <row><t>1310469000</t><v>2.4350593653e+01</v><v>2.6214585217e+01</v><v>5.0565178869e+01</v></row> <row><t>1310469300</t><v>4.0786489953e+01</v><v>4.6784713828e+01</v><v>8.7571203781e+01</v></row> <row><t>1310469600</t><v>4.1459955508e+01</v><v>5.2546309044e+01</v><v>9.4006264551e+01</v></row> <row><t>1310469900</t><v>4.2312286165e+01</v><v>5.2390588332e+01</v><v>9.4702874497e+01</v></row> <row><t>1310470200</t><v>4.2603794982e+01</v><v>5.1598861493e+01</v><v>9.4202656475e+01</v></row> <row><t>1310470500</t><v>3.8238751290e+01</v><v>4.5312089966e+01</v><v>8.3550841256e+01</v></row> <row><t>1310470800</t><v>1.7949961224e+01</v><v>2.1282058418e+01</v><v>3.9232019642e+01</v></row> <row><t>1310471100</t><v>1.2330371421e-01</v><v>4.6347832868e-01</v><v>5.8678204289e-01</v></row> <row><t>1310471400</t><v>1.6313260492e-01</v><v>5.4088119561e-01</v><v>7.0401380052e-01</v></row> <row><t>1310471700</t><v>NaN</v><v>NaN</v><v>NaN</v></row> </data> </xport>"; - Object output = unmarshal(ServerStats.class, cpuUsageData, false); + Object output = executeOnServer(true, serverName, "get_rrd_cpu_details.py 1d", ServerStats.class); + //String cpuUsageData = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> <xport> <meta> <start>1310468100</start> <step>300</step> <end>1310471700</end> <rows>13</rows> <columns>3</columns> <legend> <entry>user</entry> <entry>system</entry> <entry>total</entry> </legend> </meta> <data> <row><t>1310468100</t><v>2.23802952e-1</v><v>4.3747778209e-01</v><v>6.6128073384e-01</v></row> <row><t>1310468400</t><v>2.3387347338e-01</v><v>4.4642717442e-01</v><v>6.8030064780e-01</v></row> <row><t>1310468700</t><v>5.5043873220e+00</v><v>6.2462376636e+00</v><v>1.1750624986e+01</v></row> <row><t>1310469000</t><v>2.4350593653e+01</v><v>2.6214585217e+01</v><v>5.0565178869e+01</v></row> <row><t>1310469300</t><v>4.0786489953e+01</v><v>4.6784713828e+01</v><v>8.7571203781e+01</v></row> <row><t>1310469600</t><v>4.1459955508e+01</v><v>5.2546309044e+01</v><v>9.4006264551e+01</v></row> <row><t>1310469900</t><v>4.2312286165e+01</v><v>5.2390588332e+01</v><v>9.4702874497e+01</v></row> <row><t>1310470200</t><v>4.2603794982e+01</v><v>5.1598861493e+01</v><v>9.4202656475e+01</v></row> <row><t>1310470500</t><v>3.8238751290e+01</v><v>4.5312089966e+01</v><v>8.3550841256e+01</v></row> <row><t>1310470800</t><v>1.7949961224e+01</v><v>2.1282058418e+01</v><v>3.9232019642e+01</v></row> <row><t>1310471100</t><v>1.2330371421e-01</v><v>4.6347832868e-01</v><v>5.8678204289e-01</v></row> <row><t>1310471400</t><v>1.6313260492e-01</v><v>5.4088119561e-01</v><v>7.0401380052e-01</v></row> <row><t>1310471700</t><v>NaN</v><v>NaN</v><v>NaN</v></row> </data> </xport>"; + //Object output = unmarshal(ServerStats.class, cpuUsageData, false); if(output instanceof Status) { throw new GlusterRuntimeException(((Status)output).toString()); } |
