diff --git a/src/AbraFlexi/MultiFlexi/Ui/ServicesForCompanyForm.php b/src/AbraFlexi/MultiFlexi/Ui/ServicesForCompanyForm.php index 4139ac0f..4e500499 100644 --- a/src/AbraFlexi/MultiFlexi/Ui/ServicesForCompanyForm.php +++ b/src/AbraFlexi/MultiFlexi/Ui/ServicesForCompanyForm.php @@ -61,7 +61,7 @@ public function __construct($company, $tagProperties = array()) { $appRow->addColumn(4, new FormGroup('' . $appData['nazev'] . ' ', $intervalChooser))->addItem($launchButton); - $jobs = $jobber->listingQuery()->select(['id','begin','exitcode'],true)->where('company_id',$companyID)->where('app_id',$code)->limit(10)->fetchAll(); + $jobs = $jobber->listingQuery()->select(['id','begin','exitcode'],true)->where('company_id',$companyID)->where('app_id',$code)->limit(10)->orderBy('job.id DESC')->fetchAll(); $jobList = new \Ease\TWB4\Table(); $jobList->addRowHeaderColumns([_('Job ID'),_('Launch time'),_('Exit Code')]); diff --git a/src/app.php b/src/app.php index 2ab521bc..a2b43d5a 100644 --- a/src/app.php +++ b/src/app.php @@ -60,7 +60,7 @@ $jobber = new \AbraFlexi\MultiFlexi\Job(); $jobs = $jobber->listingQuery()->select(['job.id', 'job.company_id', 'job.begin', 'job.exitcode', 'user.login', 'job.launched_by', 'company.nazev'], true)->leftJoin('company ON company.id = job.company_id') ->leftJoin('user ON user.id = job.launched_by') - ->where('app_id', $apps->getMyKey())->limit(10)->fetchAll(); + ->where('app_id', $apps->getMyKey())->limit(10)->orderBy('job.id DESC')->fetchAll(); $jobList = new \Ease\TWB4\Table(); $jobList->addRowHeaderColumns([_('Job ID'), _('Company'), _('Launch time'), _('Exit Code'), _('Launched by')]);