34 lines
983 B
Plaintext
34 lines
983 B
Plaintext
fn fill_space(text, len) {
|
|
let s = text.to_string();
|
|
while s.len < len {
|
|
s += " ";
|
|
}
|
|
return s;
|
|
}
|
|
|
|
let lines = [];
|
|
lines.push("==================================================");
|
|
lines.push(" TETANUS SYSTEM INFORMATION");
|
|
lines.push("==================================================");
|
|
lines.push("");
|
|
lines.push("[Settings]");
|
|
let keys = config.keys();
|
|
for k in keys {
|
|
lines.push("- " + k + ": " + config[k]);
|
|
}
|
|
lines.push("");
|
|
lines.push("[Active Projects]");
|
|
lines.push(fill_space("Customer Name", 20) + " | " + fill_space("Project Name", 20) + " | Stage");
|
|
lines.push("--------------------------------------------------");
|
|
for p in projects {
|
|
let customer = p.org_name;
|
|
let name = p.name;
|
|
let stage = "upcoming";
|
|
if p.current == true{
|
|
stage = "current";
|
|
}
|
|
lines.push(fill_space(customer, 20) + " | " + fill_space(name, 20) + " | " + stage);
|
|
}
|
|
lines.push("--------------------------------------------------");
|
|
lines;
|