From a70b43cde76b4baab82b4ce0d9ff82883f80b8df Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Wed, 26 Oct 2011 17:54:07 -0400 Subject: [PATCH] Added status icon --- src/com/gitblit/client/GitblitClient.java | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/com/gitblit/client/GitblitClient.java b/src/com/gitblit/client/GitblitClient.java index d3a92b0..9f4dd3e 100644 --- a/src/com/gitblit/client/GitblitClient.java +++ b/src/com/gitblit/client/GitblitClient.java @@ -23,7 +23,9 @@ import java.util.Map; import com.gitblit.GitBlitException.ForbiddenException; +import com.gitblit.GitBlitException.NotAllowedException; import com.gitblit.GitBlitException.UnauthorizedException; +import com.gitblit.GitBlitException.UnknownRequestException; import com.gitblit.Keys; import com.gitblit.models.FederationModel; import com.gitblit.models.RepositoryModel; @@ -78,21 +80,25 @@ try { refreshUsers(); + refreshSettings(); allowManagement = true; } catch (UnauthorizedException e) { } catch (ForbiddenException e) { + } catch (NotAllowedException e) { + } catch (UnknownRequestException e) { } catch (IOException e) { - System.err.println(e.getMessage()); + e.printStackTrace(); } try { - refreshSettings(); - status = RpcUtils.getStatus(url, account, password); + refreshStatus(); allowAdministration = true; } catch (UnauthorizedException e) { } catch (ForbiddenException e) { + } catch (NotAllowedException e) { + } catch (UnknownRequestException e) { } catch (IOException e) { - System.err.println(e.getMessage()); + e.printStackTrace(); } } @@ -142,6 +148,11 @@ return settings; } + public ServerStatus refreshStatus() throws IOException { + status = RpcUtils.getStatus(url, account, password); + return status; + } + public List<FederationModel> refreshFederationRegistrations() throws IOException { List<FederationModel> list = RpcUtils.getFederationRegistrations(url, account, password); federationRegistrations.clear(); -- Gitblit v1.9.1