Skip to content

Commit

Permalink
Merge pull request #929 from exodus4d/develop
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
exodus4d authored Apr 6, 2020
2 parents f443e80 + 560bb23 commit 62dc991
Show file tree
Hide file tree
Showing 738 changed files with 26,715 additions and 38,622 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Temporary Items
# project files
# ========================
.idea
.sass-cache
.usage
*.gz
composer-dev.lock
Expand Down
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"latedef": false,

// Enforce line length to 100 characters
"maxlen": 200,
"maxlen": 220,

// Require capitalized names for constructor functions.
"newcap": true,
Expand Down
99 changes: 50 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# ![Pathfinder logo](favicon/favicon-32x32.png "Logo") *PATHFINDER*
Mapping tool for [*EVE ONLINE*](https://www.eveonline.com)
#### Mapping tool for [*EVE ONLINE*](https://www.eveonline.com)

- Project URL [https://www.pathfinder-w.space](https://www.pathfinder-w.space)
- Official forum post [https://forums.eveonline.com](https://forums.eveonline.com/default.aspx?g=posts&m=6021776#post6021776)
- Screenshots [imgur.com](http://imgur.com/a/k2aVa)
- Videos [youtube.com](https://www.youtube.com/channel/UC7HU7XEoMbqRwqxDTbMjSPg)
- Licence [MIT](http://opensource.org/licenses/MIT)

#### Development
- Test server
- URL: http://www.dev.pathfinder-w.space
- Test server: [https://www.dev.pathfinder-w.space](https://www.dev.pathfinder-w.space)
- Running current `develop` branch
- _SISI_ _ESI_ (make sure to use your test-server client)
- Available for public testing (e.g. new feature,.. )
- Available for public testing (e.g. new feature, )
- Database will be cleared from time to time
- Installation guide:
- [wiki](https://github.com/exodus4d/pathfinder/wiki)
Expand All @@ -27,52 +25,55 @@ Issues should be reported in the [Issue](https://github.com/exodus4d/pathfinder/
***

### Project structure
<pre>
─╮
├─ app/ [0755] → PHP root
│ ├─ Controller/ → controller classes for app/ajax endpoints (see routes.ini)
│ ├─ Cron/ → controller classes cronjob endpoints (see cron.ini)
│ ├─ Data/ → classes for data handling
│ ├─ Db/ → classes for DB handling
│ ├─ Exception/ → custom exceptions
│ ├─ Lib/ → libs
│ ├─ Model/ → ORM
│ ├─ config.ini → config - F3 core config: <a href="//fatfreeframework.com/3.7/quick-reference#SystemVariables" title="Fat-Free Framework - SystemVariables">SystemVariables</a>
│ ├─ cron.ini → config - cronjobs
│ ├─ environment.ini → config - system environment
│ ├─ pathfinder.ini → config - pathfinder
│ ├─ plugin.ini → config - custom plugins
│ ├─ requirements.ini → config - system requirements
│ └─ routes.ini → config - routes
├─ export/ [0755] → static data
│ ├─ csv/ → *.csv used by /setup page
│ └─ sql/ → DB dump for import (eve_universe.sql.zip)
├─ favicon/ [0755] → favicons
├─ history/ [0777] → log files (map history logs) [optional]
├─ js/ [0755] → JS source files (not used for production)
│ ├─ app/ → "PATHFINDER" core files
│ ├─ lib/ → 3rd party libs
│ └─ app.js → require.js config
├─ logs/ [0777] → log files
│ └─ …
├─ public/ [0755] → static resources
│ ├─ css/ → CSS dist/build folder (minified)
│ ├─ fonts/ → icon-/fonts
│ ├─ img/ → images
│ ├─ js/ → JS dist/build folder and source maps (minified, uglified)
│ └─ templates/ → templates
├─ sass/ → SCSS sources (not used for production)
├─ tmp/ [0777] → cache folder (PHP templates)
│ └─ cache/ [0777] → cache folder (PHP cache)
├─ .htaccess [0755] → reroute/caching rules ("Apache" only!)
└─ index.php [0755]

```
|-- [0755] app/ --> backend [*.php]
|-- app/ --> "Fat Free Framework" extensions
|-- lib/ --> "Fat Free Framework"
|-- main/ --> "PATHFINDER" root
|-- config.ini --> config "f3" framework
|-- cron.ini --> config - cronjobs
|-- environment.ini --> config - system environment
|-- pathfinder.ini --> config - pathfinder
|-- requirements.ini --> config - system requirements
|-- routes.ini --> config - routes
|-- [0755] export/ --> static data
|-- csv/ --> *.csv used by /setup page
|-- sql/ --> DB dump for import (eve_universe.sql.zip)
|-- [0755] favicon/ --> Favicons
|-- [0777] history/ --> log files (map history logs) [optional]
|-- [0755] js/ --> JS source files
|-- app/ --> "PASTHFINDER" core files (not used for production)
|-- lib/ --> 3rd partie extension/library (not used for production)
|-- app.js --> require.js config (!required for production!)
|-- [0777] logs/ --> log files
|-- ...
|-- node_modules/ --> node.js modules (not used for production)
|-- ...
|-- [0755] public/ --> frontend source
|-- css/ --> CSS dist/build folder (minified)
|-- fonts/ --> (icon)-Fonts
|-- img/ --> images
|-- js/ --> JS dist/build folder and source maps (minified, uglified)
|-- templates/ --> templates
|-- sass/ --> SCSS source (not used for production)
|-- [0777] tmp/ --> cache folder
|-- [0755] .htaccess --> reroute/caching rules ("Apache" only!)
|-- [0755] index.php
--------------------------
━━━━━━━━━━━━━━━━━━━━━━━━━━
CI/CD config files:
--------------------------
|-- .jshintrc --> "JSHint" config (not used for production)
|-- composer.json --> Composer package definition
|-- config.rb --> "Compass" config (not used for production)
|-- gulpfile.js --> "Gulp" task config (not used for production )
|-- package.json --> "Node.js" dependency config (not used for production)
|-- README.md --> This file :) (not used for production)
```

├─ .jshintrc → "JSHint" config (not used for production)
├─ composer.json → "Composer" package definition
├─ gulpfile.js → "Gulp" task config (not used for production)
├─ package.json → "Node.js" dependency config (not used for production)
└─ README.md → This file :) (not used for production)
</pre>

***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* Time: 23:30
*/

namespace Controller;
namespace Exodus4D\Pathfinder\Controller;


use Model\Pathfinder;
use Exodus4D\Pathfinder\Model\Pathfinder;

class AccessController extends Controller {

Expand Down Expand Up @@ -77,11 +77,11 @@ protected function isLoggedIn(\Base $f3) : string {

/**
* broadcast MapModel to clients
* @see broadcastMapData()
* @param Pathfinder\MapModel $map
* @param bool $noCache
*/
protected function broadcastMap(Pathfinder\MapModel $map) : void {
$this->broadcastMapData($this->getFormattedMapData($map));
protected function broadcastMap(Pathfinder\MapModel $map, bool $noCache = false) : void {
$this->broadcastMapData($this->getFormattedMapData($map, $noCache));
}


Expand All @@ -99,18 +99,13 @@ protected function broadcastMapData(?array $mapData) : void {
/**
* get formatted Map Data
* @param Pathfinder\MapModel $map
* @return array
* @throws \Exception
*/

/**
* @param Pathfinder\MapModel $map
* @param bool $noCache
* @return array|null
*/
protected function getFormattedMapData(Pathfinder\MapModel $map) : ?array {
protected function getFormattedMapData(Pathfinder\MapModel $map, bool $noCache = false) : ?array {
$data = null;
try{
$mapData = $map->getData();
$mapData = $map->getData($noCache);
$data = [
'config' => $mapData->mapData,
'data' => [
Expand Down
16 changes: 8 additions & 8 deletions app/main/controller/admin.php → app/Controller/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* Time: 20:30
*/

namespace Controller;
namespace Exodus4D\Pathfinder\Controller;


use Controller\Ccp\Sso;
use lib\Config;
use Model\Pathfinder\CharacterModel;
use Model\Pathfinder\CorporationModel;
use Model\Pathfinder\MapModel;
use Model\Pathfinder\RoleModel;
use Exodus4D\Pathfinder\Controller\Ccp\Sso;
use Exodus4D\Pathfinder\Lib\Config;
use Exodus4D\Pathfinder\Model\Pathfinder\CharacterModel;
use Exodus4D\Pathfinder\Model\Pathfinder\CorporationModel;
use Exodus4D\Pathfinder\Model\Pathfinder\MapModel;
use Exodus4D\Pathfinder\Model\Pathfinder\RoleModel;

class Admin extends Controller{

Expand Down Expand Up @@ -203,7 +203,7 @@ protected function saveSettings(CharacterModel $character, int $corporationId, a
// character has access to that corporation -> create/update/delete rights...
if($corporationRightsData = (array)$settings['rights']){
// get existing corp rights
foreach($corporation->getRights(['addInactive' => true]) as $corporationRight){
foreach($corporation->getRights($corporation::RIGHTS, ['addInactive' => true]) as $corporationRight){
$corporationRightData = $corporationRightsData[$corporationRight->rightId->_id];
if(
$corporationRightData &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* Time: 17:42
*/

namespace Controller\Api;
namespace Exodus4D\Pathfinder\Controller\Api;

use Controller;
use Model\Pathfinder;
use Exodus4D\Pathfinder\Controller;
use Exodus4D\Pathfinder\Model\Pathfinder;

class Access extends Controller\AccessController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
* Time: 03:34
*/

namespace Controller\Api;
namespace Exodus4D\Pathfinder\Controller\Api;


use lib\Config;
use Controller;

use Exodus4D\Pathfinder\Lib\Config;
use Exodus4D\Pathfinder\Controller;

/**
* Github controller
Expand All @@ -36,9 +35,7 @@ public function releases(\Base $f3){
$return->version->delta = null;
$return->version->dev = false;

$md = \Markdown::instance();

$releases = $f3->gitHubClient()->getProjectReleases('exodus4d/pathfinder', $releaseCount);
$releases = $f3->gitHubClient()->send('getProjectReleases', 'exodus4d/pathfinder', $releaseCount);

foreach($releases as $key => &$release){
// check version ------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -70,12 +67,12 @@ public function releases(\Base $f3){

// convert Markdown to HTML -> use either gitHub API (in oder to create abs, issue links)
// -> or F3´s markdown as fallback
$html = $f3->gitHubClient()->markdownToHtml('exodus4d/pathfinder', $body);
$html = $f3->gitHubClient()->send('markdownToHtml', 'exodus4d/pathfinder', $body);

if(!empty($html)){
$body = $html;
}else{
$body = $md->convert(trim($body));
$body = \Markdown::instance()->convert(trim($body));
}

$release['body'] = $body;
Expand Down
Loading

0 comments on commit 62dc991

Please sign in to comment.