Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
cf28400
update issue #34. Added delete source option in settings. Fixed bugs.
oyeaussie Feb 2, 2025
66afd43
update #34, update version is the last runner.
oyeaussie Feb 2, 2025
9254a2d
update #34, Added email report method.
oyeaussie Feb 2, 2025
1905414
fix issue #574
oyeaussie Feb 2, 2025
1bd364f
Fix issue #585
oyeaussie Feb 2, 2025
e12b62c
fix issue #586
oyeaussie Feb 2, 2025
1f13420
cleanup #332
oyeaussie Feb 2, 2025
3e1241f
update #352 - add errors to view gitignore.
oyeaussie Feb 2, 2025
8e02fa6
update #34
oyeaussie Feb 2, 2025
69094d0
cleanup #332
oyeaussie Feb 2, 2025
16e50a4
update issue #34
oyeaussie Feb 2, 2025
7c58ed7
Update issue #588
oyeaussie Feb 3, 2025
5b71642
Update issue #589
oyeaussie Feb 4, 2025
9ea2cc8
update issue #583
oyeaussie Feb 4, 2025
edd28b0
update issue #590
oyeaussie Feb 5, 2025
eba4460
Fix issue #591
oyeaussie Feb 5, 2025
74d347c
update issue #588
oyeaussie Feb 5, 2025
746feb7
update #34
oyeaussie Feb 5, 2025
4efc662
fix issue #592
oyeaussie Feb 5, 2025
0d9a0bb
Update issue #592
oyeaussie Feb 5, 2025
c44bee0
update issue #583
oyeaussie Feb 5, 2025
0ef46a6
update issue #593
oyeaussie Feb 5, 2025
bd713c0
update issue #590
oyeaussie Feb 5, 2025
14f3e67
fix issue #594
oyeaussie Feb 5, 2025
121d712
update issue #34
oyeaussie Feb 5, 2025
2903b5f
update #34 Fix bug with sync overriding the current version with upda…
oyeaussie Feb 6, 2025
d301d8e
fix issue #595
oyeaussie Feb 6, 2025
ffbf6db
update issue #583
oyeaussie Feb 6, 2025
531f98f
Initial commit #596
oyeaussie Feb 6, 2025
84c13ae
update issue #596
oyeaussie Feb 6, 2025
1e8abbd
update issue #596. Fix sequence of composer package issue in queue. A…
oyeaussie Feb 6, 2025
68e5209
update #34 cleanup and minor bug fixes.
oyeaussie Feb 6, 2025
b832ca3
Fix issue #598. Call BazProgress.switchProgressBarColor(el, color); t…
oyeaussie Feb 7, 2025
934d8e3
update issue #34, minor cosmetic bug fixes with queue.
oyeaussie Feb 7, 2025
ec4b448
update #34 add queue info
oyeaussie Feb 7, 2025
cbd6db0
update issue #34. Add queue info and progress information to logs.
oyeaussie Feb 7, 2025
f7a450a
update #34. Added apptypes to installation. Fixed bugs.
oyeaussie Feb 8, 2025
abea273
fix issue #597
oyeaussie Feb 9, 2025
ef5f41d
fix issue #600
oyeaussie Feb 9, 2025
67b81af
Issue #599. Initial commit and fix bugs.
oyeaussie Feb 9, 2025
1268bfd
update #34. Adding menu installer for components.
oyeaussie Feb 9, 2025
b7ffa87
fix minor bugs #599
oyeaussie Feb 9, 2025
891bca0
update issue #34. fix menu installer.
oyeaussie Feb 9, 2025
7364be1
update issue #600. Fix boolean normalization of data.
oyeaussie Feb 9, 2025
de855f4
Update issue #34, installer fix destination directory for different m…
oyeaussie Feb 10, 2025
5b425a6
fix issue #601
oyeaussie Feb 10, 2025
c5bc03f
Issue #602 Added ButtonGroup and moved dropdown from DropdownSplitBut…
oyeaussie Feb 10, 2025
dd8def3
issuet #602 - fix minor bugs.
oyeaussie Feb 10, 2025
25b7878
issue #602 - cleanup
oyeaussie Feb 10, 2025
bf840b6
issue #602 - add ApplicationButton
oyeaussie Feb 10, 2025
80090df
Update issue #602 fix minor bugs with outline style
oyeaussie Feb 11, 2025
48f55c8
update issue #602 fix minor bug with data value
oyeaussie Feb 11, 2025
abed5dd
fix issue #603
oyeaussie Feb 11, 2025
87a9c62
update #34. Added option buttons to disable backup. fixed some minor …
oyeaussie Feb 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions apps/Core/Components/Apps/AppsComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppsComponent extends BaseComponent
*/
public function viewAction()
{
$typesArr = $this->apps->types->types;
$typesArr = $this->apps->types->getInstalledAppTypes();

$this->view->types = $typesArr;

Expand Down Expand Up @@ -189,7 +189,7 @@ public function viewAction()
}

//Views
$viewsArr = $this->modules->views->getViewsForAppType($app['app_type']);
$viewsArr = $this->modules->views->getViewsForAppType($app['app_type'], false);
if (count($viewsArr) === 1) {
array_push($mandatoryViews, $this->helper->first($viewsArr)['name']);

Expand Down Expand Up @@ -259,6 +259,8 @@ public function viewAction()
return;
}
$this->view->acceptableUsernames = $this->apps->getAcceptableUsernamesForAppId();

$this->view->dashboards = $this->basepackages->dashboards->init()->getDashboardsByAppType($app['app_type']);
} else {
$this->view->app = null;
$domains = $this->domains->domains;
Expand Down Expand Up @@ -286,9 +288,10 @@ public function viewAction()
$this->view->publicStorages = $publicStorages;

$this->view->privateStorages = $privateStorages;

$this->view->dashboards = [];
}

$this->view->dashboards = $this->basepackages->dashboards->init()->dashboards;
$this->view->roles = $this->basepackages->roles->init()->roles;
$this->view->pick('apps/view');

Expand Down Expand Up @@ -343,7 +346,7 @@ public function addAction()
{
$this->requestIsPost();

$viewsArr = $this->modules->views->getViewsForAppType($this->postData()['app_type']);
$viewsArr = $this->modules->views->getViewsForAppType($this->postData()['app_type'], false);

if (count($viewsArr) === 0) {
$this->addResponse('No Views Available for app type ' . $this->postData()['app_type'] . ' cannot proceed!', 1);
Expand Down Expand Up @@ -378,7 +381,7 @@ public function updateAction()
$this->apps->packagesData->responseCode
);

$this->addToNotification('update', 'Updated app ' . $this->postData()['name'], null, $this->apps->packagesData->last);
$this->addToNotification('update', 'Updated app', null, $this->apps->packagesData->last ?? []);
}

/**
Expand Down Expand Up @@ -517,7 +520,7 @@ public function getViewsForAppTypeAction()
{
$this->requestIsPost();

$viewsArr = $this->modules->views->getViewsForAppType($this->postData()['app_type']);
$viewsArr = $this->modules->views->getViewsForAppType($this->postData()['app_type'], false);

if ($viewsArr && count($viewsArr) > 0) {
$views = [];
Expand Down
6 changes: 1 addition & 5 deletions apps/Core/Components/Auth/AuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ public function sendTwoFaEmailAction()
{
$this->requestIsPost();

try {
$this->access->auth->twoFa->sendTwoFaEmail($this->postData());
} catch (\Exception $e) {
var_dump($e);die();
}
$this->access->auth->twoFa->sendTwoFaEmail($this->postData());

$this->addResponse(
$this->access->auth->twoFa->packagesData->responseMessage,
Expand Down
51 changes: 39 additions & 12 deletions apps/Core/Components/Dashboards/DashboardsComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ public function viewAction()
$dashboardId = $this->getData()['id'];

$dashboard = $this->basepackages->dashboards->getDashboardById($dashboardId, true, false);
$dashboard['is_app_default'] = false;

if (isset($this->app['settings']['defaultDashboard'])) {
if ($this->app['settings']['defaultDashboard'] == $dashboard['id']) {
$dashboard['is_app_default'] = true;
$dashboard['app_default'] = true;
}

$this->view->isAppDefault = true;
}

if (isset($dashboard['shared']) && is_string($dashboard['shared'])) {
Expand All @@ -66,19 +63,31 @@ public function viewAction()
$dashboard['shared'] = [];
}

//Default
if ($dashboard['user_default']) {
if (is_string($dashboard['user_default'])) {
$dashboard['user_default'] = $this->helper->decode($dashboard['user_default'], true);
}

if (in_array($this->access->auth->account()['id'], $dashboard['user_default'])) {
$dashboard['user_default'] = true;
}
}

$this->view->dashboard = $dashboard;
}

$this->view->pick('dashboards/dashboards/dashboard');

return;
} else {
} else {//List of all dashboards
$dashboardId = 0;

if (isset($this->app['settings']['defaultDashboard'])) {
$dashboardId = $this->app['settings']['defaultDashboard'];
}

$dashboards = $this->basepackages->dashboards->dashboards;
$dashboards = msort($dashboards, 'is_default');
$dashboards = $this->basepackages->dashboards->getDashboardsByAppType($this->app['app_type']);

if ($this->access->auth->account()) {
foreach ($dashboards as $dashboardKey => &$dashboard) {
Expand Down Expand Up @@ -110,18 +119,23 @@ public function viewAction()
}

//Default
if ($dashboard['is_default'] && !$isShared) {
$dashboardId = $dashboard['id'];
if ($dashboard['user_default']) {
if (is_string($dashboard['user_default'])) {
$dashboard['user_default'] = $this->helper->decode($dashboard['user_default'], true);
}

$dashboard['name'] = $dashboard['name'] . ' (User Default)';
if (in_array($this->access->auth->account()['id'], $dashboard['user_default'])) {
$dashboard['name'] = $dashboard['name'] . ' (User Default)';
$dashboardId = $dashboard['id'];
}
}
}
}

$this->view->dashboard = $this->basepackages->dashboards->getDashboardById($dashboardId, true, false);

$this->view->dashboards = $dashboards;

$this->view->dashboard = $this->basepackages->dashboards->getDashboardById($dashboardId, true, false);

$this->view->widgetsTree = $this->basepackages->widgets->getWidgetsTree();
}
}
Expand Down Expand Up @@ -222,6 +236,19 @@ public function getDashboardWidgetsAction()
);
}

public function getDashboardsByAppTypeAction()
{
$this->requestIsPost();

$this->basepackages->dashboards->getDashboardsByAppType($this->postData()['app_type']);

$this->addResponse(
$this->basepackages->dashboards->packagesData->responseMessage,
$this->basepackages->dashboards->packagesData->responseCode,
$this->basepackages->dashboards->packagesData->responseData
);
}

public function searchAccountAction()
{
$this->requestIsPost();
Expand Down
11 changes: 7 additions & 4 deletions apps/Core/Components/Devtools/Modules/ModulesComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public function viewAction()
$modulesArr = $this->processModulesArr(msort($this->modules->{$modulesType}->{$modulesType}, 'name'));
${$modulesType . 'CategoryArr'} = $modulesArr['categoryArr'];
}

if ($modulesArr['modules'] && count($modulesArr['modules']) > 0) {
$modules[$modulesType]['value'] = ucfirst($modulesType);
$modules[$modulesType]['childs'] = $modulesArr['modules'];
Expand Down Expand Up @@ -193,7 +192,7 @@ public function viewAction()
$module['module_details']['category'] === 'providers')
) {
if ($module['module_details']['category'] === 'basepackagesApis') {
$moduleLocation = 'system/Base/Installer/Packages/Setup/Register/Modules/Packages/Basepackages/ApiClientServices/Apis/';
$moduleLocation = 'system/Base/Installer/Packages/Setup/Register/Modules/Packages/Basepackages/Api/Apis/';
} else if (str_starts_with($module['module_details']['category'], 'basepackages')) {
$moduleLocation = 'system/Base/Installer/Packages/Setup/Register/Modules/Packages/Basepackages/';
} else if ($module['module_details']['category'] === 'providers') {
Expand Down Expand Up @@ -236,8 +235,12 @@ public function viewAction()

$routePath = implode('/', $pathArr) . '/Install/';
} else if ($module['module_details']['module_type'] === 'views') {
if (isset($module['module_details']['base_view_module_id']) && $module['module_details']['base_view_module_id'] != 0) {
$baseView = $this->modules->views->getViewById($module['module_details']['base_view_module_id']);
if ($module['module_details']['is_subview'] == true) {
if ($module['module_details']['base_view_module_id'] != 0) {
$baseView = $this->modules->views->getViewById($module['module_details']['base_view_module_id']);
} else {
$baseView['name'] = 'Default';
}

$pathArr = preg_split('/(?=[A-Z])/', ucfirst($module['module_details']['name']), -1, PREG_SPLIT_NO_EMPTY);

Expand Down
30 changes: 20 additions & 10 deletions apps/Core/Components/Devtools/Test/TestComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,40 @@

class TestComponent extends BaseComponent
{
protected $sourceDir = 'system/Base/Providers/BasepackagesServiceProvider/Packages/Geo/Data/';

/**
* @acl(name=view)
*/
public function viewAction()
{
// var_dump($this->opCache->setCache('guru', ['guru'=>123], 'guru'));
// var_dump($this->opCache->getCache('guru', 'guru'));
// var_dump($this->opCache->removeCache());
// $install = new \Apps\Fintech\Components\Dashboards\Install\Install;

// $install->init()->install();
// $adminComponents = $this->basepackages->utils->scanDir('apps/Core/Components/', true);

// $dicData = new DevtoolsDicExtractData;
// foreach ($adminComponents['files'] as $adminComponentKey => $adminComponent) {
// if (strpos($adminComponent, 'component.json')) {
// try {
// $jsonFile =
// $this->helper->decode(
// $this->localContent->read($adminComponent),
// true
// );
// } catch (\throwable $e) {
// throw new \Exception($e->getMessage() . '. Problem reading component.json at location ' . $adminComponent);
// }

// $dicData->processDicData();
// if ($jsonFile['menu'] && $jsonFile['menu'] !== 'false') {
// $this->basepackages->menus->addMenu($jsonFile);
// }
// }
// }
}

/**
* @api_acl(name=view)
*/
public function apiViewAction()
{
// usleep(50000);
// sleep(10);
// var_dump($_SESSION);
$this->addResponse('Test', 0, ['connection' => $this->connection->getId(), 'session' => $this->session->getId()]);
}

Expand Down
1 change: 0 additions & 1 deletion apps/Core/Components/Home/HomeComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Apps\Core\Components\Home;

use Phalcon\Helper\Arr;
use System\Base\BaseComponent;

class HomeComponent extends BaseComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ function ($dataArr) {
protected function replaceColumns($dataArr)
{
foreach ($dataArr as $dataKey => &$data) {
if (isset($data['in_use']) && $data['in_use'] == '0') {
$data['in_use'] = '<span class="badge badge-secondary text-uppercase">No</span>';
} else if (isset($data['in_use']) && $data['in_use'] == '1') {
if (isset($data['in_use']) && $data['in_use'] == '1') {
$data['in_use'] = '<span class="badge badge-success text-uppercase">Yes</span>';
} else {
$data['in_use'] = '<span class="badge badge-secondary text-uppercase">No</span>';
}

$data['category'] = ucfirst($data['category']);
Expand Down
42 changes: 42 additions & 0 deletions apps/Core/Components/System/Menus/Install/component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"route" : "system/menus",
"name" : "Menus",
"description" : "Manage menus via this component",
"module_type" : "components",
"app_type" : "core",
"category" : "admin",
"version" : "0.0.0",
"repo" : "https://.../",
"class" : "Apps\\Core\\Components\\System\\Menus\\MenusComponent",
"dependencies" : {
"core" : {
"name" : "Core",
"version" : "0.0.0",
"repo" : "https://.../"
},
"components" : [],
"packages" : [],
"middlewares" : [],
"views" : [],
"external" : []
},
"menu" : {
"seq" : 7,
"system" : {
"icon" : "cogs",
"title" : "system",
"childs" : {
"menus" : {
"title" : "menus",
"icon" : "bars",
"link" : "system/menus"
}
}
}
},
"settings" : {
"mandatory" : {
"core" : true
}
}
}
Loading