'.__('metaconsole').''; } else { $url = __('any node'); } ui_print_warning_message( __( 'This node is configured with centralized mode. All OS definitions are read only. Go to %s to manage them.', $url ) ); } // Datatables list. try { $columns = [ 'id_os', 'icon_img', 'name', 'description', 'options', ]; $column_names = [ [ 'text' => __('ID'), 'class' => 'w50px table_action_buttons', ], [ 'text' => __('Icon'), 'class' => 'w10px table_action_buttons', ], __('Name'), __('Description'), [ 'text' => __('Options'), 'class' => 'w20px table_action_buttons', ], ]; $tableId = 'os_table'; // Load datatables user interface. ui_print_datatable( [ 'id' => $tableId, 'class' => 'info_table', 'style' => 'width: 100%', 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => 'include/ajax/os', 'ajax_data' => ['method' => 'drawOSTable'], 'pagination_options' => [ [ $config['block_size'], 10, 25, 100, 200, 500, ], [ $config['block_size'], 10, 25, 100, 200, 500, ], ], 'ajax_postprocess' => 'process_datatables_item(item)', 'no_sortable_columns' => [ -1, 1, ], 'order' => [ 'field' => 'id', 'direction' => 'asc', ], 'search_button_class' => 'sub filter float-right', 'form' => [ 'inputs' => [ [ 'label' => __('Free search'), 'type' => 'text', 'class' => 'w25p', 'id' => 'free_search', 'name' => 'free_search', ], ], ], 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', 'dom_elements' => 'lftpB', ] ); } catch (Exception $e) { echo $e->getMessage(); } $buttons = ''; if (is_metaconsole() === true) { $buttons .= '
'; $buttons .= html_print_submit_button( __('Create OS'), '', false, ['icon' => 'next'], true ); $buttons .= '
'; } else { $buttons .= '
'; $buttons .= html_print_submit_button(__('Create OS'), 'update_button', false, ['icon' => 'next'], true); $buttons .= '
'; } html_print_action_buttons( $buttons, [ 'type' => 'data_table', 'class' => 'fixed_action_buttons', ] ); echo ''; ?>