@@ -19,7 +19,8 @@ def cli(env):
1919 result = manager .get_network_message_delivery_accounts ()
2020
2121 table = formatting .KeyValueTable (['name' , 'value' ])
22-
22+ table .align ['name' ] = 'r'
23+ table .align ['value' ] = 'l'
2324 table_information = formatting .KeyValueTable (['id' , 'username' , 'hostname' , 'description' , 'vendor' ])
2425 table_information .align ['id' ] = 'r'
2526 table_information .align ['username' ] = 'l'
@@ -32,38 +33,33 @@ def cli(env):
3233 overview_table = _build_overview_table (email_manager .get_account_overview (email .get ('id' )))
3334 statistics = email_manager .get_statistics (email .get ('id' ))
3435
35- table .add_row (['email information ' , table_information ])
36- table .add_row (['email overview ' , overview_table ])
36+ table .add_row (['email_information ' , table_information ])
37+ table .add_row (['email_overview ' , overview_table ])
3738 for statistic in statistics :
3839 table .add_row (['statistics' , _build_statistics_table (statistic )])
3940
4041 env .fout (table )
4142
4243
4344def _build_overview_table (email_overview ):
44- table = formatting .Table (['name ' , 'value ' ])
45+ table = formatting .Table (['credit_Allowed ' , 'credits_Remain' , 'package' , 'reputation' , 'requests ' ])
4546 table .align ['name' ] = 'r'
4647 table .align ['value' ] = 'l'
4748
48- table .add_row (['creditsAllowed' , email_overview .get ('creditsAllowed' )])
49- table .add_row (['creditsRemain' , email_overview .get ('creditsRemain' )])
50- table .add_row (['package' , email_overview .get ('package' )])
51- table .add_row (['reputation' , email_overview .get ('reputation' )])
52- table .add_row (['requests' , email_overview .get ('requests' )])
49+ table .add_row ([email_overview .get ('creditsAllowed' ), email_overview .get ('creditsRemain' ),
50+ email_overview .get ('package' ), email_overview .get ('reputation' ),
51+ email_overview .get ('requests' )])
5352
5453 return table
5554
5655
5756def _build_statistics_table (statistics ):
58- table = formatting .Table (['name ' , 'value ' ])
57+ table = formatting .Table (['delivered ' , 'requests' , 'bounces' , 'opens' , 'clicks' , 'spamReports ' ])
5958 table .align ['name' ] = 'r'
6059 table .align ['value' ] = 'l'
6160
62- table .add_row (['delivered' , statistics .get ('delivered' )])
63- table .add_row (['requests' , statistics .get ('requests' )])
64- table .add_row (['bounces' , statistics .get ('bounces' )])
65- table .add_row (['opens' , statistics .get ('opens' )])
66- table .add_row (['clicks' , statistics .get ('clicks' )])
67- table .add_row (['spam Reports' , statistics .get ('spamReports' )])
61+ table .add_row ([statistics .get ('delivered' ), statistics .get ('requests' ),
62+ statistics .get ('bounces' ), statistics .get ('opens' ),
63+ statistics .get ('clicks' ), statistics .get ('spamReports' )])
6864
6965 return table
0 commit comments