diff --git a/resources/test/config.yaml b/resources/test/config.yaml index 7b41477..d1a2209 100644 --- a/resources/test/config.yaml +++ b/resources/test/config.yaml @@ -1 +1,26 @@ -{"core_happs":[{"app_id":"core-app","bundle_url":"https://holo-host.github.io/holo-hosting-app-rsm/releases/downloads/core-app/0_5_19/core-app.0_5_19.happ","dnas":[{"properties":"{skip_proof: false, holo_agent_override: \"uhCAkYhIZ8u7NvM7H-m75Z6L1zSWLkJsbsrE8nXx1Hi9Nc3FVbm2U\"}","role_name":"core-app"},{"properties":"{skip_proof: false, not_editable_profile: true, holo_agent_override: \"uhCAkYhIZ8u7NvM7H-m75Z6L1zSWLkJsbsrE8nXx1Hi9Nc3FVbm2U\", fee_collectors_pubkey: \"uhCAkAY_6T0jx4QSQso1R3MD6wA7vYgL4VbIA0GWT7rfMDDViZyQe\", holo_revenue_pubkey: \"uhCAkcgkEPrrgDDZYnj4MqIz5kNGOaaJO9y1h7ky7iN1PRiNmQYmr\", enable_reserves: true}","role_name":"holofuel"}]},{"app_id":"servicelogger","bundle_url":"https://holo-host.github.io/servicelogger-rsm/releases/downloads/0_4_19/servicelogger.0_4_19.happ","sl_dna_url":"https://holo-host.github.io/servicelogger-rsm/releases/downloads/0_4_19/servicelogger.0_4_19.dna"}],"self_hosted_happs":[]} +{ + "core_happs": + [ + { + "app_id": "core-app", + "bundle_url": "https://holo-host.github.io/holo-hosting-app-rsm/releases/downloads/core-app/0_5_27/core-app.0_5_27.happ", + "dnas": + [ + { + "properties": '{skip_proof: false, holo_agent_override: "uhCAkYhIZ8u7NvM7H-m75Z6L1zSWLkJsbsrE8nXx1Hi9Nc3FVbm2U"}', + "role_name": "core-app", + }, + { + "properties": '{skip_proof: false, not_editable_profile: true, holo_agent_override: "uhCAkYhIZ8u7NvM7H-m75Z6L1zSWLkJsbsrE8nXx1Hi9Nc3FVbm2U", fee_collectors_pubkey: "uhCAkAY_6T0jx4QSQso1R3MD6wA7vYgL4VbIA0GWT7rfMDDViZyQe", holo_revenue_pubkey: "uhCAkcgkEPrrgDDZYnj4MqIz5kNGOaaJO9y1h7ky7iN1PRiNmQYmr", enable_reserves: true}', + "role_name": "holofuel", + }, + ], + }, + { + "app_id": "servicelogger", + "bundle_url": "https://holo-host.github.io/servicelogger-rsm/releases/downloads/0_4_21/servicelogger.0_4_21.happ", + "sl_dna_url": "https://holo-host.github.io/servicelogger-rsm/releases/downloads/0_4_21/servicelogger.0_4_21.dna", + }, + ], + "self_hosted_happs": [], +} diff --git a/src/types.rs b/src/types.rs index 37ab247..4e7e2cc 100644 --- a/src/types.rs +++ b/src/types.rs @@ -26,6 +26,7 @@ pub struct HappDetails { pub description: String, pub categories: Vec, pub enabled: bool, + pub is_auto_disabled: bool, pub is_paused: bool, pub source_chains: Option, pub days_hosted: Option, @@ -48,6 +49,7 @@ impl HappDetails { description: happ.name.clone(), categories: happ.categories.clone(), enabled: happ.host_settings.is_enabled, + is_auto_disabled: happ.host_settings.is_auto_disabled, is_paused: happ.is_paused, source_chains: count_instances(happ.id.clone(), ws) .await @@ -199,6 +201,8 @@ pub struct DnaResource { #[derive(Debug, Serialize, Deserialize, SerializedBytes)] pub struct HostSettings { pub is_enabled: bool, + pub is_host_disabled: bool, // signals that the host was the origin of the last disable request/action + pub is_auto_disabled: bool, // signals that an internal hpos service was the origin of the last disable request/action } #[derive(Debug, Serialize, Deserialize, Clone)] diff --git a/tests/utils/core_apps.rs b/tests/utils/core_apps.rs index aa48aea..1121baf 100644 --- a/tests/utils/core_apps.rs +++ b/tests/utils/core_apps.rs @@ -1,8 +1,8 @@ use std::fmt; // https://github.com/Holo-Host/holo-nixpkgs/blob/develop/profiles/logical/happ-releases.nix#L9C5-L9C5 -pub const HHA_URL: &str = "https://holo-host.github.io/holo-hosting-app-rsm/releases/downloads/core-app/0_5_19/core-app.0_5_19-skip-proof.happ"; -pub const SL_URL: &str = "https://holo-host.github.io/servicelogger-rsm/releases/downloads/0_4_19/servicelogger.0_4_19.happ"; +pub const HHA_URL: &str = "https://holo-host.github.io/holo-hosting-app-rsm/releases/downloads/core-app/0_5_27/core-app.0_5_27-skip-proof.happ"; +pub const SL_URL: &str = "https://holo-host.github.io/servicelogger-rsm/releases/downloads/0_4_21/servicelogger.0_4_21.happ"; pub enum Happ { HHA, @@ -12,7 +12,7 @@ pub enum Happ { impl fmt::Display for Happ { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - Happ::HHA => write!(f, "core-app:0_5_19"), + Happ::HHA => write!(f, "core-app:0_5_27"), Happ::SL => write!(f, "servicelogger"), } }