'options', 'class' => 'action_buttons', ], ]; $column_names = [ __('Name'), __('Description'), __('Group'), __('Type'), __('Nodes'), __('Status'), __('Options'), ]; $tableId = 'clusters'; // Load datatables user interface. ui_print_datatable( [ 'id' => $tableId, 'class' => 'info_table', 'style' => 'width: 100%', 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => $model->ajaxController, 'ajax_data' => ['method' => 'draw'], 'no_sortable_columns' => [-1], 'order' => [ 'field' => 'known_status', 'direction' => 'asc', ], 'search_button_class' => 'sub filter float-right', 'form' => [ 'inputs' => [ [ 'label' => __('Filter group'), 'name' => 'id_group', 'returnAllGroup' => true, 'privilege' => 'AR', 'type' => 'select_groups', 'return' => true, 'size' => '250px', ], [ 'label' => __('Free search'), 'type' => 'text', 'class' => 'mw250px', 'id' => 'free_search', 'name' => 'free_search', ], ], ], ] ); } catch (Exception $e) { echo $e->getMessage(); } if (check_acl($config['id_user'], 0, 'AW')) { HTML::printForm( [ 'form' => [ 'method' => 'POST', 'action' => ui_get_full_url($model->url.'&op=new'), ], 'inputs' => [ [ 'class' => 'w100p', 'arguments' => [ 'name' => 'submit', 'label' => __('New cluster'), 'type' => 'submit', 'attributes' => 'class="sub next"', 'return' => true, ], ], ], ] ); }