Skip to content

Commit 8262c2b

Browse files
committed
Update to fix the 'unknown attribute vnc' issue.
1 parent e505b65 commit 8262c2b

File tree

5 files changed

+394
-413
lines changed

5 files changed

+394
-413
lines changed

modules/servers/upCloudVm/Helper.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ public static function generateFields(string $field = '')
8888
{
8989
Capsule::table('tblcustomfields')
9090
->updateOrInsert(['type' => 'product', 'relid' => $product->id, 'fieldname' => 'SSHKey|SSH Key'], ['showorder' => 'on', 'fieldtype' => 'textarea']);
91-
header("Location: configproducts.php?action=edit&id=".\App::getFromRequest("id")."&tab=4");
91+
Capsule::table('tblcustomfields')
92+
->updateOrInsert(['type' => 'product', 'relid' => $product->id, 'fieldname' => 'initialization|Initialization Script'], ['showorder' => 'on', 'fieldtype' => 'textarea']);
93+
94+
95+
header("Location: configproducts.php?action=edit&id=".\App::getFromRequest("id")."&tab=4");
9296
die;
9397
}
9498

@@ -296,6 +300,13 @@ public static function getData(array $params, string $page)
296300
}
297301
}
298302

303+
$vnc = $details->remote_access_enabled;
304+
if ($vnc == 'yes') {
305+
$vnc = 'on';
306+
} else {
307+
$vnc = 'off';
308+
}
309+
299310
$data['details'] = [
300311
'hostname' => $details->hostname,
301312
'ip' => $details->ip,
@@ -304,10 +315,10 @@ public static function getData(array $params, string $page)
304315
'template' => $templ['data']->storage->title,
305316
'status' => $details->state,
306317
'location' => $details->zone,
307-
'vnc' => $details->vnc,
308-
'vnc_host' => $details->vnc_host,
309-
'vnc_port' => $details->vnc_port,
310-
'vnc_password' => $details->vnc_password,
318+
'vnc' => $vnc,
319+
'vnc_host' => $details->remote_access_host,
320+
'vnc_port' => $details->remote_access_port,
321+
'vnc_password' => $details->remote_access_password,
311322
];
312323

313324
$ips = [];

0 commit comments

Comments
 (0)