Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
feat(zipfile): added subdirs to the zipfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashad Jamara authored and KaiSchwarz-cnic committed Jul 1, 2021
1 parent e2d7313 commit 47e9a35
Show file tree
Hide file tree
Showing 7 changed files with 800 additions and 98 deletions.
21 changes: 21 additions & 0 deletions build/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## [1.6.7](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/compare/v1.6.6...v1.6.7) (2021-03-30)


### Bug Fixes

* **getactivedomainswhmcs:** fixed issue with foreach args ([ccc2031](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/commit/ccc2031f6ec3bea4589a72bb7e5e34927c9a9635))

## [1.6.6](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/compare/v1.6.5...v1.6.6) (2021-03-09)


### Performance Improvements

* **getactivedomainswhmcs:** to use toJson approach for array vs. object problem ([00c032d](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/commit/00c032d31d393c918e69bb4104ad115cd5ec1b69))

## [1.6.5](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/compare/v1.6.4...v1.6.5) (2021-01-20)


### Bug Fixes

* **ci:** migration from Travis CI to github actions ([c131dc7](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/commit/c131dc7a85a97b8c24723907a0bc37d94cfe603c))

## [1.6.4](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/compare/v1.6.3...v1.6.4) (2021-01-07)


Expand Down
66 changes: 3 additions & 63 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,18 @@

This Repository covers the WHMCS "ISPAPI" Dashboard Widget "Monitoring". It provides the following features to WHMCS:

## Supported Features ##

Monitoring of Domain Data Issues like

* WHOIS Privacy Service
* Transfer Lock
* Premium Renewal Cost Price (WHMCS Bug 'til v7.8)
* Standard Domains that are Premium in real
* Cleanup comments that got added by our Migration & Consolidation Tool

... and providing buttons to get the cases fixed.

If there's something missing, let us know and we will extend.

## Why this Widget ##

This widget was planned as nice to have for different purposes to show data differences between the HEXONET API and WHMCS. Don't worry, we do not have such issues in general. Whenever changes happen on domain level outside of WHMCS you might run into trouble as booked additional domain services might not correctly get invoiced to your customers (worst case!). This might happen when using another Frontend to activate or deactivate Domain Add-Ons / Services. Some Registries (e.g. DK Hostmaster) even allow Registrants to maintain domains over a registry frontend and to perform different actions directly there. This is where WHMCS modules in general might run into corner cases - Imagine that 3 systems are there then involved: Registry, HEXONET, WHMCS. Whenever underlying processes are quite special, that's where it is getting hard with WHMCS at the end and this is where we are thinking that this Widget helps!
Another reason might be that our resellers need help getting domain data fixed as of a bug in older WHMCS Versions.

## Resources ##

* [Release Notes](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/releases)

**If you have any issue related to this module, feel free to open an github issue or to contact our support team.**

## Minimum Requirements ##

Having Javascript activated in Browser.
For the latest WHMCS minimum system requirements, please refer to
[https://docs.whmcs.com/System_Requirements](https://docs.whmcs.com/System_Requirements)

This Dashboard Widget is only compatible with the [ISPAPI registrar module](https://github.com/hexonet/whmcs-ispapi-registrar). Please install that provider module in version >= v4.4.5 first.

## Usage Guide ##
Download the ZIP archive [here](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/raw/master/whmcs-ispapi-widget-monitoring-latest.zip) and follow our Documentation.

### Installation / Upgrade ###
* [Documentation](https://centralnic-reseller.github.io/centralnic-reseller/docs/hexonet/whmcs/whmcs-ispapi-widget-monitoring/)

Download the ZIP archive including the latest release version [here](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/raw/master/whmcs-ispapi-widget-monitoring-latest.zip).

Extract the `ispapi_monitoring.php` into folder `/modules/widgets` of your WHMCS instance.

### Using this Widget ###

This is how it looks like in case everything is fine:
![allfine](https://user-images.githubusercontent.com/229425/94283804-c45bb600-ff51-11ea-9097-89e2067cd147.png)

Otherwise cases are listed accordingly and providing a wizard to get them fixed:
![inactivetransferlock](https://user-images.githubusercontent.com/229425/94922353-5a479180-04ba-11eb-9813-434374318552.png)
![wpissues](https://user-images.githubusercontent.com/229425/94419760-7d550700-0183-11eb-88d6-a8eab5e38f94.png)

Click on `Details!` to get more information:
![wizard1](https://user-images.githubusercontent.com/229425/94922460-8c58f380-04ba-11eb-9cf8-399d401bb971.png)

By clicking on `Fix this!` the widget takes care of processing the items as described:
![wizard2](https://user-images.githubusercontent.com/229425/94922508-a72b6800-04ba-11eb-9e5a-08ca63a29988.png)
![wizard3](https://user-images.githubusercontent.com/229425/94922549-b7434780-04ba-11eb-9d31-3f36f50ac167.png)

Furthermore you can download the affected items as CSV list for your reference before processing (without results) and after processing (including results).
NOTE: columns are separated by tab delimiter.

**Note:** This can of course take a while in case a lot of domains have to be processed on API side.

## Contributing ##

Please read [our contributing guide](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
**If you have any issue related to this module, feel free to open an github issue or to contact our support team.**

## Authors ##

* **Kai Schwarz** - *development* - [PapaKai](https://github.com/papakai)

See also the list of [contributors](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/graphs/contributors) who participated in this project.

## License ##

This project is licensed under the MIT License - see the [LICENSE](https://github.com/hexonet/whmcs-ispapi-widget-monitoring/blob/master/LICENSE) file for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class IspapiMonitoringWidget extends \WHMCS\Module\AbstractWidget
protected $cache = false;
protected $cacheExpiry = 120;
protected $requiredPermission = '';
const VERSION = "1.6.4";
const VERSION = "1.6.7";

/**
* add generic parameters to domain list command and request to API
Expand Down Expand Up @@ -114,18 +114,16 @@ private static function getActiveDomainsWHMCS()
if (!is_null($tmp)) {
return $tmp;
}
$result = DB::table("tbldomains")
$result = json_decode(DB::table("tbldomains")
->select("id", "domain", "idprotection", "additionalnotes", "is_premium")
->where([
["registrar", "=", "ispapi"],
["status", "=", "active"]
])
->get();
->get()->toJson(), true);
$tmp = [];
foreach ($result as $row) {
if (is_object($row)) {
$tmp[$row->domain] = get_object_vars($row);
} else {
if (!empty($result)) {
foreach ($result as $row) {
$tmp[$row["domain"]] = $row;
}
}
Expand Down Expand Up @@ -430,9 +428,11 @@ private static function getDataWPAPICASE(&$data)
$domainsWHMCS = self::getActiveDomainsWHMCS();
$items = [];
$casesAPI = self::getIdProtectedDomainsAPI();
foreach ($casesAPI as $c) {
if (isset($domainsWHMCS[$c]) && empty($domainsWHMCS[$c]["is_premium"]) /* null, 0, empty str */) {
$items[] = $c;
if (!empty($casesAPI)) {
foreach ($casesAPI as $c) {
if (isset($domainsWHMCS[$c]) && empty($domainsWHMCS[$c]["is_premium"]) /* null, 0, empty str */) {
$items[] = $c;
}
}
}
if (!empty($items)) {
Expand All @@ -451,9 +451,11 @@ private static function getDataTLAPICASE(&$data)
$domainsWHMCS = self::getActiveDomainsWHMCS();
$items = [];
$casesAPI = self::getTransferUnlockedDomainsAPI();
foreach ($casesAPI as $c) {
if (isset($domainsWHMCS[$c])) {
$items[] = $c;
if (!empty($casesAPI)) {
foreach ($casesAPI as $c) {
if (isset($domainsWHMCS[$c])) {
$items[] = $c;
}
}
}
if (!empty($items)) {
Expand Down
34 changes: 15 additions & 19 deletions gulpfile.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"phpcsparams": "--extensions=php --ignore=node_modules -q .",
"phpcsfixcmd": "phpcbf --standard=PSR12",
"phpcschkcmd": "phpcs -s -n --colors --standard=PSR12",
"phpcomptcmd": "phpcs -s -n --colors --standard=PHPCompatibility --runtime-set testVersion \"$(php -r 'echo PHP_MAJOR_VERSION . \".\" . PHP_MINOR_VERSION;')\"",
"archiveFileName": "whmcs-ispapi-widget-monitoring",
"archiveBuildPath": "build",
"filesForArchive": [
"README.md",
"CONTRIBUTING.md",
"HISTORY.md",
"LICENSE",
"ispapi_monitoring.php"
],
"filesForCleanup": [
"composer.lock",
"package-lock.json",
"tmp"
]
}
"phpcsparams": "--extensions=php --ignore=node_modules -q .",
"phpcsfixcmd": "phpcbf --standard=PSR12",
"phpcschkcmd": "phpcs -s -n --colors --standard=PSR12",
"phpcomptcmd": "phpcs -s -n --colors --standard=PHPCompatibility --runtime-set testVersion \"$(php -r 'echo PHP_MAJOR_VERSION . \".\" . PHP_MINOR_VERSION;')\"",
"archiveFileName": "whmcs-ispapi-widget-monitoring",
"archiveBuildPath": "build",
"filesForArchive": [
"README.md",
"CONTRIBUTING.md",
"HISTORY.md",
"LICENSE",
"modules/**"
],
"filesForCleanup": ["composer.lock", "package-lock.json", "tmp"]
}
Loading

0 comments on commit 47e9a35

Please sign in to comment.