Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Dec 26, 2024
1 parent 7ff9187 commit bd9cf7e
Show file tree
Hide file tree
Showing 40 changed files with 247 additions and 233 deletions.
15 changes: 11 additions & 4 deletions www/controllers/Logging/SubStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

class SubStep extends Logging
{
/**
* Add a new sub step to the latest step
*/
public function new(string $identifier, array $data)
{
$content = $this->getContent();
Expand All @@ -17,7 +20,7 @@ public function new(string $identifier, array $data)
$content['steps'][$name]['substeps'][$identifier] = [
'title' => '',
'note' => '',
'status' => '',
'status' => 'running',
'start' => microtime(true),
'end' => '',
'duration' => '',
Expand All @@ -42,7 +45,7 @@ public function new(string $identifier, array $data)
/**
* Set latest sub step as completed
*/
public function completed(string|null $message = '')
public function completed(string|null $message = '', string|null $identifier = '')
{
// Add message to output
$this->output($message);
Expand All @@ -52,8 +55,12 @@ public function completed(string|null $message = '')
// Get latest step key name
$name = array_key_last($content['steps']);

// Get latest sub step key name
$subName = array_key_last($content['steps'][$name]['substeps']);
// If no identifier is provided, get latest sub step key name, otherwise use the provided identifier
if (!empty($identifier)) {
$subName = $identifier;
} else {
$subName = array_key_last($content['steps'][$name]['substeps']);
}

// Set status to completed
$content['steps'][$name]['substeps'][$subName]['status'] = 'completed';
Expand Down
9 changes: 6 additions & 3 deletions www/controllers/Repo/Mirror/Deb.php
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,12 @@ private function downloadDebPackages($url)
/**
* Print OK if package has been downloaded and verified successfully
*/
$this->loggingSubStepController->completed('Done');
$this->loggingSubStepController->completed();
}

// Set the main substep as completed
$this->loggingSubStepController->completed('', 'downloading-packages');

unset($this->debPackagesLocation, $totalPackages, $packageCounter);
}

Expand Down Expand Up @@ -887,7 +890,7 @@ private function downloadDebSourcesPackages($url)
/**
* Print OK if source package has been downloaded and verified successfully
*/
$this->loggingSubStepController->completed('Done');
$this->loggingSubStepController->completed();
}

unset($this->sourcesPackagesLocation, $totalPackages, $packageCounter);
Expand Down Expand Up @@ -945,7 +948,7 @@ private function downloadTranslation()
/**
* Print OK if package has been downloaded and verified successfully
*/
$this->loggingSubStepController->completed('Done');
$this->loggingSubStepController->completed();
}

unset($this->translationsLocation);
Expand Down
5 changes: 4 additions & 1 deletion www/controllers/Repo/Mirror/Rpm.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,14 @@ private function downloadRpmPackages(string $url)
/**
* Print OK if package has been downloaded and verified successfully
*/
$this->loggingSubStepController->completed('Done');
$this->loggingSubStepController->completed();

unset($myprocess, $content, $keyId, $matches);
}

// Set the main substep as completed
$this->loggingStepController->completed('', 'downloading-packages');

unset($this->rpmPackagesLocation, $totalPackages, $packageCounter);
}

Expand Down
14 changes: 7 additions & 7 deletions www/public/assets/icons/alarm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions www/public/assets/icons/build.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions www/public/assets/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions www/public/assets/icons/cog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions www/public/assets/icons/cpu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions www/public/assets/icons/delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bd9cf7e

Please sign in to comment.