Skip to content

Commit

Permalink
Merge branch 'dev' into issue#440
Browse files Browse the repository at this point in the history
  • Loading branch information
agungsugiarto committed Oct 15, 2024
2 parents 4c97b6b + 9b9a1c3 commit 5613c3b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
2 changes: 2 additions & 0 deletions app/Console/Commands/BackupDatabaseStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public function handle()
$this->folder_database = folderBackupDatabase();
$this->backupDatabase();
$this->backupStorage();

changeLogPermissions('777');
}
}

Expand Down
1 change: 1 addition & 0 deletions app/Console/Commands/BackupGoogleDrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function handle()

// proses backup
$this->remote->backupToCloudStorage($storage_type, $remote_name, tanggal_backup(), null);
changeLogPermissions('777');
}
}
}
1 change: 1 addition & 0 deletions app/Console/Commands/BackupVps.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function handle()

// proses backup
$this->remote->backupToCloudStorage($storage_type, $remote_name, tanggal_backup(), $root);
changeLogPermissions('777');
}
}
}
2 changes: 2 additions & 0 deletions app/Console/Commands/BpsKemendagriCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ public function handle()
$this->requests($this->provinsi, 'kabupaten');
$this->requests($this->kabupaten, 'kecamatan');
$this->requests($this->kecamatan, 'desa');
changeLogPermissions('777');
} catch (ClientException $e) {
report($e);
changeLogPermissions('777');
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/Console/Commands/DesaOptimasiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ public function handle()
]);
}
});

changeLogPermissions('777');
}
}
25 changes: 22 additions & 3 deletions app/Helpers/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ function lastrelease($url)
$response = Http::withHeaders([
'Accept' => 'application/vnd.github.v3+json',
])
->get($url)
->throw();
->get($url)
->throw();

return json_decode($response->body());
} catch (Throwable $th) {
Expand Down Expand Up @@ -205,7 +205,7 @@ function pantau_wilayah_khusus()
*/
function abaikan_domain($aplikasi)
{
switch($aplikasi) {
switch ($aplikasi) {
case 'opendk':
return Cache::get('abaikan_domain_opendk', '');
break;
Expand Down Expand Up @@ -414,3 +414,22 @@ function local_date($date, $format = 'l, j F Y H:i:s')
return $date->format($format);
}
}

if (! function_exists('changeLogPermissions')) {
function changeLogPermissions($permissions = '777')
{
// Path ke folder logs
$logPath = storage_path('logs');

// Periksa apakah folder ada
if (is_dir($logPath)) {
// Ubah izin sesuai parameter
exec("chmod -R $permissions $logPath", $output, $returnVar);

// Cek hasil perintah
return $returnVar === 0;
}

return false;
}
}
7 changes: 1 addition & 6 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
Di rilis v2410.0.0 berisi perbaikan yang diminta Komunitas Open Desa.

#### Penambahan Fitur
1. [#419](https://github.com/OpenSID/pantau/issues/419) Perbaikan halaman OpenDK.
2. [#427](https://github.com/OpenSID/pantau/issues/427) Penambahan API pantau tema dan tampilkan data tema di pantau.

#### Perbaikan Bug

1. [#420](https://github.com/OpenSID/pantau/issues/420) Perbaikan route default pantau.
1. [#430](https://github.com/OpenSID/pantau/issues/430) Perbaikan permission file logging ketika backup otomatis.

#### Penyesuaian Teknis

1. [#429](https://github.com/OpenSID/pantau/issues/429) Perbaikan performa query datatable pengguna OpenSID.
2. [#433](https://github.com/OpenSID/pantau/issues/433) Ijinkan akses web dashboard setelah login.
3. [#422](https://github.com/OpenSID/pantau/issues/422) Mutahirkan daftar wilayah berdasarkan permendagri yang baru.

0 comments on commit 5613c3b

Please sign in to comment.