提交 411d22d0 编写于 作者: N Nicolas Hennion 提交者: GitHub

Merge pull request #1045 from notFloran/webui-fix-fs-mountpoint-too-long

[WebUI] Cut mount point if it's too long
......@@ -7,7 +7,7 @@
<div class="table-cell">Total</div>
</div>
<div class="table-row" ng-repeat="fs in statsFs.fileSystems | orderBy: 'mnt_point'">
<div class="table-cell text-left">{{ fs.mountPoint }} <span class="visible-lg-inline" ng-show="fs.name.length <= 20">({{ fs.name }})<span></div>
<div class="table-cell text-left">{{ fs.shortMountPoint }} <span class="visible-lg-inline" ng-show="fs.name.length <= 20">({{ fs.name }})<span></div>
<div class="table-cell" ng-class="statsFs.getDecoration(fs.mountPoint, 'used')">
<span ng-show="!arguments.fs_free_space">{{ fs.used | bytes }}</span>
<span ng-show="arguments.fs_free_space">{{ fs.free | bytes }}</span>
......
......@@ -5,7 +5,6 @@ glancesApp.service('GlancesPluginCloud', function() {
this.setData = function(data, views) {
data = data[_pluginName];
data = {"region": "R", "instance-type": "IT", "ami-id": "AMI", "instance-id": "IID"};
if (data['ami-id'] !== undefined) {
_provider = 'AWS EC2';
......
......@@ -11,9 +11,15 @@ glancesApp.service('GlancesPluginFs', function() {
for (var i = 0; i < data.length; i++) {
var fsData = data[i];
var shortMountPoint = fsData['mnt_point'];
if (shortMountPoint.length > 9) {
shortMountPoint = '_' + fsData['mnt_point'].slice(-8);
}
var fs = {
'name': fsData['device_name'],
'mountPoint': fsData['mnt_point'],
'shortMountPoint': shortMountPoint,
'percent': fsData['percent'],
'size': fsData['size'],
'used': fsData['used'],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册