Skip to content

Commit

Permalink
Merge pull request #43 from it-at-m/mix-1498-1629
Browse files Browse the repository at this point in the history
Mix 1498 1629
  • Loading branch information
ThomasAFink authored Dec 4, 2023
2 parents 0410aa4 + d50c3aa commit 3cb62b0
Show file tree
Hide file tree
Showing 4 changed files with 371 additions and 32 deletions.
384 changes: 360 additions & 24 deletions zmsadmin/public/_js/reactcomponents.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions zmsadmin/src/Zmsadmin/WorkstationProcessPreCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function readResponse(
$workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity();
$processId = Validator::value($args['id'])->isNumber()->getValue();
$process = \App::$http->readGetResult('/process/'. $processId .'/')->getEntity();

$excludedIds = $validator->getParameter('exclude')->isString()->setDefault('')->getValue();
$excludedIds = $validator->getParameter('exclude')->isString()->setDefault('')->getValue();
if ($excludedIds) {
$exclude = explode(',', $excludedIds);
}
Expand Down
2 changes: 2 additions & 0 deletions zmsapi/src/Zmsapi/WorkstationProcessDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function readResponse(
if (! $workstation->process['id']) {
throw new Exception\Process\ProcessNotFound();
}
$process = (new Query())->readEntity($workstation->process['id'], $workstation->process['authKey'], 1);
$process = (new Query())->updateEntity($process, \App::$now, 0, $process->status);
$workstation->process->setStatusBySettings();
(new Workstation)->writeRemovedProcess($workstation);
unset($workstation->process);
Expand Down
14 changes: 8 additions & 6 deletions zmsdb/src/Zmsdb/Query/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -794,12 +794,14 @@ protected function addProcessingTimeData($process, \DateTimeInterface $dateTime)
{
$data = array();

if ($process->status == 'processing') {
$data['showUpTime'] = $dateTime->format('Y-m-d H:i:s');
}

if ($process->status == 'finished') {
$data['finishTime'] = $dateTime->format('Y-m-d H:i:s');
if (isset($previousStatus) && ($process->status == 'called' && $previousStatus == 'called')) {
$data['timeoutTime'] = $dateTime->format('Y-m-d H:i:s');
} else if (isset($previousStatus) && ($process->status == 'processing' && $previousStatus == 'processing')) {
$data['timeoutTime'] = $dateTime->format('Y-m-d H:i:s');
} else if ($process->status == 'processing') {
$data['showUpTime'] = $dateTime->format('Y-m-d H:i:s');
} else if ($process->status == 'finished') {
$data['finishTime'] = $dateTime->format('Y-m-d H:i:s');
}

$this->addValues($data);
Expand Down

0 comments on commit 3cb62b0

Please sign in to comment.