(self: &Arc<Self>, status_page: &mut StatusPage)
| 1163 | } |
| 1164 | |
| 1165 | pub async fn edit_status_page(self: &Arc<Self>, status_page: &mut StatusPage) -> Result<()> { |
| 1166 | let mut config = serde_json::to_value(status_page.clone()).unwrap(); |
| 1167 | config |
| 1168 | .as_object_mut() |
| 1169 | .unwrap() |
| 1170 | .insert("logo".to_owned(), status_page.icon.clone().into()); |
| 1171 | |
| 1172 | let _: bool = self |
| 1173 | .call( |
| 1174 | "saveStatusPage", |
| 1175 | vec![ |
| 1176 | serde_json::to_value(status_page.slug.clone()).unwrap(), |
| 1177 | serde_json::to_value(config).unwrap(), |
| 1178 | serde_json::to_value(status_page.icon.clone()).unwrap(), |
| 1179 | serde_json::to_value(status_page.public_group_list.clone()).unwrap(), |
| 1180 | ], |
| 1181 | "/ok", |
| 1182 | true, |
| 1183 | ) |
| 1184 | .await?; |
| 1185 | |
| 1186 | Ok(()) |
| 1187 | } |
| 1188 | |
| 1189 | pub async fn add_docker_host(self: &Arc<Self>, docker_host: &mut DockerHost) -> Result<()> { |
| 1190 | self.edit_docker_host(docker_host).await |
no test coverage detected