-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from solusio/task-lbinde-adv-config
Advanced configuration
- Loading branch information
Showing
10 changed files
with
155 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/config.php | ||
/node_modules | ||
/releases | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
// Copyright 2020. Plesk International GmbH. | ||
|
||
return [ | ||
'delete_solus_user' => false, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
// Copyright 2020. Plesk International GmbH. | ||
|
||
namespace WHMCS\Module\Server\SolusIoVps\Database\Models; | ||
|
||
use WHMCS\Database\Capsule as DB; | ||
|
||
/** | ||
* @package WHMCS\Module\Server\SolusIoVps\Database\Models | ||
*/ | ||
class User | ||
{ | ||
const TABLE = 'tblusers'; | ||
|
||
/** | ||
* @param int $id | ||
* @return object|null | ||
*/ | ||
public static function getById(int $id) | ||
{ | ||
return DB::table(self::TABLE)->where(['id' => $id])->first(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
// Copyright 2020. Plesk International GmbH. | ||
|
||
namespace WHMCS\Module\Server\SolusIoVps\WhmcsAPI; | ||
|
||
use WHMCS\Module\Server\SolusIoVps\Database\Models\Server; | ||
use WHMCS\Module\Server\SolusIoVps\SolusAPI\Resources\ProjectResource; | ||
use WHMCS\Module\Server\SolusIoVps\SolusAPI\Connector; | ||
|
||
/** | ||
* @package WHMCS\Module\Server\SolusIoVps\WhmcsAPI | ||
*/ | ||
class Servers | ||
{ | ||
public static function getValidParams(): array | ||
{ | ||
$serverIds = Server::getServerIds(); | ||
|
||
foreach ($serverIds as $serverId) { | ||
$serverParams = Server::getParams($serverId); | ||
|
||
try { | ||
$projectResource = new ProjectResource(Connector::create($serverParams)); | ||
|
||
$projectResource->list(); | ||
|
||
return $serverParams; | ||
} catch (\Exception $e) { | ||
return []; | ||
} | ||
} | ||
} | ||
} |