#53: Reducing multiple SOAP calls to one for now as it seems that the web UI is only using the first processor description anyway and because of the wrong loop approach it doesn't make sense to query the CPU ID 0 multiple times. The multiple entries in the array are only used to show the total number of CPUs. Both places need to be synced in the end anyway, it doesn't make sense to only assume one description in one place and multiple different in some other.

https://github.com/phpvirtualbox/phpvirtualbox/blob/develop/js/phpvirtualbox.js#L48
This commit is contained in:
Thorsten Schöning 2017-08-31 09:40:53 +02:00
parent 7e2d7e7431
commit 0e92cd0d0f
1 changed files with 4 additions and 3 deletions

View File

@ -3390,9 +3390,10 @@ class vboxconnector {
/* /*
* Processors * Processors
*/ */
for($i = 0; $i < $host->processorCount; $i++) { // TODO https://github.com/phpvirtualbox/phpvirtualbox/issues/53
// TODO https://github.com/phpvirtualbox/phpvirtualbox/issues/53 $response['cpus'][0] = $host->getProcessorDescription(0);
$response['cpus'][$i] = $host->getProcessorDescription(0); for($i = 1; $i < $host->processorCount; $i++) {
$response['cpus'][$i] = $response['cpus'][0];
} }
/* /*