| | |
| | |
|
| | | private JTextField filterTextfield;
|
| | |
|
| | | private JButton clearCache;
|
| | |
|
| | | public RepositoriesPanel(GitblitClient gitblit) {
|
| | | super();
|
| | | this.gitblit = gitblit;
|
| | |
| | | refreshRepositories.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent e) {
|
| | | refreshRepositories();
|
| | | }
|
| | | });
|
| | | |
| | | clearCache = new JButton(Translation.get("gb.clearCache"));
|
| | | clearCache.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent e) {
|
| | | clearCache();
|
| | | }
|
| | | });
|
| | |
|
| | |
| | | repositoryTablePanel.add(new JScrollPane(table), BorderLayout.CENTER);
|
| | |
|
| | | JPanel repositoryControls = new JPanel(new FlowLayout(FlowLayout.CENTER, Utils.MARGIN, 0));
|
| | | repositoryControls.add(clearCache);
|
| | | repositoryControls.add(refreshRepositories);
|
| | | repositoryControls.add(browseRepository);
|
| | | repositoryControls.add(createRepository);
|
| | |
| | | protected abstract void updateTeamsTable();
|
| | |
|
| | | protected void disableManagement() {
|
| | | clearCache.setVisible(false);
|
| | | createRepository.setVisible(false);
|
| | | editRepository.setVisible(false);
|
| | | delRepository.setVisible(false);
|
| | |
| | | };
|
| | | worker.execute();
|
| | | }
|
| | | |
| | | protected void clearCache() {
|
| | | GitblitWorker worker = new GitblitWorker(RepositoriesPanel.this,
|
| | | RpcRequest.CLEAR_REPOSITORY_CACHE) {
|
| | | @Override
|
| | | protected Boolean doRequest() throws IOException {
|
| | | if (gitblit.clearRepositoryCache()) {
|
| | | gitblit.refreshRepositories();
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected void onSuccess() {
|
| | | updateTable(false);
|
| | | }
|
| | | };
|
| | | worker.execute();
|
| | | }
|
| | |
|
| | | /**
|
| | | * Displays the create repository dialog and fires a SwingWorker to update
|
| | |
| | | EditRepositoryDialog dialog = new EditRepositoryDialog(gitblit.getProtocolVersion());
|
| | | dialog.setLocationRelativeTo(RepositoriesPanel.this);
|
| | | dialog.setAccessRestriction(gitblit.getDefaultAccessRestriction());
|
| | | dialog.setAuthorizationControl(gitblit.getDefaultAuthorizationControl());
|
| | | dialog.setUsers(null, gitblit.getUsernames(), null);
|
| | | dialog.setTeams(gitblit.getTeamnames(), null);
|
| | | dialog.setRepositories(gitblit.getRepositories());
|