<commit_before>package org.jboss.as.console.client.domain.hosts;

import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import org.jboss.as.console.client.domain.model.Server;
import org.jboss.as.console.client.shared.general.SocketTable;
import org.jboss.as.console.client.shared.general.model.SocketBinding;
import org.jboss.as.console.client.widgets.ContentHeaderLabel;

import java.util.List;

/**
 * @author <NAME>
 * @date 6/7/11
 */
public class EffectivePortsDialogue {

    private List<SocketBinding> socketBindings;
    private ServerConfigPresenter presenter;
    private Server server;

    public EffectivePortsDialogue(ServerConfigPresenter presenter, List<SocketBinding> socketBindings, Server selectedRecord) {

        this.presenter = presenter;
        this.socketBindings = socketBindings;
        this.server = selectedRecord;
    }

    public Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");
        layout.getElement().setAttribute("style", "padding:15px;");

        layout.add(new ContentHeaderLabel("Effective ports on server: "+server.getName()));

        SocketTable socketTable = new SocketTable(server.getPortOffset());
        ScrollPanel scroll = new ScrollPanel(socketTable.asWidget());
        layout.add(scroll);
        socketTable.updateFrom("none", socketBindings);

        return layout;
    }
}<commit_msg>add pager to effective ports<commit_after>package org.jboss.as.console.client.domain.hosts;

import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import org.jboss.as.console.client.domain.model.Server;
import org.jboss.as.console.client.shared.general.SocketTable;
import org.jboss.as.console.client.shared.general.model.SocketBinding;
import org.jboss.as.console.client.widgets.ContentHeaderLabel;
import org.jboss.as.console.client.widgets.DefaultPager;
import org.jboss.as.console.client.widgets.tables.DefaultCellTable;

import java.util.List;

/**
 * @author <NAME>
 * @date 6/7/11
 */
public class EffectivePortsDialogue {

    private List<SocketBinding> socketBindings;
    private ServerConfigPresenter presenter;
    private Server server;

    public EffectivePortsDialogue(ServerConfigPresenter presenter, List<SocketBinding> socketBindings, Server selectedRecord) {

        this.presenter = presenter;
        this.socketBindings = socketBindings;
        this.server = selectedRecord;
    }

    public Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");
        layout.getElement().setAttribute("style", "padding:15px;");

        layout.add(new ContentHeaderLabel("Effective ports on server: "+server.getName()));

        SocketTable socketTable = new SocketTable(server.getPortOffset());
        DefaultCellTable tableWidget = socketTable.asWidget();
        ScrollPanel scroll = new ScrollPanel(tableWidget);
        layout.add(scroll);
        socketTable.updateFrom("none", socketBindings);

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(tableWidget);

        layout.add(pager);
        return layout;
    }
}
{'fraction_non_alphanumeric': 0.11167664670658682, 'fraction_numerical': 0.003592814371257485, 'mean_word_length': 4.001497005988024, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1468290', 'n_tokens_mistral': 995, 'n_tokens_neox': 944, 'n_words': 169}