@@ -103,7 +103,16 @@ exports.init = function (cli) {
103103
104104 cli . interaction . formatOutput ( records , function ( data ) {
105105 if ( data . length > 0 ) {
106- log . table ( data , function ( row , item ) {
106+ var customRecords = data . filter ( function ( r ) {
107+ return ! r . system_record ;
108+ } ) ;
109+
110+ var systemRecords = data . filter ( function ( r ) {
111+ return r . system_record ;
112+ } ) ;
113+
114+ log . info ( $ ( 'Custom Records:' ) ) ;
115+ log . table ( customRecords , function ( row , item ) {
107116 //if (options.details) {
108117 row . cell ( $ ( 'Id' ) , item . id ) ;
109118 //}
@@ -112,6 +121,17 @@ exports.init = function (cli) {
112121 row . cell ( $ ( 'TTL' ) , item . ttl ) ;
113122 row . cell ( $ ( 'Content' ) , item . content . length > 50 ? item . content . substr ( 0 , 50 ) + '...' : item . content ) ;
114123 } ) ;
124+ log . info ( '' ) ;
125+ log . info ( $ ( 'System Records (cannot be edited):' ) ) ;
126+ log . table ( systemRecords , function ( row , item ) {
127+ //if (options.details) {
128+ //row.cell($('Id'), item.id);
129+ //}
130+ row . cell ( $ ( 'Type' ) , item . record_type ) ;
131+ row . cell ( $ ( 'Name' ) , item . name || context . domain . name ) ;
132+ row . cell ( $ ( 'TTL' ) , item . ttl ) ;
133+ row . cell ( $ ( 'Content' ) , item . content . length > 50 ? item . content . substr ( 0 , 50 ) + '...' : item . content ) ;
134+ } ) ;
115135 } else {
116136 log . info ( $ ( 'No records defined yet' ) ) ;
117137 }
0 commit comments