List of commits:
Subject Hash Author Date (UTC)
Admin report improvements b527baab12e2e08998672559b0f33fc6df15e74c Catalin(ux) M. BOIE 2020-07-31 05:35:25
Cosmetic 30c879d625b094a33bd9a2165c67a8a11e802f42 Catalin(ux) M. BOIE 2020-07-31 05:34:19
Builder, worker and web updates for artifacts c82a7143a24ec987e0d98bb58327ef15bc602d0d Catalin(ux) M. BOIE 2020-07-31 05:30:44
Prevent bots to create accounts 3eacd8103e9a039f3f8585a59c27fdff6fd66ca4 Catalin(ux) M. BOIE 2020-07-08 05:25:37
css: Force the footer to the bottom using flex f89dddc9fa6b2c131448996cc51349e00224eea6 Catalin(ux) M. BOIE 2020-07-04 04:15:03
docs: css tweaks d270a286b160bb5de39ade5d99a58fe26e03b2d5 Catalin(ux) M. BOIE 2020-06-30 17:21:02
Improved admin report 9fa82cc2878886c2195cdd3f334dd532b3ea6a22 Catalin(ux) M. BOIE 2020-06-28 10:19:24
First version of artifacts ad6b6c75aab8d485ea45c1d851f23d83587d6931 Catalin(ux) M. BOIE 2020-06-27 13:11:17
Allow adding bugs for public repos + small fixes e67955ce3360c8c003a718e01844b3d8effa74a6 Catalin(ux) M. BOIE 2020-06-25 16:05:54
History updates 4c4aef444bbd1149f2c02b6da620f184aae1eed6 Catalin(ux) M. BOIE 2020-06-16 05:53:14
Allow cron to execute sub-tasks in parallel - we missed stats f65c76714cf349a53f584c8e65d9e89c24a4fa69 Catalin(ux) M. BOIE 2020-06-12 06:50:40
bug: search: fixed the override of some global variables 82e251ea883e50b8d1476530e0268fd5770fbf41 Catalin(ux) M. BOIE 2020-06-10 21:29:03
If a repo is non-existent, we should not try to use the id bcb08f74e21556aa750920335ebec2f965e72f36 Catalin(ux) M. BOIE 2020-06-10 08:05:43
If no activity, average elap is not computed correctly a7d4f0042c912d29f7943e0446820a477f42d6f7 Catalin(ux) M. BOIE 2020-06-09 07:03:21
When a user is requesting an e-mail confirmation operation, ignore if the e-mail was confirmed 62c387ed431d0c46d16e534cc1c954557ee389f7 Catalin(ux) M. BOIE 2020-06-08 06:42:22
Reverse test messed the creation of partition tables; more debugging d820816c2624549e0b0e1634523717cda0b7ba66 Catalin(ux) M. BOIE 2020-06-05 17:33:08
We need to prepare the partition tables before some inserts 07a12d1c79104b4707a9d43463fa9c11a4697293 Catalin(ux) M. BOIE 2020-06-05 15:55:43
.spec updates 5fe0aca1b4a3bfd8c1c8db95409faf512ad09b43 Catalin(ux) M. BOIE 2020-06-04 22:03:57
Switch to Podman (because of Fedora 32) and fix the worker service in the spec file 05b3866cd09b0aa8367d3b5755f45ea7274658de Catalin(ux) M. BOIE 2020-06-04 15:50:41
Added sample configuration for workers df36ccd20e40987a4ca2355062ee1312aa2ee3a2 Catalin(ux) M. BOIE 2020-06-04 15:14:52
Commit b527baab12e2e08998672559b0f33fc6df15e74c - Admin report improvements
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-07-31 05:35
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-07-31 05:35
Parent(s): 30c879d625b094a33bd9a2165c67a8a11e802f42
Signer:
Signing key:
Signing status: N
Tree: a509e9745f8d8c8907315d5851b97a8b3726e998
File Lines added Lines deleted
inc/admin.inc.php 64 2
File inc/admin.inc.php changed (mode: 100644) (index 3954531..5d99e24)
... ... function rg_admin_report1_suggestions($db, $from, $to)
415 415 return $ret; return $ret;
416 416 } }
417 417
418 /*
419 * Report biggest repos
420 */
421 function rg_admin_report_big_repos($db)
422 {
423 $ret = 'Biggest repos:' . "\n";
424 while (1) {
425 $sql = 'SELECT uid, name, disk_used_mb FROM repos'
426 . ' ORDER BY disk_used_mb DESC LIMIT 20';
427 $res = rg_sql_query($db, $sql);
428 if ($res === FALSE) {
429 $ret .= ' ERR: ' . rg_sql_error();
430 break;
431 }
432
433 while (($row = rg_sql_fetch_array($res))) {
434 $ui = rg_user_nice($db, $row['uid']);
435 $ret .= "\t" . $row['name']
436 . "\t" . $row['disk_used_mb'] . ' MiB'
437 . "\t" . $ui
438 . "\n";
439 }
440 rg_sql_free_result($res);
441
442 break;
443 }
444
445 return $ret . "\n";
446 }
447
448 /*
449 * Report biggest disk users
450 */
451 function rg_admin_report_big_users($db)
452 {
453 $ret = 'Biggest users:' . "\n";
454 while (1) {
455 $sql = 'SELECT username, disk_used_mb FROM users'
456 . ' WHERE deleted = 0'
457 . ' ORDER BY disk_used_mb DESC LIMIT 20';
458 $res = rg_sql_query($db, $sql);
459 if ($res === FALSE) {
460 $ret .= ' ERR: ' . rg_sql_error();
461 break;
462 }
463
464 while (($row = rg_sql_fetch_array($res))) {
465 $ret .= "\t" . $row['username']
466 . "\t" . $row['disk_used_mb'] . ' MiB'
467 . "\n";
468 }
469 rg_sql_free_result($res);
470
471 break;
472 }
473
474 return $ret . "\n";
475 }
476
418 477 /* /*
419 478 * Send some daily statistics to the admin * Send some daily statistics to the admin
420 479 */ */
 
... ... function rg_admin_report1($db, $rg)
438 497 $free = disk_free_space($dir); $free = disk_free_space($dir);
439 498 $total = disk_total_space($dir); $total = disk_total_space($dir);
440 499 $body .= $dir . ': total=' . rg_1024($total) $body .= $dir . ': total=' . rg_1024($total)
441 . ' free=' . rg_1024($free);
500 . ' free=' . rg_1024($free) . "\n";
442 501 } }
443 502 $body .= "\n"; $body .= "\n";
444 503
 
... ... function rg_admin_report1($db, $rg)
550 609 $body .= 'Average elap: ' . $conns['avg_elap'] . 'ms' . "\n"; $body .= 'Average elap: ' . $conns['avg_elap'] . 'ms' . "\n";
551 610 unset($conns['avg_elap']); unset($conns['avg_elap']);
552 611
553 rg_log_ml('DEBUG: conns: ' . print_r($conns, TRUE));
612 //rg_log_ml('DEBUG: conns: ' . print_r($conns, TRUE));
554 613 foreach ($conns as $t => $i) { foreach ($conns as $t => $i) {
555 614 $body .= 'Top for \'' . $t . '\':' . "\n"; $body .= 'Top for \'' . $t . '\':' . "\n";
556 615 foreach ($i as $k => $v) { foreach ($i as $k => $v) {
 
... ... function rg_admin_report1($db, $rg)
568 627 } }
569 628 } }
570 629
630 $body .= rg_admin_report_big_repos($db);
631 $body .= rg_admin_report_big_users($db);
632
571 633 $rg['ui']['ignore_confirmed'] = 1; $rg['ui']['ignore_confirmed'] = 1;
572 634 $rg['ui']['email'] = $rg_admin_email; $rg['ui']['email'] = $rg_admin_email;
573 635 $rg['mail'] = array(); $rg['mail'] = array();
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main