Skip to content

Commit 7e0b024

Browse files
committed
update readme; improve gui config settings
1 parent 4970ed4 commit 7e0b024

File tree

4 files changed

+47
-65
lines changed

4 files changed

+47
-65
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ RUST_LOG=warn cargo cli -- delete teststaff123
103103
# Add user in LDAP only
104104
cargo cli --ldap true --slurm false --dirs false add teststaff123 --group staff --firstname Martina --lastname Musterfrau
105105

106-
# Specify key pair for ssh connection
106+
# Specify key pair for SSH connection
107107
# Example of listing all users while using key pair at "~/.ssh/some_user.pub" and "~/.ssh/some_user"
108108
cargo cli list --ssh-path "~/.ssh/some_user"
109109

@@ -148,7 +148,7 @@ dpkg -i ../target/debian/*.deb
148148

149149
## GUI
150150

151-
We also provide a GUI version of this tool.
151+
We also provide an experimental GUI version.
152152
More information can be found under the [GUI README](./usermgmt_gui/README.md).
153153

154154
You can start the GUI version via the following command:
@@ -352,10 +352,9 @@ run_slurm_remote = true
352352
ssh_port = 22
353353
# If true, the application will try to authenticate via SSH agent before the simple password authentication
354354
ssh_agent = false
355-
# Path to ssh key pair to be used if no ssh agent is used.
355+
# Path to SSH key pair to be used if no SSH agent is used.
356356
# Path points to base name of the private and public key.
357-
# Example: With path "~/.shh/some_key_pair", there should be private key named "~/.shh/some_key_pair"
358-
# and public key "~/.shh/some_key_pair.pub"
357+
# Example: For private key ~/.ssh/some_key_pair, there should be a corresponding public key "~/.ssh/some_key_pair.pub"
359358
ssh_key_path = "~/.ssh/some_key_pair"
360359
```
361360

@@ -382,7 +381,7 @@ usermgmt delete teststaff123
382381
### Adding Users
383382

384383
The uid integer value will be automatically determined based on the `--group` parameter provided.
385-
Currently you can choose between the two groups *staff* and *student*.
384+
Currently, you can choose between the two groups *staff* and *student*.
386385

387386
The uid for a new user will be determined based on the following rules:
388387
- Uids for *staff* start with 1000
@@ -416,19 +415,19 @@ This project currently consists of 3 crates:
416415

417416
To preserve the backwards compatibility with earlier versions, this features must be opted in.
418417

419-
Setup the use of creation dates in LDAP via:
418+
Set up the use of creation dates in LDAP via:
420419

421420
1. Set the field value `ldap_add_created_at` to `true` in `conf.toml`.
422421
2. Add the value `createdAtRole` to `objectclass_common` in `conf.toml`.
423422

424423
### Use SSH agent for authentication
425424

426-
To save yourself entering passwords for SSH authentication again and again,
425+
To save yourself from entering passwords for SSH authentication over and over again,
427426
you can let the application use a running SSH agent.
428427

429428
Activate this feature via setting the field `ssh_agent` to `true` in `conf.toml`.
430429

431-
Start your SSH agent in the terminal via the command (often started automatically):
430+
Start your SSH agent in the terminal via the command (often started automatically during system boot):
432431

433432
```sh
434433
ssh-agent
@@ -447,7 +446,7 @@ and does not ask for a password.
447446
If more than one key is registered within the agent,
448447
you will be prompted to select the key you want to use.
449448

450-
**Additional steps on macOS:**
449+
**Additional optional steps on macOS:**
451450

452451
Ensure macOS remembers the key (optional, via Keychain):
453452

@@ -466,7 +465,6 @@ Host *
466465
This integrates with the macOS keychain and ensures the key is added automatically.
467466

468467

469-
470468
### Show more logs
471469

472470
The log-level can be changed using the `RUST_LOG` environment variable.
@@ -480,24 +478,16 @@ You'll receive the most verbose output when you set it to *debug*.
480478
RUST_LOG=debug usermgmt delete teststaff123
481479
```
482480

483-
The application also tries to write logs to logging file.
484-
The application writes to a logs file within the data folder of the application according to the convention of the used OS.
485-
If this is not possible, it tries to log within the same folder of the executable of this application.
486-
If that fails too, the application only writes to the terminal via stderr.
487-
See the [docs](https://docs.rs/dirs/latest/dirs/fn.data_dir.html) of this rust crate for details about this convention.
481+
The application also tries to write logs to a log file.
482+
Logs are written in the data folder of the application according to the convention of the used OS.
483+
If this is not possible, it tries to log to the location of the executable.
484+
If this also fails, the application only writes to the terminal via stderr.
485+
See the [docs of this crate](https://docs.rs/dirs/latest/dirs/fn.data_dir.html) for details.
488486

489487
### Show stack trace in case of error
490488

491-
Many of the errors, reported by the application, can also shown with their stack trace.
492-
The stack trace is quite useful for locating the place in the code where the error was caused.
493-
This is especially handy for debugging.
494-
By default the stack trace in Rust is disabled though.
495-
You need to set the environmental variable named "RUST_BACKTRACE" to 1.
496-
This can be accomplished via this command in the terminal.
497-
498-
```bash
499-
export RUST_BACKTRACE=1
500-
```
489+
Errors reported by the application, can be displayed including their stack trace.
490+
Since the stack trace is disabled by default, you need to set the environment variable `RUST_BACKTRACE=1`.
501491

502492
## Pitfalls
503493

usermgmt_gui/README.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
1-
# Readme
1+
# Usermgmt GUI
22

3-
This crate is an application which allows simultaneous user management for LDAP and Slurm
4-
via GUI.
5-
6-
This application utilizes [egui](https://github.com/emilk/egui) as the GUI framework.
3+
This application utilizes [egui](https://github.com/emilk/egui).
74

85
## License
96

10-
The whole project is licensed under [MIT](./LICENSE)
7+
The project is licensed under [MIT](./LICENSE)
118

129
## Development
1310

14-
You can run this application by running the following command
11+
You can run the GUI with:
1512

1613
```bash
1714
cargo gui
1815
```
1916

20-
## GUI settings
21-
22-
Options which determine the look of the GUI are determined by values contained
23-
within certain configuration files under assets.
17+
## GUI Settings
2418

25-
There are two files
19+
The GUI layout can be configured with the following two files:
2620

2721
- [Init file](./assets/Init.toml): Only loaded at the start of the application.
28-
- [Settings file](./assets/Settings.toml): Loaded at the start of the application.
29-
During development, this file is also loaded whenever its content changes. This hot reload feature
30-
while developing allows to see the changes in the GUI immediately.
22+
- [Settings file](./assets/Settings.toml): Loaded at the start of the application.
23+
- During development, this file is loaded whenever its content changes.
3124

32-
Note: In release the reload feature of the [Settings file](./assets/Settings.toml) is not active.
33-
This program includes both files into the resulting binary at compile time.
34-
So user of the application do not need to worry about having theses files on their system.
25+
**Note:** In release mode the reload feature of the [Settings file](./assets/Settings.toml) is not active.
26+
This program includes both files into the resulting binary at compile time.
3527

36-
## Additional information
28+
## Additional Information
3729

3830
The [GENERAL_README](./GENERAL_README.md) describes the other crates and the general structure
39-
of the whole project.
31+
of the project.

usermgmt_gui/assets/Settings.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file contains all settings which are set at the start of the GUI application
1+
# This file contains all settings that are set at the start of the GUI application
22
# and reloaded if content changes during development.
33

44
box_label_font_size = 28.0
@@ -10,23 +10,23 @@ tooltip_size = 20.0
1010
tooltip_symbol = "?"
1111

1212
[tooltiptexts]
13-
ldap_creds = "Credentials for logging in to manage of LDAP users"
14-
ldap_readonly_creds = "Credentials for logging in to perform readonly operation on LDAP users"
15-
ssh_creds = "Credentials for logging in to manage SLURM users"
16-
list_ldap_btn = "List users saved within LDAP database"
17-
list_ssh_btn = "List users saved within Slurm database"
18-
username = "Name which is used as the identifier to determine a specific user in the LDAP/Slurm database. Note: This must be unique among all users"
19-
firstname = "Firstname of an user"
20-
lastname = "Lastname of an user"
21-
email = "Email which is to be used to contact an user"
22-
pub_key = "Public ssh key which needs to be saved to LDPA database so an user can log into the cluster"
23-
group = "Name of group which an user belongs to"
24-
default_qos = "Default quility of service of an user"
25-
qos = "All the quilities of services under which an user can run a job"
26-
conf_student_qos = "Which quality of services are applied for a student by default"
13+
ldap_creds = "LDAP credentials"
14+
ldap_readonly_creds = "LDAP readonly credentials"
15+
ssh_creds = "SSH credentials"
16+
list_ldap_btn = "List users stored in LDAP database"
17+
list_ssh_btn = "List users stored in Slurm database"
18+
username = "Name used as the identifier to determine a specific user in the LDAP/Slurm database. Note: This must be unique among all users"
19+
firstname = "Firstname of a user"
20+
lastname = "Lastname of a user"
21+
email = "Email address of the user"
22+
pub_key = "SSH public key that is to be stored in LDAP"
23+
group = "Name of group the user belongs to"
24+
default_qos = "Default quality of service (QoS) of a user"
25+
qos = "All QoS the user can use to run jobs"
26+
conf_student_qos = "Default QoS for students"
2727
conf_student_default_qos = "Which default Quality of service are used for a student"
2828
conf_run_slurm_remote = "Run slurm command on remote nodes instead on your own local computer."
29-
conf_ssh_port = "Port used for ssh connection"
29+
conf_ssh_port = "Port used for SSH connection"
3030
conf_staff_default_qos = "Default value of the Slurm default QOS for the staff group"
3131
conf_default_ssh_user = "Default user for SSH login during directory management"
3232
conf_head_node = """Slurm head node (where sacctmgr is installed, remote or locally on the machine).
@@ -113,7 +113,7 @@ dir_conf_path = "Path to directory with the file called conf.toml"
113113
general_status = "Status"
114114
required = "Required"
115115
optional = "Optional"
116-
readonly_ldap_cred = "Ldap readonly credentials"
116+
readonly_ldap_cred = "LDAP readonly credentials"
117117
status_list_slurm = "Status of listing Slurm users"
118118
status_list_ldap = "Status of listing LDAP users"
119119
username = "Username"

0 commit comments

Comments
 (0)