Software / code / prosody
Comparison
plugins/mod_admin_shell.lua @ 12226:7db81c9cbbbf
mod_admin_shell: Fix traceback on rendering graph of stats without extra labels
Stops an error when extra_labels is nil since it attempts to index it
Unsure about correctness
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 29 Jan 2022 15:01:38 +0100 |
| parent | 12225:e9f34a04067e |
| child | 12228:f60f9cd9d26c |
comparison
equal
deleted
inserted
replaced
| 12225:e9f34a04067e | 12226:7db81c9cbbbf |
|---|---|
| 1651 creation_timestamp = value | 1651 creation_timestamp = value |
| 1652 elseif suffix == "_sum" then | 1652 elseif suffix == "_sum" then |
| 1653 sum = value | 1653 sum = value |
| 1654 elseif suffix == "_count" then | 1654 elseif suffix == "_count" then |
| 1655 count = value | 1655 count = value |
| 1656 else | 1656 elseif extra_labels then |
| 1657 local bucket_threshold = extra_labels["le"] | 1657 local bucket_threshold = extra_labels["le"] |
| 1658 local bucket_count | 1658 local bucket_count |
| 1659 if cumulative then | 1659 if cumulative then |
| 1660 bucket_count = value | 1660 bucket_count = value |
| 1661 else | 1661 else |