Files
windmill/backend/windmill-common/src/workspaces.rs
T
wendrul af0e901954 feat: deployment UI filter deployable items (#4183)
* Add column to workspace settings table

* Add endpoint to change the deploy UI settings

* Make frontend page to edit UI settings

* Prepare sqlx

* Add deployment restrictions to frontend

* Fix function name

* Change dependency to minimatch, CE compatibility

* Remove default include_path

* Remove picomatch types (old dep)

* Use empty list instead of globstar as default

* All deployable if config is null
2024-08-05 13:27:13 +02:00

40 lines
997 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Default)]
pub struct WorkspaceGitSyncSettings {
pub include_path: Vec<String>,
pub include_type: Vec<ObjectType>,
pub repositories: Vec<GitRepositorySettings>,
}
#[derive(Serialize, Deserialize, Debug, Default)]
pub struct WorkspaceDeploymentUISettings {
pub include_path: Vec<String>,
pub include_type: Vec<ObjectType>,
}
#[derive(Serialize, Deserialize, PartialEq, Debug)]
#[serde(rename_all(serialize = "lowercase", deserialize = "lowercase"))]
pub enum ObjectType {
Script,
Flow,
App,
Folder,
Resource,
Variable,
Secret,
Schedule,
ResourceType,
User,
Group,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GitRepositorySettings {
pub script_path: String,
pub git_repo_resource_path: String,
pub use_individual_branch: Option<bool>,
pub group_by_folder: Option<bool>,
pub exclude_types_override: Option<Vec<ObjectType>>,
}