sync jobs: remove superfluous direction property

since the SyncJobConfig struct now contains a 'sync-direction' property, we can
omit the 'direction' property of the SyncJobStatus struct. This makes a
few adaptions in the ui necessary:

* use the correct field
* handle 'pull' as default (since we don't necessarily get a
  'sync-direction' in that case)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2024-11-26 15:47:34 +01:00 committed by Thomas Lamprecht
parent ce7239c24a
commit 7ae942f941

View File

@ -649,9 +649,6 @@ impl SyncJobConfig {
status: {
type: JobScheduleStatus,
},
direction: {
type: SyncDirection,
},
},
)]
#[derive(Serialize, Deserialize, Clone, PartialEq)]
@ -662,9 +659,6 @@ pub struct SyncJobStatus {
pub config: SyncJobConfig,
#[serde(flatten)]
pub status: JobScheduleStatus,
/// The direction of the job
pub direction: SyncDirection,
}
/// These are used separately without `ns`/`max-depth` sometimes in the API, specifically in the API