diff --git a/Config/.php-cs-fixer.php b/Config/.php-cs-fixer.php index 7f84d88..a428ed1 100644 --- a/Config/.php-cs-fixer.php +++ b/Config/.php-cs-fixer.php @@ -3,6 +3,7 @@ $finder = PhpCsFixer\Finder::create() ->exclude('MainRepository') ->exclude('vendor') + ->exclude('node_modules') ->exclude('Build') ->in(__DIR__ . '/../../'); @@ -18,18 +19,18 @@ $rules = '{ }, "binary_operator_spaces": { "operators": { - "=": "align", - ".=": "align", - "+=": "align", - "-=": "align", - "*=": "align", - "\/=": "align", - "|=": "align", - "&=": "align", - "=>": "align", - "??=": "align", - ">>=": "align", - "<<=": "align" + "=": "align_single_space_minimal", + ".=": "align_single_space_minimal", + "+=": "align_single_space_minimal", + "-=": "align_single_space_minimal", + "*=": "align_single_space_minimal", + "\/=": "align_single_space_minimal", + "|=": "align_single_space_minimal", + "&=": "align_single_space_minimal", + "=>": "align_single_space_minimal", + "??=": "align_single_space_minimal", + ">>=": "align_single_space_minimal", + "<<=": "align_single_space_minimal" } }, "cast_spaces": { @@ -48,6 +49,7 @@ $rules = '{ "declare_equal_normalize": { "space": "none" }, + "nullable_type_declaration_for_default_null_value": true, "elseif": true, "encoding": true, "explicit_indirect_variable": true, diff --git a/Config/phpcs.xml b/Config/phpcs.xml index 8430a01..96f7f77 100755 --- a/Config/phpcs.xml +++ b/Config/phpcs.xml @@ -27,21 +27,11 @@ */tests/* */Sandbox/* */vendor/* -*/OAuth2/* -*/Mail/* -*/Interfaces/* -*/Workflows/* -*/Accounting/* -*/JobScheduling/* -*/TrueSkill.php -*/Simplex.php -*/BayesianPersonalizedRanking.php -*/Parser/Spreadsheet/* -*/Parser/Presentation/* -*/Parser/Document/* +*/Parser/Spreadsheet/* +*/Parser/Presentation/* +*/Parser/Document/* *Hooks.php *Markdown.js -*Markdown.php *ObjLoader.js config.php *Routes.php @@ -49,10 +39,11 @@ *Sha1.js *Sha1b.js [abcdef0-9]{32}/* +*.min.js - + *Sort.php @@ -105,6 +96,7 @@ */tests/* + *oLib.js *StringUtils.js @@ -122,6 +114,7 @@ + */Message/Mail/* *Server.php *Ftp/File.php *Ftp/Directory.php @@ -151,6 +144,7 @@ + 7 diff --git a/Config/phpstan.neon b/Config/phpstan.neon index 6ae190a..50470a8 100755 --- a/Config/phpstan.neon +++ b/Config/phpstan.neon @@ -14,6 +14,7 @@ parameters: treatPhpDocTypesAsCertain: false excludePaths: - *.tpl.php + - *.min.js - */Modules/Media/Files/* - */omsSetup/* - */demoSetup/* @@ -40,7 +41,6 @@ parameters: - */DataStorage/Database/* - */Message/Mail/* - */Auth/OAuth2/* - - */Markdown/Markdown.php - */Socket/* - */node_modules/* - */Install/Application/* @@ -51,7 +51,6 @@ parameters: - */Parser/Document/* - */Parser/Spreadsheet/* - *BayesianPersonalizedRanking.php - - *Simplex.php - *DBSCAN.php - *MeanShift.php - *Datamatrix.php diff --git a/Config/rector.php b/Config/rector.php index 4cb28db..8cc5baa 100644 --- a/Config/rector.php +++ b/Config/rector.php @@ -61,10 +61,15 @@ return static function (RectorConfig $rectorConfig) : void { $rectorConfig->skip([ $base . '/vendor', + '*/vendor', + '*/node_modules', + $base . '/privateSetup', + $base . '/demoSetup', $base . '/Build', $base . '/MainRepository', $base . '/Resources', $base . '/Tools', + $base . '/Sandbox', $base . '/cssOMS', '*/Admin/Install/Application', SimplifyEmptyCheckOnEmptyArrayRector::class, diff --git a/Config/reportLang.php b/Config/reportLang.php index 0e6fed0..884e4a6 100755 --- a/Config/reportLang.php +++ b/Config/reportLang.php @@ -2187,7 +2187,7 @@ return [ 'phpOMS\tests\Utils\PermutationTest:testPermute' => ['description' => 'An array can be permuted', 'type' => 'framework'], 'phpOMS\tests\Utils\PermutationTest:testIsPermutation' => ['description' => 'Two string can be checked if they are a permutation of each other', 'type' => 'framework'], 'phpOMS\tests\Utils\PermutationTest:testIsPalindrome' => ['description' => 'A string can be checked if it is a palindrome', 'type' => 'framework'], - 'phpOMS\tests\Utils\PermutationTest:testPermutate' => ['description' => 'An array can be permuted with a permutation key', 'type' => 'framework'], + 'phpOMS\tests\Utils\PermutationTest:testPermute' => ['description' => 'An array can be permuted with a permutation key', 'type' => 'framework'], 'phpOMS\tests\Utils\PermutationTest:testWrongPermuteKeyLength' => ['description' => 'A none-existing permutation key throws a OutOfBoundsException', 'type' => 'framework'], 'phpOMS\tests\Utils\StringCompareTest' => ['description' => 'String comparison / dictionary', 'type' => 'framework'], diff --git a/Helper/Php/createPhpFromJsonDb.php b/Helper/Php/createPhpFromJsonDb.php new file mode 100644 index 0000000..0d69ee6 --- /dev/null +++ b/Helper/Php/createPhpFromJsonDb.php @@ -0,0 +1,184 @@ + + */ +final class ItemMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + {$columns} + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = '{$table}'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = '{$primaryfield}'; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + ]; +} + +MAPPER; + +\file_put_contents($output . $name . 'Mapper.php', $mapper); + +//////////// Create model +$model = <<< MODEL + $this->id, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } +} + +MODEL; + +\file_put_contents($output . $name . '.php', $model); + +//////////// Create null model +$nullmodel = <<< NULLMODEL +id = $id; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } +} + +NULLMODEL; + +\file_put_contents($output . 'Null' . $name . '.php', $nullmodel); \ No newline at end of file diff --git a/Helper/Php/findMissingInvalidApiControllerTest.php b/Helper/Php/findMissingInvalidApiControllerTest.php new file mode 100644 index 0000000..c70de70 --- /dev/null +++ b/Helper/Php/findMissingInvalidApiControllerTest.php @@ -0,0 +1,160 @@ +header->account = 1; + \$this->module->{$name}(\$request, \$response); + self::assertEquals(RequestStatusCode::R_400, \$response->header->status); + } + + HEREDOC; + + return $invalid; +} + +foreach ($modules as $module) { + if ($module === '..' || $module === '.' + || !\is_dir(__DIR__ . '/../../../Modules/' . $module) + || !\is_dir(__DIR__ . '/../../../Modules/' . $module . '/Controller') + || !\is_file(__DIR__ . '/../../../Modules/' . $module . '/info.json') + || (!empty($allowed) && !\in_array($module, $allowed)) + ) { + continue; + } + + $controllers = \scandir(__DIR__ . '/../../../Modules/' . $module . '/Controller'); + + foreach ($controllers as $controller) { + if (\stripos($controller, 'Api') === false) { + continue; + } + + $content = \file_get_contents(__DIR__ . '/../../../Modules/' . $module . '/Controller/' . $controller); + + $matches = []; + \preg_match_all('/(public function )(.*?)(\()/', $content, $matches); + + $relevantFunction = []; + + foreach ($matches[2] as $match) { + $stripos = \stripos($content, 'public function ' . $match); + $stripos2 = \stripos($content, 'if (!empty($val = ', $stripos); + + if ($stripos2 === false) { + continue; + } + + if ($stripos2 - $stripos > 500) { + continue; + } + + $relevantFunction[] = $match; + } + + $tests1 = \is_dir(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller') ? \scandir(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller') : []; + if ($tests1 === false) { + $tests1 = []; + } + + $tests2 = \is_dir(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/Api') ? \scandir(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/Api') : []; + if ($tests2 === false) { + $tests2 = []; + } + + $testFilesContent = []; + + foreach ($tests1 as $file) { + if ($file === '..' || $file === '.' || !\is_file(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/' . $file)) { + continue; + } + + $testFilesContent[__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/' . $file] = \file_get_contents(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/' . $file); + } + + foreach ($tests2 as $file) { + if ($file === '..' || $file === '.' || !\is_file(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/Api/' . $file)) { + continue; + } + + $testFilesContent[__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/Api/' . $file] = \file_get_contents(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/Api/' . $file); + } + + $open = []; + + foreach ($testFilesContent as $path => $testFile) { + foreach ($relevantFunction as $function) { + $offset = 0; + $found = -1; + + if (!isset($open[$function])) { + $open[$function] = -1; + } + + while (($invalidPos = \stripos($testFile, '->' . $function . '(', $offset)) !== false) { + $offset = $invalidPos + 1; + $found = 0; + + $statusPos = \stripos($testFile, 'self::assertEquals(RequestStatusCode::'); + if ($statusPos !== false && $statusPos - $invalidPos < 250) { + $found = 1; + + $open[$function] = 1; + + break; + } + } + + if ($found === 0) { + echo $function . "\n"; + $newContent = \createFunction($function); + $newContent = \rtrim($testFile, " }\n") . "\n }\n" . $newContent . "}\n"; + \file_put_contents($path, $newContent); + $open[$function] = 1; + } + } + } + + if (\is_file(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/ApiControllerTest.php')) { + $testFile = \file_get_contents(__DIR__ . '/../../../Modules/' . $module . '/tests/Controller/ApiControllerTest.php'); + foreach ($open as $function => $value) { + if ($value === 1) { + continue; + } + + echo $function . "\n"; + $newContent = \createFunction($function); + $newContent = \rtrim($testFile, " }\n") . "\n }\n" . $newContent . "}\n"; + \file_put_contents($path, $newContent); + $open[$function] = 1; + } + } + } +} diff --git a/Helper/Php/findMissingNullModelTest.php b/Helper/Php/findMissingNullModelTest.php index 97ce664..831f8f8 100644 --- a/Helper/Php/findMissingNullModelTest.php +++ b/Helper/Php/findMissingNullModelTest.php @@ -29,7 +29,7 @@ foreach ($modules as $module) { foreach ($models as $model) { if ($model === '..' || $model === '.' - || \stripos($model, 'Null') !== 0 + || !\str_starts_with($model, 'Null') ) { continue; } @@ -80,7 +80,7 @@ foreach ($modules as $module) { . '{' . "\n" . ' /**' . "\n" . ' * @covers Modules\\' . $module . '\Models\Null' . $model . '' . "\n" - . ' * @group framework' . "\n" + . ' * @group module' . "\n" . ' */' . "\n" . ' public function testNull() : void' . "\n" . ' {' . "\n" @@ -89,12 +89,22 @@ foreach ($modules as $module) { . "\n" . ' /**' . "\n" . ' * @covers Modules\\' . $module . '\Models\Null' . $model . '' . "\n" - . ' * @group framework' . "\n" + . ' * @group module' . "\n" . ' */' . "\n" . ' public function testId() : void' . "\n" . ' {' . "\n" . ' $null = new Null' . $model . '(2);' . "\n" - . ' self::assertEquals(2, $null->getId());' . "\n" + . ' self::assertEquals(2, $null->id);' . "\n" + . ' }' . "\n" + . "\n" + . ' /**' . "\n" + . ' * @covers Modules\\' . $module . '\Models\Null' . $model . '' . "\n" + . ' * @group module' . "\n" + . ' */' . "\n" + . ' public function testJsonSerialize() : void' . "\n" + . ' {' . "\n" + . ' $null = new Null' . $model . '(2);' . "\n" + . ' self::assertEquals([\'id\' => 2], $null);' . "\n" . ' }' . "\n" . '}' . "\n"; diff --git a/Helper/Php/langUsageInspector.php b/Helper/Php/langUsageInspector.php index 5334556..956e216 100644 --- a/Helper/Php/langUsageInspector.php +++ b/Helper/Php/langUsageInspector.php @@ -16,22 +16,22 @@ declare(strict_types=1); function printUsage() : void { - echo 'Usage: -d -m + echo 'Usage: -m '; -'; - echo "\t" . '-d Destination/output directory.' . "\n"; - echo "\t" . '-m Module directory.' . "\n"; + echo "\t" . '-m Module name.' . "\n"; } -$destination = ($key = \array_search('-d', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" '); -$modulePath = ($key = \array_search('-m', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" '); +// $destination = ($key = \array_search('-d', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" '); +$moduleName = ($key = \array_search('-m', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" '); -if (!isset($destination) || !isset($modulePath)) { +if (!isset($moduleName)) { \printUsage(); return; } +$modulePath = __DIR__ . '/../../../Modules/' . $moduleName; + $sources = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($modulePath)); $tpls = []; $langs = []; @@ -69,7 +69,8 @@ foreach($langs as $lang => $data) { $fileContent = \file_get_contents($tpl); foreach ($data as $key => $word) { - if (\stripos($fileContent, '$this->getHtml(\'' . $key . '\')') !== false + if ((\stripos($fileContent, '$this->getHtml(\'' . $key . '\')') !== false + || \stripos($fileContent, '$this->getHtml(\'' . $key . '\', \'' . $moduleName . '\', \'Backend\')') !== false) && ($key = \array_search($key, $unusedLanguage)) !== false ) { unset($unusedLanguage[$key]); @@ -81,3 +82,32 @@ foreach($langs as $lang => $data) { echo 'Language files have different length: ' . ($unequalLength ? 'yes' : 'no') . "\n"; echo 'Unused language components: ' . "\n"; \var_dump($unusedLanguage); + +$sources = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($modulePath)); +$tpls = []; +$langs = []; + +foreach ($sources as $source) { + if ($source->isFile() + && (($temp = \strlen($source->getPathname()) - \strlen('lang.php')) >= 0 && \strpos($source->getPathname(), 'lang.php', $temp) !== false) + && \strlen(\explode('.', \basename($source->getPathname()))[0]) === 2 + ) { + $file = \file_get_contents($source->getPathname()); + $lines = \explode("\n", $file); + $exclude = []; + + foreach ($lines as $line) { + foreach ($unusedLanguage as $unused) { + if (\strpos($line, ' \'' . $unused . '\' ') !== false + && \stripos($unused, ':') === false + ) { + continue 2; + } + } + + $exclude[] = $line; + } + + \file_put_contents($source->getPathname(), \implode("\n", $exclude)); + } +} diff --git a/Helper/Scripts/inspectproject.sh b/Helper/Scripts/inspectproject.sh index a3022ec..8b261be 100644 --- a/Helper/Scripts/inspectproject.sh +++ b/Helper/Scripts/inspectproject.sh @@ -7,19 +7,19 @@ echo "#################################################" echo "# PHP strict" echo "#################################################" -grep -r -L "declare(strict_types=1);" --include=*.php --exclude-dir={*vendor*,*Files*,*privateSetup*,*demoSetup*,*LanguageDetection*,*Resources*,*node_modules*,*privateSetup*,*Build*} --exclude={*.tpl.php,*Hooks.php,*Routes.php,*SearchCommands.php} ${BPATH}/../../phpOMS ${BPATH}/../../Web ${BPATH}/../../Modules ${BPATH}/../../Model +grep -r -L "declare(strict_types=1);" --include=*.php --exclude-dir={*vendor*,*Files*,*privateSetup*,*demoSetup*,*LanguageDetection*,*Resources*,*node_modules*,*privateSetup*,*Build*} --exclude={*.tpl.php,*Hooks.php,*Routes.php,*SearchCommands.php} ${BPATH}/../../../phpOMS ${BPATH}/../../../Web ${BPATH}/../../../Modules ${BPATH}/../../../Model echo "#################################################" echo "# JS security inspection" echo "#################################################" -grep -rlni "onafterprint=\|onbeforeprint=\|onbeforeunload=\|onerror=\|onhaschange=\|onload=\|onmessage=\|onoffline=\|ononline=\|onpagehide=\|onpageshow=\|onpopstate=\|onredo=\|onresize=\|onstorage=\|onund=o\|onunload=\|onblur=\|onchage=\|oncontextmenu=\|onfocus=\|onformchange=\|onforminput=\|oninput=\|oninvalid=\|onreset=\|onselect=\|onsubmit=\|onkeydown=\|onkeypress=\|onkeyup=\|onclick=\|ondblclic=k\|ondrag=\|ondragend=\|ondragenter=\|ondragleave=\|ondragover=\|ondragstart=\|ondrop=\|onmousedown=\|onmousemove=\|onmouseout=\|onmouseover=\|onmouseup=\|onmousewheel=\|onscroll=\|onabor=t\|oncanplay=\|oncanplaythrough=\|ondurationchange=\|onemptied=\|onended=\|onerror=\|onloadeddata=\|onloadedmetadata=\|onloadstart=\|onpause=\|onplay=\|onplaying=\|onprogress=\|onratechange=\|onreadystatechange=\|onseeked=\|onseeking=\|onstalled=\|onsuspend=\|ontimeupdate=\|onvolumechange=" --include=*.js ${BPATH}/../../jsOMS ${BPATH}/../../Model ${BPATH}/../../Modules ${BPATH}/../../Web +grep -rlni "onafterprint=\|onbeforeprint=\|onbeforeunload=\|onerror=\|onhaschange=\|onload=\|onmessage=\|onoffline=\|ononline=\|onpagehide=\|onpageshow=\|onpopstate=\|onredo=\|onresize=\|onstorage=\|onund=o\|onunload=\|onblur=\|onchage=\|oncontextmenu=\|onfocus=\|onformchange=\|onforminput=\|oninput=\|oninvalid=\|onreset=\|onselect=\|onsubmit=\|onkeydown=\|onkeypress=\|onkeyup=\|onclick=\|ondblclic=k\|ondrag=\|ondragend=\|ondragenter=\|ondragleave=\|ondragover=\|ondragstart=\|ondrop=\|onmousedown=\|onmousemove=\|onmouseout=\|onmouseover=\|onmouseup=\|onmousewheel=\|onscroll=\|onabor=t\|oncanplay=\|oncanplaythrough=\|ondurationchange=\|onemptied=\|onended=\|onerror=\|onloadeddata=\|onloadedmetadata=\|onloadstart=\|onpause=\|onplay=\|onplaying=\|onprogress=\|onratechange=\|onreadystatechange=\|onseeked=\|onseeking=\|onstalled=\|onsuspend=\|ontimeupdate=\|onvolumechange=" --include=*.js ${BPATH}/../../../jsOMS ${BPATH}/../../../Model ${BPATH}/../../../Modules ${BPATH}/../../../Web echo "#################################################" echo "# PHPCS" echo "#################################################" -./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml" +./vendor/bin/phpcs -s --severity=1 ./ --standard="Build/Config/phpcs.xml" echo "#################################################" echo "# PHP static inspection" diff --git a/Helper/Scripts/serverInstall.sh b/Helper/Scripts/serverInstall.sh index 6dbe78d..32427f3 100644 --- a/Helper/Scripts/serverInstall.sh +++ b/Helper/Scripts/serverInstall.sh @@ -26,7 +26,7 @@ service fail2ban restart # SSH -# TODO: upload ssh key and disable password login if successful +# upload ssh key and disable password login if successful # https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-20-04 # copy the public key (e.g. *.pub to the file ~/.ssh/authorized_keys of the respective user) @@ -37,7 +37,7 @@ service fail2ban restart ## Web ############################################################### -apt-get install php8.1 php8.1-dev php8.1-cli php8.1-common php8.1-mysql php8.1-pgsql php8.1-xdebug php8.1-opcache php8.1-pdo php8.1-sqlite php8.1-mbstring php8.1-curl php8.1-imap php8.1-bcmath php8.1-zip php8.1-dom php8.1-xml php8.1-phar php8.1-gd php-pear apache2 libapache2-mpm-itk apache2-utils mariadb-server mariadb-client wkhtmltopdf tesseract-ocr poppler-utils +apt-get install php8.1 php8.1-dev php8.1-cli php8.1-common php8.1-mysql php8.1-pgsql php8.1-xdebug php8.1-opcache php8.1-pdo php8.1-sqlite php8.1-mbstring php8.1-curl php8.1-imap php8.1-bcmath php8.1-zip php8.1-dom php8.1-xml php8.1-phar php8.1-gd php-pear apache2 libapache2-mpm-itk apache2-utils mariadb-server mariadb-client wkhtmltopdf tesseract-ocr poppler-utils imagemagick pecl install pcov #echo "extension=pcov.so" > /etc/php/cli/conf.d/20-xdebug.ini @@ -67,14 +67,24 @@ mysql -u root -p CREATE USER 'jingga'@'%' IDENTIFIED BY 'dYg8#@wLiWJ3vE'; CREATE USER 'demo'@'%' IDENTIFIED BY 'orange'; CREATE USER 'test'@'%' IDENTIFIED BY 'orange'; +CREATE USER 'build'@'%' IDENTIFIED BY 'orange'; -CREATE DATABASE jingga COMMENT 'Main application database'; -CREATE DATABASE demo COMMENT 'Demo application database'; -CREATE DATABASE omt COMMENT 'Tests'; +# website +CREATE DATABASE jingga'; + +# demo +CREATE DATABASE omd'; + +# test +CREATE DATABASE omt'; + +# build +CREATE DATABASE omb'; GRANT ALL PRIVILEGES ON jingga.* TO 'jingga'@'%'; -GRANT ALL PRIVILEGES ON demo.* TO 'demo'@'%'; +GRANT ALL PRIVILEGES ON omd.* TO 'demo'@'%'; GRANT ALL PRIVILEGES ON omt.* TO 'test'@'%'; +GRANT ALL PRIVILEGES ON omb.* TO 'build'@'%'; FLUSH PRIVILEGES; diff --git a/Helper/Scripts/sitespeedAuth.js b/Helper/Scripts/sitespeedAuth.js index 018e01a..5c03a70 100644 --- a/Helper/Scripts/sitespeedAuth.js +++ b/Helper/Scripts/sitespeedAuth.js @@ -1,11 +1,12 @@ +// sitespeed.io /var/www/html/Karaka/Build/Helper/Scripts/sitespeedDemoUrls.txt -n 1 -b chrome --preScript /var/www/html/Karaka/Build/Helper/Scripts/sitespeedAuth.js --outputFolder /var/www/html/sitespeed module.exports = async function(context, commands) { - await commands.navigate('https://jingga.app'); + await commands.navigate('http://192.168.178.38/en/backend'); - await commands.addText.byId('admin', 'iName'); - await commands.addText.byId('orange', 'iPassword'); + // await commands.addText.byId('admin', 'iName'); + // await commands.addText.byId('orange', 'iPassword'); await commands.click.byIdAndWait('iLoginButton'); - return commands.wait.byId('u-box', 3000); -}; \ No newline at end of file + return commands.wait.byId('u-box', 1000); +}; diff --git a/Helper/Scripts/sitespeedDemoUrls.txt b/Helper/Scripts/sitespeedDemoUrls.txt new file mode 100644 index 0000000..2f3cbce --- /dev/null +++ b/Helper/Scripts/sitespeedDemoUrls.txt @@ -0,0 +1,163 @@ +http://192.168.178.38/en/backend +http://192.168.178.38/en/help/general +http://192.168.178.38/en/help/module/list +http://192.168.178.38/en/help/developer +http://192.168.178.38/en/help/developer +http://192.168.178.38/en/admin/group/list +http://192.168.178.38/en/admin/group/settings?id=1#c-tab-1 +http://192.168.178.38/en/admin/account/list +http://192.168.178.38/en/admin/account/settings?id=1#c-tab-1 +http://192.168.178.38/en/admin/module/list +http://192.168.178.38/en/admin/module/info?id=Admin +http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-1 +http://192.168.178.38/en/admin/module/navigation/list?id=Admin +http://192.168.178.38/en/admin/module/route/list?id=Admin +http://192.168.178.38/en/admin/module/hook/list?id=Admin +http://192.168.178.38/en/admin/module/log?id=Admin +http://192.168.178.38/en/admin/exchange/log/list +http://192.168.178.38/en/admin/exchange/import/list +http://192.168.178.38/en/admin/exchange/export/list +http://192.168.178.38/en/admin/monitoring/general +http://192.168.178.38/en/admin/monitoring/log/list +http://192.168.178.38/en/admin/monitoring/stats +http://192.168.178.38/en/admin/audit/list +http://192.168.178.38/en/admin/audit/view?id=1 +http://192.168.178.38/en/organization/organigram +http://192.168.178.38/en/organization/unit/list +http://192.168.178.38/en/organization/unit/view?id=1 +http://192.168.178.38/en/organization/department/list +http://192.168.178.38/en/organization/department/view?id=1 +http://192.168.178.38/en/organization/position/list +http://192.168.178.38/en/organization/position/view?id=1 +http://192.168.178.38/en/messages/dashboard +http://192.168.178.38/en/messages/template/list +http://192.168.178.38/en/messages/template/view?id=1 +http://192.168.178.38/en/calendar/dashboard +http://192.168.178.38/en/profile/list +http://192.168.178.38/en/profile/view?id=2 +http://192.168.178.38/en/media/list +http://192.168.178.38/en/media/upload +http://192.168.178.38/en/media/file/create +http://192.168.178.38/en/media/collection/create +http://192.168.178.38/en/news/dashboard +http://192.168.178.38/en/news/article?id=1 +http://192.168.178.38/en/news/archive +http://192.168.178.38/en/news/create +http://192.168.178.38/en/news/draft/list +http://192.168.178.38/en/news/analysis +http://192.168.178.38/en/editor/list +http://192.168.178.38/en/editor/view?id=1 +http://192.168.178.38/en/orw/resource/list +http://192.168.178.38/en/kanban/dashboard +http://192.168.178.38/en/kanban/board?id=1 +http://192.168.178.38/en/kanban/card?id=1 +http://192.168.178.38/en/contract/list +http://192.168.178.38/en/contract/type/list +http://192.168.178.38/en/survey/list +http://192.168.178.38/en/wiki/dashboard +http://192.168.178.38/en/wiki/doc/view?id=1 +http://192.168.178.38/en/wiki/category/list +http://192.168.178.38/en/wiki/list +http://192.168.178.38/en/qa/dashboard +http://192.168.178.38/en/qa/question?id=1 +http://192.168.178.38/en/helper/list +http://192.168.178.38/en/helper/report/view?id=1 +http://192.168.178.38/en/helper/report/create +http://192.168.178.38/en/helper/template/create +http://192.168.178.38/en/checklist/list +http://192.168.178.38/en/dbeditor/list +http://192.168.178.38/en/dbeditor/editor +http://192.168.178.38/en/tag/list +http://192.168.178.38/en/tag/view?id=1 +http://192.168.178.38/en/workflow/instance/list +http://192.168.178.38/en/workflow/template/list +http://192.168.178.38/en/workflow/template/view?id=1 +http://192.168.178.38/en/private/timerecording/dashboard +http://192.168.178.38/en/private/support/dashboard +http://192.168.178.38/en/private/purchase/recognition/dashboard +http://192.168.178.38/en/private/purchase/bill?id=1 +http://192.168.178.38/en/private/investment/list +http://192.168.178.38/en/finance/investment/view?id=1 +http://192.168.178.38/en/businessexpenses/expense/list +http://192.168.178.38/en/businessexpenses/expense?id=1 +http://192.168.178.38/en/cms/application/list +http://192.168.178.38/en/cms/application/page/list?app=2 +http://192.168.178.38/en/cms/application/post/list?app=2 +http://192.168.178.38/en/cms/application/permission?app=2 +http://192.168.178.38/en/cms/application/setting?app=2 +http://192.168.178.38/en/cms/application/files?app=2 +http://192.168.178.38/en/cms/application/theme?app=2 +http://192.168.178.38/en/item/attribute/type/list +http://192.168.178.38/en/item/attribute/type?id=1 +http://192.168.178.38/en/item/list +http://192.168.178.38/en/item/view?id=3 +http://192.168.178.38/en/sales/client/list +http://192.168.178.38/en/sales/client/view?id=1 +http://192.168.178.38/en/sales/client/attribute/type/list +http://192.168.178.38/en/sales/client/attribute/type?id=1 +http://192.168.178.38/en/sales/item/list +http://192.168.178.38/en/sales/bill/list +http://192.168.178.38/en/sales/bill?id=1 +http://192.168.178.38/en/sales/analysis +http://192.168.178.38/en/sales/analysis/item +http://192.168.178.38/en/sales/analysis/client +http://192.168.178.38/en/sales/analysis/bill +http://192.168.178.38/en/sales/analysis/region +http://192.168.178.38/en/sales/analysis/rep +http://192.168.178.38/en/purchase/supplier/list +http://192.168.178.38/en/purchase/supplier/view?id=1 +http://192.168.178.38/en/purchase/supplier/attribute/type/list +http://192.168.178.38/en/purchase/supplier/attribute/type?id=1 +http://192.168.178.38/en/purchase/item/list +http://192.168.178.38/en/purchase/bill/list +http://192.168.178.38/en/purchase/order/suggestion +http://192.168.178.38/en/purchase/analysis +http://192.168.178.38/en/warehouse/stock/list +http://192.168.178.38/en/warehouse/stock?id=1 +http://192.168.178.38/en/warehouse/labeling/item/list +http://192.168.178.38/en/warehouse/labeling/item?id=3 +http://192.168.178.38/en/warehouse/stocktaking/list +http://192.168.178.38/en/warehouse/bill/list +http://192.168.178.38/en/warehouse/bill/list +http://192.168.178.38/en/accounting/entries/dashboard +http://192.168.178.38/enaccounting/asset/list +http://192.168.178.38/en/accounting/costcenter/list +http://192.168.178.38/en/accounting/costobject/list +http://192.168.178.38/en/accounting/coa/list +http://192.168.178.38/en/admin/group/settings?id=1#c-tab-1 +http://192.168.178.38/en/accounting/stack/list +http://192.168.178.38/en/finance/investment/list +http://192.168.178.38/en/finance/investment/view?id=1 +http://192.168.178.38/en/finance/loan/list +http://192.168.178.38/en/marketing/promotion/list +http://192.168.178.38/en/marketing/event/list +http://192.168.178.38/en/humanresource/staff/list +http://192.168.178.38/en/humanresource/department/list +http://192.168.178.38/en/humanresource/position/list +http://192.168.178.38/en/humanresource/position/list +http://192.168.178.38/en/humanresource/timerecording/dashboard +http://192.168.178.38/en/production/list +http://192.168.178.38/en/production/item/list +http://192.168.178.38/en/support/list +http://192.168.178.38/en/support/settings/dashboard +http://192.168.178.38/en/support/analysis/dashboard +http://192.168.178.38/en/fleet/vehicle/list +http://192.168.178.38/en/fleet/vehicle/view?id=1 +http://192.168.178.38/en/fleet/driver/list +http://192.168.178.38/en/fleet/driver/view?id=1 +http://192.168.178.38/en/fleet/inspection/list +http://192.168.178.38/en/fleet/vehicle/attribute/type/list +http://192.168.178.38/en/fleet/vehicle/attribute/type?id=1 +http://192.168.178.38/en/fleet/driver/attribute/type/list +http://192.168.178.38/en/fleet/vehicle/attribute/type?id=1 +http://192.168.178.38/en/equipment/list +http://192.168.178.38/en/equipment/equipment/view?id=1 +http://192.168.178.38/en/equipment/inspection/list +http://192.168.178.38/en/equipment/attribute/type/list +http://192.168.178.38/en/fleet/equipment/attribute/type?id=1 +http://192.168.178.38/en/controlling/budget/dashboard +http://192.168.178.38/en/controlling/pl/dashboard +http://192.168.178.38/en/controlling/balance/dashboard +http://192.168.178.38/en/legal/privacy +http://192.168.178.38/en/legal/terms +http://192.168.178.38/en/legal/imprint \ No newline at end of file diff --git a/Helper/Scripts/sitespeedOnlineUrls.txt b/Helper/Scripts/sitespeedOnlineUrls.txt new file mode 100644 index 0000000..cb9d194 --- /dev/null +++ b/Helper/Scripts/sitespeedOnlineUrls.txt @@ -0,0 +1,7 @@ +https://jingga.app +https://jingga.app/en/solutions +https://jingga.app/en/services +https://jingga.app/en/shop +https://jingga.app/en/shop/item?number=200000 +https://jingga.app/en/terms +https://jingga.app/info?page=setup/install \ No newline at end of file diff --git a/Helper/Scripts/sitespeedUrls.txt b/Helper/Scripts/sitespeedUrls.txt deleted file mode 100644 index 5f8159a..0000000 --- a/Helper/Scripts/sitespeedUrls.txt +++ /dev/null @@ -1,37 +0,0 @@ -https://jingga.app -https://jingga.app/help/general -https://jingga.app/help/module/list -https://jingga.app/help/developer -https://jingga.app/admin/settings/general -https://jingga.app/admin/group/list -https://jingga.app/admin/group/settings?id=1 -https://jingga.app/admin/account/list -https://jingga.app/admin/account/settings?id=1 -https://jingga.app/admin/module/list -https://jingga.app/admin/admin/module/settings?id=Profile -https://jingga.app/admin/job/list -https://jingga.app/admin/monitoring/general -https://jingga.app/admin/monitoring/log/list -https://jingga.app/admin/monitoring/security/dashboard -https://jingga.app/admin/exchange/dashboard -https://jingga.app/admin/exchange/import/list -https://jingga.app/admin/exchange/export/list -https://jingga.app/admin/audit/list -https://jingga.app/organization/organigram -https://jingga.app/organization/unit/list -https://jingga.app/organization/unit/profile?id=1 -https://jingga.app/organization/department/list -https://jingga.app/organization/department/profile?id=1 -https://jingga.app/organization/position/list -https://jingga.app/organization/position/profile?id=1 -https://jingga.app/profile/list -https://jingga.app/profile/single?id=1 -https://jingga.app/media/list -https://jingga.app/news/dashboard -https://jingga.app/news/article?id=1 -https://jingga.app/task/dashboard -https://jingga.app/task/single?id=1 -https://jingga.app/kanban/dashboard -https://jingga.app/kanban/board?id=1 -https://jingga.app/editor/list -https://jingga.app/editor/single?id=1 \ No newline at end of file diff --git a/Js/createImages.js b/Js/createImages.js index 4f0404d..bf7ee07 100755 --- a/Js/createImages.js +++ b/Js/createImages.js @@ -47,12 +47,12 @@ const src = [ __dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-list.png' ], [ - 'http://192.168.178.38/en/backend/help/module/single?id=Admin', + 'http://192.168.178.38/en/backend/help/module/view?id=Admin', '//*[@id="content"]', __dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-readme.png' ], [ - 'http://192.168.178.38/en/backend/help/module/single?id=Admin&page=Dev%2Fstructure', + 'http://192.168.178.38/en/backend/help/module/view?id=Admin&page=Dev%2Fstructure', '//*[@id="content"]', __dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-structure.png' ], diff --git a/LICENSE.txt b/LICENSE.txt index 18d430e..4ba0161 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -27,7 +27,7 @@ Version 2.0 Subject to the terms and conditions of this License, each Contributor grants to You after purchase a perpetual, worldwide, non-exclusive, irrevocable copyright license to prepare Derivative Works of, publicly display, publicly perform the Work and such Derivative Works in Source or Object form. You are not allowed to sublicense, reproduce, or distribute the Work and such Derivative Works in Source or Object form. -3. Redistribution. +3. Redistribution You may not reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form.