user, true); $node_list = []; foreach ($nodes as $node) { $node_list[] = [ 'id' => $node->id, 'name' => $node->name, 'class' => (int) $node->node_class, 'color' => $node->color, 'connection_type' => $node->connection_type, 'sort' => $node->sort(), 'online_user' => $node->online_user, 'online' => $node->getNodeOnlineStatus(), 'traffic_rate' => $node->traffic_rate, 'is_dynamic_rate' => $node->is_dynamic_rate, 'node_bandwidth' => Tools::autoBytes($node->node_bandwidth), 'node_bandwidth_limit' => $node->node_bandwidth_limit === 0 ? '无限制' : Tools::autoBytes($node->node_bandwidth_limit), ]; } return $response->write( $this->view() ->assign('servers', $node_list) ->fetch('user/server.tpl') ); } }