mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-25 10:32:31 +01:00
Added Disk to overview (issue:1547) (#1569)
This commit is contained in:
parent
4f54b18ce1
commit
c68ca0c773
@ -101,11 +101,13 @@
|
|||||||
currentCpu = parseFloat(((info.proc.cpu.total / cpuMax) * 100).toFixed(2).toString());
|
currentCpu = parseFloat(((info.proc.cpu.total / cpuMax) * 100).toFixed(2).toString());
|
||||||
}
|
}
|
||||||
element.find('[data-action="memory"]').html(parseInt(info.proc.memory.total / (1024 * 1024)));
|
element.find('[data-action="memory"]').html(parseInt(info.proc.memory.total / (1024 * 1024)));
|
||||||
|
element.find('[data-action="disk"]').html(parseInt(info.proc.disk.used));
|
||||||
element.find('[data-action="cpu"]').html(currentCpu);
|
element.find('[data-action="cpu"]').html(currentCpu);
|
||||||
} else {
|
} else {
|
||||||
element.find('[data-action="memory"]').html('--');
|
element.find('[data-action="memory"]').html('--');
|
||||||
|
element.find('[data-action="disk"]').html('--');
|
||||||
element.find('[data-action="cpu"]').html('--');
|
element.find('[data-action="cpu"]').html('--');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})();
|
})();
|
@ -74,9 +74,11 @@
|
|||||||
}
|
}
|
||||||
element.find('[data-action="memory"]').html(parseInt(data.proc.memory.total / (1024 * 1024)));
|
element.find('[data-action="memory"]').html(parseInt(data.proc.memory.total / (1024 * 1024)));
|
||||||
element.find('[data-action="cpu"]').html(currentCpu);
|
element.find('[data-action="cpu"]').html(currentCpu);
|
||||||
|
element.find('[data-action="disk"]').html(parseInt(data.proc.disk.used));
|
||||||
} else {
|
} else {
|
||||||
element.find('[data-action="memory"]').html('--');
|
element.find('[data-action="memory"]').html('--');
|
||||||
element.find('[data-action="cpu"]').html('--');
|
element.find('[data-action="cpu"]').html('--');
|
||||||
|
element.find('[data-action="disk"]').html('--');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).fail(function (jqXHR) {
|
}).fail(function (jqXHR) {
|
||||||
|
@ -14,6 +14,7 @@ return [
|
|||||||
'connection' => 'Connection',
|
'connection' => 'Connection',
|
||||||
'memory' => 'Memory',
|
'memory' => 'Memory',
|
||||||
'cpu' => 'CPU',
|
'cpu' => 'CPU',
|
||||||
|
'disk' => 'Disk',
|
||||||
'status' => 'Status',
|
'status' => 'Status',
|
||||||
'search' => 'Search',
|
'search' => 'Search',
|
||||||
'suspended' => 'Suspended',
|
'suspended' => 'Suspended',
|
||||||
|
@ -57,10 +57,10 @@
|
|||||||
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
|
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
|
||||||
<td><a href="{{ route('admin.users.view', $server->owner_id) }}">{{ $server->user->username }}</a></td>
|
<td><a href="{{ route('admin.users.view', $server->owner_id) }}">{{ $server->user->username }}</a></td>
|
||||||
<td>{{ $server->nest->name }} ({{ $server->egg->name }})</td>
|
<td>{{ $server->nest->name }} ({{ $server->egg->name }})</td>
|
||||||
<td class="text-center"><span data-action="memory">NaN</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
<td class="text-center"><span data-action="memory">--</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
||||||
<td class="text-center">{{ $server->disk }} MB</td>
|
<td class="text-center"><span data-action="disk">--</span> / {{ $server->disk === 0 ? '∞' : $server->disk }} MB </td>
|
||||||
<td class="text-center"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">NaN</span> %</td>
|
<td class="text-center"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">--</span> %</td>
|
||||||
<td class="text-center" data-action="status">NaN</td>
|
<td class="text-center" data-action="status">--</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
@ -78,4 +78,4 @@
|
|||||||
@section('footer-scripts')
|
@section('footer-scripts')
|
||||||
@parent
|
@parent
|
||||||
{!! Theme::js('js/admin/node/view-servers.js') !!}
|
{!! Theme::js('js/admin/node/view-servers.js') !!}
|
||||||
@endsection
|
@endsection
|
@ -44,6 +44,7 @@
|
|||||||
<th>@lang('strings.connection')</th>
|
<th>@lang('strings.connection')</th>
|
||||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.memory')</th>
|
<th class="text-center hidden-sm hidden-xs">@lang('strings.memory')</th>
|
||||||
<th class="text-center hidden-sm hidden-xs">@lang('strings.cpu')</th>
|
<th class="text-center hidden-sm hidden-xs">@lang('strings.cpu')</th>
|
||||||
|
<th class="text-center hidden-sm hidden-xs">@lang('strings.disk')</th>
|
||||||
<th class="text-center">@lang('strings.relation')</th>
|
<th class="text-center">@lang('strings.relation')</th>
|
||||||
<th class="text-center">@lang('strings.status')</th>
|
<th class="text-center">@lang('strings.status')</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -55,6 +56,7 @@
|
|||||||
<td><code>{{ $server->getRelation('allocation')->alias }}:{{ $server->getRelation('allocation')->port }}</code></td>
|
<td><code>{{ $server->getRelation('allocation')->alias }}:{{ $server->getRelation('allocation')->port }}</code></td>
|
||||||
<td class="text-center hidden-sm hidden-xs"><span data-action="memory">--</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
<td class="text-center hidden-sm hidden-xs"><span data-action="memory">--</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
||||||
<td class="text-center hidden-sm hidden-xs"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">--</span> %</td>
|
<td class="text-center hidden-sm hidden-xs"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">--</span> %</td>
|
||||||
|
<td class="text-center hidden-sm hidden-xs"><span data-action="disk">--</span> / {{ $server->disk === 0 ? '∞' : $server->disk }} MB </td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
@if($server->user->id === Auth::user()->id)
|
@if($server->user->id === Auth::user()->id)
|
||||||
<span class="label bg-purple">@lang('strings.owner')</span>
|
<span class="label bg-purple">@lang('strings.owner')</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user