Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
fb589eba
Unverified
Commit
fb589eba
authored
Oct 14, 2016
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-1205: Show message on admin console when plugins are being processed.
parent
763f626c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
49 deletions
+59
-49
openfire_i18n_en.properties
src/i18n/openfire_i18n_en.properties
+4
-4
PluginManager.java
...va/org/jivesoftware/openfire/container/PluginManager.java
+5
-0
PluginMonitor.java
...va/org/jivesoftware/openfire/container/PluginMonitor.java
+12
-0
plugin-admin.jsp
src/web/plugin-admin.jsp
+38
-45
No files found.
src/i18n/openfire_i18n_en.properties
View file @
fb589eba
...
@@ -2584,14 +2584,14 @@ plugin.admin.info=Plugins add new functionality to the server. The list of plugi
...
@@ -2584,14 +2584,14 @@ plugin.admin.info=Plugins add new functionality to the server. The list of plugi
<a href="available-plugins.jsp">Available Plugins</a> page.
<a href="available-plugins.jsp">Available Plugins</a> page.
plugin.admin.deleted_success
=
Plugin deleted successfully.
plugin.admin.deleted_success
=
Plugin deleted successfully.
plugin.admin.deleted_failure
=
Unable to delete plugin.
plugin.admin.deleted_failure
=
Unable to delete plugin.
plugin.admin.uploaded_success
=
Plugin uploaded successfully. It may take a short time for the
\
plugin.admin.uploaded_success
=
Plugin uploaded successfully.
plugin to appear in the list of installed plugins.
plugin.admin.uploaded_failure
=
Unable to upload plugin. See server error logs.
plugin.admin.uploaded_failure
=
Unable to upload plugin. See server error logs.
plugin.admin.upload_plugin
=
Upload Plugin
plugin.admin.upload_plugin
=
Upload Plugin
plugin.admin.upload_plugin.info
=
Plugin files (.jar) can be uploaded directly by using the form below.
plugin.admin.upload_plugin.info
=
Plugin files (.jar) can be uploaded directly by using the form below.
plugin.admin.click_reload
=
Reload the plugin.
plugin.admin.click_reload
=
Reload the plugin.
plugin.admin.reload_success
=
Plugin was successfully reloaded. It may take a short time for the
\
plugin.admin.reload_success
=
Plugin was successfully reloaded.
plugin to appear in the list of installed plugins again.
plugin.admin.reload_failure
=
Unable to reload the plugin. Refer to the log files for additional information.
plugin.admin.monitortask_running
=
The plugin manager is currently running. It may take a short time for the list of installed plugins to be complete.
plugin.admin.name
=
Plugins
plugin.admin.name
=
Plugins
plugin.admin.description
=
Description
plugin.admin.description
=
Description
plugin.admin.version
=
Version
plugin.admin.version
=
Version
...
...
src/java/org/jivesoftware/openfire/container/PluginManager.java
View file @
fb589eba
...
@@ -1047,4 +1047,9 @@ public class PluginManager
...
@@ -1047,4 +1047,9 @@ public class PluginManager
}
}
}
}
}
}
public
boolean
isMonitorTaskRunning
()
{
return
pluginMonitor
.
isTaskRunning
();
}
}
}
\ No newline at end of file
src/java/org/jivesoftware/openfire/container/PluginMonitor.java
View file @
fb589eba
...
@@ -45,6 +45,8 @@ public class PluginMonitor
...
@@ -45,6 +45,8 @@ public class PluginMonitor
private
ScheduledExecutorService
executor
;
private
ScheduledExecutorService
executor
;
private
boolean
isTaskRunning
=
false
;
public
PluginMonitor
(
final
PluginManager
pluginManager
)
public
PluginMonitor
(
final
PluginManager
pluginManager
)
{
{
this
.
pluginManager
=
pluginManager
;
this
.
pluginManager
=
pluginManager
;
...
@@ -84,6 +86,11 @@ public class PluginMonitor
...
@@ -84,6 +86,11 @@ public class PluginMonitor
}
}
}
}
public
boolean
isTaskRunning
()
{
return
isTaskRunning
;
}
/**
/**
* Immediately run a check of the plugin directory.
* Immediately run a check of the plugin directory.
*/
*/
...
@@ -111,6 +118,7 @@ public class PluginMonitor
...
@@ -111,6 +118,7 @@ public class PluginMonitor
// Prevent two tasks from running in parallel by using the plugin monitor itself as a mutex.
// Prevent two tasks from running in parallel by using the plugin monitor itself as a mutex.
synchronized
(
PluginMonitor
.
this
)
synchronized
(
PluginMonitor
.
this
)
{
{
isTaskRunning
=
true
;
try
try
{
{
// The directory that contains all plugins.
// The directory that contains all plugins.
...
@@ -319,6 +327,10 @@ public class PluginMonitor
...
@@ -319,6 +327,10 @@ public class PluginMonitor
{
{
Log
.
error
(
"An unexpected exception occurred:"
,
e
);
Log
.
error
(
"An unexpected exception occurred:"
,
e
);
}
}
finally
{
isTaskRunning
=
false
;
}
}
}
}
}
...
...
src/web/plugin-admin.jsp
View file @
fb589eba
...
@@ -37,8 +37,10 @@
...
@@ -37,8 +37,10 @@
<%@ page
import=
"org.apache.commons.fileupload.FileItem"
%>
<%@ page
import=
"org.apache.commons.fileupload.FileItem"
%>
<%@ page
import=
"org.apache.commons.fileupload.FileUploadException"
%>
<%@ page
import=
"org.apache.commons.fileupload.FileUploadException"
%>
<%@ taglib
uri=
"admin"
prefix=
"admin"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/fmt"
prefix=
"fmt"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/fmt"
prefix=
"fmt"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/functions"
prefix=
"fn"
%>
<jsp:useBean
id=
"webManager"
class=
"org.jivesoftware.util.WebManager"
/>
<jsp:useBean
id=
"webManager"
class=
"org.jivesoftware.util.WebManager"
/>
<%
webManager
.
init
(
request
,
response
,
session
,
application
,
out
);
%>
<%
webManager
.
init
(
request
,
response
,
session
,
application
,
out
);
%>
...
@@ -421,51 +423,42 @@
...
@@ -421,51 +423,42 @@
</head>
</head>
<body>
<body>
<c:if
test=
"
${
param
.
deletesuccess
eq
'true'
}
"
>
<%
if
(
"true"
.
equals
(
request
.
getParameter
(
"deletesuccess"
)))
{
%>
<admin:infobox
type=
"success"
>
<fmt:message
key=
"plugin.admin.deleted_success"
/>
<div
class=
"success"
>
</admin:infobox>
<fmt:message
key=
"plugin.admin.deleted_success"
/>
</c:if>
</div>
<c:if
test=
"
${
param
.
deletesuccess
eq
'false'
}
"
>
<br>
<admin:infobox
type=
"error"
>
<fmt:message
key=
"plugin.admin.deleted_failure"
/>
<%
}
</admin:infobox>
else
if
(
"false"
.
equals
(
request
.
getParameter
(
"deletesuccess"
)))
{
%>
</c:if>
<c:if
test=
"
${
param
.
reloadsuccess
eq
'true'
}
"
>
<div
class=
"error"
>
<admin:infobox
type=
"success"
>
<fmt:message
key=
"plugin.admin.deleted_failure"
/>
<fmt:message
key=
"plugin.admin.reload_success"
/>
</div>
</admin:infobox>
<br>
</c:if>
<c:if
test=
"
${
param
.
reloadsuccess
eq
'false'
}
"
>
<%
}
%>
<admin:infobox
type=
"success"
>
<fmt:message
key=
"plugin.admin.reload_failure"
/>
<%
if
(
"true"
.
equals
(
request
.
getParameter
(
"reloadsuccess"
)))
{
%>
</admin:infobox>
</c:if>
<div
class=
"success"
>
<c:if
test=
"
${
param
.
uploadsuccess
eq
'true'
}
"
>
<fmt:message
key=
"plugin.admin.reload_success"
/>
<admin:infobox
type=
"success"
>
</div>
<fmt:message
key=
"plugin.admin.uploaded_success"
/>
<br>
</admin:infobox>
</c:if>
<%
}
%>
<c:if
test=
"
${
param
.
uploadsuccess
eq
'false'
}
"
>
<admin:infobox
type=
"error"
>
<%
if
(
"true"
.
equals
(
request
.
getParameter
(
"uploadsuccess"
)))
{
%>
<fmt:message
key=
"plugin.admin.uploaded_failure"
/>
</admin:infobox>
<div
class=
"success"
>
</c:if>
<fmt:message
key=
"plugin.admin.uploaded_success"
/>
<c:if
test=
"
${
webManager
.
XMPPServer
.
pluginManager
.
monitorTaskRunning
}
"
>
</div>
<admin:infobox
type=
"info"
>
<br>
<fmt:message
key=
"plugin.admin.monitortask_running"
/>
</admin:infobox>
<%
}
</c:if>
else
if
(
"false"
.
equals
(
request
.
getParameter
(
"uploadsuccess"
)))
{
%>
<p>
<div
class=
"error"
>
<fmt:message
key=
"plugin.admin.uploaded_failure"
/>
</div>
<br>
<%
}
%>
<p>
<fmt:message
key=
"plugin.admin.info"
/>
<fmt:message
key=
"plugin.admin.info"
/>
</p>
</p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment