Skip to content

Commit

Permalink
p3x-robot sunday release 2018-5-23 23:01:27
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 23, 2018
1 parent e2fdc50 commit 3c337cb
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 29 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ UrlToolkit {

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.17-816
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.25-822

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



# 🤖 P3X Gitlist v2.8.17-816
# 🤖 P3X Gitlist v2.8.25-822

This is an open-source project. Star this repository if you like it, or even donate! Thank you so much! :)

Expand Down Expand Up @@ -50,24 +50,6 @@ https://github.com/patrikx3/gitlist/releases
### Web server
You might need to tune your web server, to only parse the `public/index.php` PHP script, so you can view your `php` files in `P3X GitList`.

#### PHP Memory

**By now, I am loading the diffs via `AJAX`. I render in the browser the diffs even deffered. For a huge commit `twig` rendered the `PHP` using over `512MB`, now it works with `128MB`. The browser does not hang anymore.**

##### This what it was before ...
It is possible, that some big commits are huge and for now, it loads everything. In `V3`, everything will be `lazy`, but looks like I had a huge commit and I had to set my `PHP.ini` had to change like:
```text
max_execution_time = 240
max_input_time = 240
memory_limit = 1024m
```

I checked and the big commit was using 258 MBytes.


Though even the `browser` is almost `hanging`, take a long time to `render` the page.


## There is a changing break

### First
Expand Down Expand Up @@ -110,6 +92,9 @@ The following versions are not using `Babel`!!!! Yikes!
# Old info
https://github.com/klaussilveira/gitlist

### Last merge from `klaussilveira`
May 21, 2018

# Live demo

http://gitlist.patrikx3.com/
Expand Down Expand Up @@ -169,7 +154,7 @@ npm run watch

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.17-816
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.25-822

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion artifacts/php-7.2-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo apt upgrade -y

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.17-816
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.25-822

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ require('codemirror/mode/yaml/yaml');

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.17-816
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.25-822

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p3x-gitlist",
"version": "2.8.18-818",
"version": "2.8.26-824",
"corifeus": {
"prod-dir": "prod",
"postfix": "8b5e3a4adea77d341db75b103d5b6a2b786da21f1fcc9598e2dc67a82b3bee73",
Expand Down
9 changes: 9 additions & 0 deletions src/GitList/Controller/MainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ public function connect(Application $app)
{
$route = $app['controllers_factory'];

$route->post('/json-error', function(Request $request) use ($app) {

return $app['twig']->render('error.twig', array(
'error' => $request->get('error'),
));
})->bind('json-error');



$route->get('/', function() use ($app) {
$repositories = $app['git']->getRepositories($app['git.repos']);

Expand Down
2 changes: 1 addition & 1 deletion src/browser/js/angular/component/commit-diff.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div ng-if="!diff" style="opacity: 0.5; margin: 20px; font-size: 125%;">
<i class="fas fa-cog fa-spin"></i> Hang on, rendering a huge diff ...
<i class="fas fa-cog fa-spin"></i> Hang on, rendering a possible huge diff ...
</div>

<div style="max-height: {{ $root.gitlist.editorMaxHeight }}px; overflow-y: auto;">
Expand Down
16 changes: 14 additions & 2 deletions src/browser/js/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ $(() => {

const url = new URL(location);
url.searchParams.append('ajax', 1)
$.ajax(url.toString()).then((diffsResponseJson) => {
diffs = diffsResponseJson;
$.ajax(url.toString()).then(function (diffsResponseJson) {
if (typeof diffsResponseJson !== 'object') {
const sendErrorMessage = `${window.gitlist.basepath}/json-error`;
console.log(sendErrorMessage);
$.redirect(sendErrorMessage, {
error: diffsResponseJson,
})
} else {
diffs = diffsResponseJson;
}
}).catch(window.gitlist.ajaxErrorHandler)

for (let diffEditor of diffEditors) {
Expand All @@ -44,6 +52,10 @@ $(() => {
clearTimeout(diffEditor.timeout)
diffEditor.timeout = setTimeout(showDiff, 100);
} else if (!generatedDiffs.hasOwnProperty(index)) {
clearTimeout(diffEditor.timeout)
if (typeof diffs === 'string') {
return;
}
generatedDiffs[index] = true;
const diff = diffs[index - 1];
setTimeout(() => {
Expand Down
10 changes: 10 additions & 0 deletions src/twig/error.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
<strong>Oops!</strong> {{ message }}
</div>

{% if error %}
<div class="alert alert-info">
It is possible, that for huge commits, you need to increase the <strong>PHP memory limit</strong>, or sometimes, reloading is working, when you are not using lot's of many <strong>PHP</strong> processes. I tried to make huge commits to work with <strong>128MB</strong>, but given my server is using many <strong>PHP</strong> processes, sometimes the <strong>128MB</strong> is not enough.
</div>
<div>
{{ error | raw }}
</div>
<br/>
{% endif %}

<a class="btn btn-info btn-block" href="#" onclick="location = document.referrer">You may go back to previous page.</a>

{% include 'footer.twig' %}
Expand Down
2 changes: 1 addition & 1 deletion src/twig/layout.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="shortcut icon" type="image/png" href="img/favicon.png"/>
<link rel="stylesheet" type="text/css" href="{{ prod_dir }}/css/{{ theme }}.{{ theme_postfix }}.css" id="bootstrap-theme">
<script type="text/javascript">window.gitlist = { lastload: undefined, lastloadSpan: undefined, dark: {{ theme_dark |json_encode|raw }}, isDark: undefined, viewer: undefined, setTheme: undefined, getThemeCookie: undefined, basepath: '{{ app.url_subdir }}', branch: '{{ branch }}', repo: '{{ repo }}', dateFormat: '{{ gitlist_date_format }}', themes: {}, codemirror_full_limit: undefined, browse_type: undefined, search_query: '{{ search_query }}', browserClick: undefined, networkRedraw: undefined, treegraph: undefined, canvasLaneColors: undefined, canvasDotColors: undefined, randomCanvasLaneColors: undefined, loadTheme: '{{ theme }}', codemirrorTheme : {}, scrollIntoView: undefined, markdownRenderer: undefined, ng: undefined, generateDiff: {}, editorMaxHeight: 300}</script>
<link href="./prod/webpack/bundle.457f70f6e82c473a0c49.css" rel="stylesheet"><script type="text/javascript" src="./prod/webpack/bundle.457f70f6e82c473a0c49.js"></script></head>
<link href="./prod/webpack/bundle.86db850ff1ac5c24c27c.css" rel="stylesheet"><script type="text/javascript" src="./prod/webpack/bundle.86db850ff1ac5c24c27c.js"></script></head>
<body class="{{ theme_type }}" id="p3x-gitlist-ng">

{% block body %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.17-816
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.8.25-822

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down

0 comments on commit 3c337cb

Please sign in to comment.