From d43b02b4f24e00bd5ea09842f7d66ad901a96ee8 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sun, 4 Aug 2024 10:53:02 +0200 Subject: [PATCH] add status to rented instance I couldn't fix the commits --- .../java/eu/m724/vastapp/vastai/data/RentedInstance.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/eu/m724/vastapp/vastai/data/RentedInstance.kt b/app/src/main/java/eu/m724/vastapp/vastai/data/RentedInstance.kt index 1ae80f8..c3570fc 100644 --- a/app/src/main/java/eu/m724/vastapp/vastai/data/RentedInstance.kt +++ b/app/src/main/java/eu/m724/vastapp/vastai/data/RentedInstance.kt @@ -34,6 +34,11 @@ data class RentedInstance( val sshProxyHost: String, val sshProxyPort: Int, + /** exited or running */ + val status: String, + /** "running" if the machine is starting or "stopped" if stopping */ + val targetStatus: String, + /** the docker image that runs on the instance */ val image: String, /** label set by user, null if not set */ @@ -59,6 +64,8 @@ data class RentedInstance( json.optDouble("inet_up_billed").toInt(), "ssh${json.getInt("ssh_idx")}.vast.ai", // TODO json.getInt("ssh_port"), + json.getString("actual_status"), + json.getString("intended_status"), json.getString("image_uuid"), json.optString("label").takeUnless { it == "null" || it.isBlank() }, json.getString("local_ipaddrs").split(" ").filterNot { it == "\n" }