xmrig: reorder "rig" to be last in list

This commit is contained in:
hinto-janaiyo 2022-11-26 22:35:46 -05:00
parent f02a05e0b0
commit bd9c543c08
No known key found for this signature in database
GPG key ID: B1C5A64B80691E45
2 changed files with 5 additions and 5 deletions

View file

@ -152,7 +152,7 @@ pub const XMRIG_ADDRESS: &str = "Specify which Monero address to send payouts to
pub const XMRIG_NAME: &str = "Add a unique name to identify this pool; Only [A-Za-z0-9-_] and spaces allowed; Max length = 30 characters"; pub const XMRIG_NAME: &str = "Add a unique name to identify this pool; Only [A-Za-z0-9-_] and spaces allowed; Max length = 30 characters";
pub const XMRIG_IP: &str = "Specify the pool IP to connect to with XMRig; It must be a valid IPv4 address or a valid domain name; Max length = 255 characters"; pub const XMRIG_IP: &str = "Specify the pool IP to connect to with XMRig; It must be a valid IPv4 address or a valid domain name; Max length = 255 characters";
pub const XMRIG_PORT: &str = "Specify the port of the pool; [1-65535]"; pub const XMRIG_PORT: &str = "Specify the port of the pool; [1-65535]";
pub const XMRIG_RIG: &str = "Add a unique rig ID. This will be the name shown on the pool; Only [A-Za-z0-9-_] and spaces allowed; Max length = 30 characters"; pub const XMRIG_RIG: &str = "Add an optional rig ID. This will be the name shown on the pool; Only [A-Za-z0-9-_] and spaces allowed; Max length = 30 characters";
pub const XMRIG_PAUSE: &str = "THIS SETTING IS DISABLED IF SET TO [0]. Pause mining if user is active, resume after"; pub const XMRIG_PAUSE: &str = "THIS SETTING IS DISABLED IF SET TO [0]. Pause mining if user is active, resume after";
pub const XMRIG_API_IP: &str = "Specify which IP to bind to for XMRig's HTTP API"; pub const XMRIG_API_IP: &str = "Specify which IP to bind to for XMRig's HTTP API";
pub const XMRIG_API_PORT: &str = "Specify which port to bind to for XMRig's HTTP API"; pub const XMRIG_API_PORT: &str = "Specify which port to bind to for XMRig's HTTP API";

View file

@ -201,7 +201,7 @@ impl Xmrig {
ComboBox::from_id_source("manual_pool").selected_text(RichText::text_style(text, Monospace)).show_ui(ui, |ui| { ComboBox::from_id_source("manual_pool").selected_text(RichText::text_style(text, Monospace)).show_ui(ui, |ui| {
let mut n = 0; let mut n = 0;
for (name, pool) in pool_vec.iter() { for (name, pool) in pool_vec.iter() {
let text = RichText::text_style(RichText::new(format!("{}. {}\n RIG: {}\n IP: {}\n PORT: {}\n", n+1, name, pool.rig, pool.ip, pool.port)), Monospace); let text = RichText::text_style(RichText::new(format!("{}. {}\n IP: {}\n Port: {}\n Rig: {}", n+1, name, pool.ip, pool.port, pool.rig)), Monospace);
if ui.add(SelectableLabel::new(self.selected_name == *name, text)).clicked() { if ui.add(SelectableLabel::new(self.selected_name == *name, text)).clicked() {
self.selected_index = n; self.selected_index = n;
let pool = pool.clone(); let pool = pool.clone();
@ -245,7 +245,7 @@ impl Xmrig {
port: self.port.clone(), port: self.port.clone(),
}; };
pool_vec[existing_index].1 = pool; pool_vec[existing_index].1 = pool;
info!("Node | S | [index: {}, name: \"{}\", rig: \"{}\", ip: \"{}\", pool: {}]", existing_index+1, self.name, self.rig, self.ip, self.port); info!("Node | S | [index: {}, name: \"{}\", ip: \"{}\", port: {}, rig: \"{}\"]", existing_index+1, self.name, self.ip, self.port, self.rig);
} }
// Else, add to the list // Else, add to the list
} else { } else {
@ -262,7 +262,7 @@ impl Xmrig {
self.selected_rig = self.rig.clone(); self.selected_rig = self.rig.clone();
self.selected_ip = self.ip.clone(); self.selected_ip = self.ip.clone();
self.selected_port = self.port.clone(); self.selected_port = self.port.clone();
info!("Node | A | [index: {}, name: \"{}\", rig: \"{}\", ip: \"{}\", port: {}]", pool_vec_len, self.name, self.rig, self.ip, self.port); info!("Node | A | [index: {}, name: \"{}\", ip: \"{}\", port: {}, rig: \"{}\"]", pool_vec_len, self.name, self.ip, self.port, self.rig);
} }
} }
}); });
@ -294,7 +294,7 @@ impl Xmrig {
self.rig = new_pool.rig; self.rig = new_pool.rig;
self.ip = new_pool.ip; self.ip = new_pool.ip;
self.port = new_pool.port; self.port = new_pool.port;
info!("Node | D | [index: {}, name: \"{}\", rig: \"{}\", ip: \"{}\", port: {}]", self.selected_index, self.selected_name, self.selected_rig, self.selected_ip, self.selected_port); info!("Node | D | [index: {}, name: \"{}\", ip: \"{}\", port: {}, rig\"{}\"]", self.selected_index, self.selected_name, self.selected_ip, self.selected_port, self.selected_rig);
} }
}); });
ui.horizontal(|ui| { ui.horizontal(|ui| {