Virtual machine Management Terminal User Interface
リビジョン | 1f89ee612f7c90f4831a8278244103cc7ec84688 (tree) |
---|---|
日時 | 2022-07-18 20:30:02 |
作者 | ![]() |
コミッター | Koine Yuusuke(koinec) |
Support HyperVisor Connecting Animation.
@@ -85,11 +85,12 @@ int | ||
85 | 85 | if( has_colors() ) { |
86 | 86 | start_color(); |
87 | 87 | // init_pair( 0, COLOR_WHITE, COLOR_BLACK ); // VMList Guest |
88 | - init_pair( 1, COLOR_WHITE, COLOR_BLACK ); // VMList Guest | |
89 | - init_pair( 2, COLOR_GREEN, COLOR_BLACK ); // VMList HVisor (Running) | |
90 | - init_pair( 3, COLOR_CYAN, COLOR_BLACK ); // VMList Guest (Running) | |
91 | - init_pair( 4, COLOR_YELLOW, COLOR_BLACK ); // VMList Guest (Others) | |
92 | - init_pair( 5, COLOR_RED, COLOR_BLACK ); // VMList HVisor (Not Running) | |
88 | + init_pair( 1, COLOR_WHITE, COLOR_BLACK ); // VMList Guest | |
89 | + init_pair( 2, COLOR_GREEN, COLOR_BLACK ); // VMList HVisor (Running) | |
90 | + init_pair( 3, COLOR_CYAN, COLOR_BLACK ); // VMList Guest (Running) | |
91 | + init_pair( 4, COLOR_YELLOW, COLOR_BLACK ); // VMList Guest (Others) | |
92 | + init_pair( 5, COLOR_RED, COLOR_BLACK ); // VMList HVisor (Not Running) | |
93 | + init_pair( 6, COLOR_MAGENTA, COLOR_BLACK ); // VMList HVisor (Connecting) | |
93 | 94 | init_pair( 10, COLOR_YELLOW, COLOR_BLUE ); // VmTui Title Line |
94 | 95 | init_pair( 11, COLOR_WHITE, COLOR_BLUE ); // Guest Info Title Line |
95 | 96 | init_pair( 12, COLOR_GREEN, COLOR_BLUE ); // HVisor Info Title Line |
@@ -219,6 +219,16 @@ int | ||
219 | 219 | strncpy( str_stat, "* ONLINE", 15 ); |
220 | 220 | i_attr = COLOR_PAIR(2); // Green-Black |
221 | 221 | } |
222 | + else if( HVISOR_STATUS_CONNECTING & p_hvisor->dw_status ) { | |
223 | + if( 2 < p_item->i_animation ) { p_item->i_animation = 0; } | |
224 | + str_stat[0] = ((0 == p_item->i_animation) ? '-' : | |
225 | + ((1 == p_item->i_animation) ? '\\' : '/')); | |
226 | + str_stat[1] = '\0'; | |
227 | + strncat( str_stat, " Connecting.", 15 ); | |
228 | + p_item->i_animation++; | |
229 | + | |
230 | + i_attr = COLOR_PAIR(6); // Green-Black | |
231 | + } | |
222 | 232 | else { |
223 | 233 | strncpy( str_stat, "X NotConnect", 15 ); |
224 | 234 | i_attr = COLOR_PAIR(5); // Red-Black |
@@ -37,6 +37,7 @@ typedef struct { | ||
37 | 37 | int i_hvisor; |
38 | 38 | int i_guest; |
39 | 39 | int i_subitems; |
40 | + int i_animation; | |
40 | 41 | } VmList_Item; |
41 | 42 | |
42 | 43 |