-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Configure automatic-translation navigation and pages for admini…
…stration site - EXO-66546 - Meeds-io/MIPs#88 (#43)
- Loading branch information
1 parent
2c39bae
commit faae69d
Showing
5 changed files
with
276 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
webapps/src/main/resources/locale/navigation/portal/administration_en.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Copyright (C) 2023 eXo Platform SAS. | ||
# | ||
# This is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License as | ||
# published by the Free Software Foundation; either version 3 of | ||
# the License, or (at your option) any later version. | ||
# | ||
# This software is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this software; if not, write to the Free | ||
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
# | ||
portal.administration.home=Platform settings | ||
portal.administration.applications=Applications | ||
portal.administration.translation=Automatic translation | ||
|
108 changes: 71 additions & 37 deletions
108
webapps/src/main/webapp/WEB-INF/conf/automatic-translation/portal-configuration.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd http://www.exoplatform.org/xml/ns/kernel_1_3.xsd" xmlns="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd"> | ||
<external-component-plugins> | ||
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component> | ||
<component-plugin> | ||
<name>new.portal.config.user.listener</name> | ||
<set-method>initListener</set-method> | ||
<type>org.exoplatform.portal.config.NewPortalConfigListener</type> | ||
<description>This listener creates Automatic Translation Admin Pages</description> | ||
<init-params> | ||
<object-param> | ||
<name>group.configuration</name> | ||
<description>description</description> | ||
<object type="org.exoplatform.portal.config.NewPortalConfig"> | ||
<field name="predefinedOwner"> | ||
<collection type="java.util.HashSet"> | ||
<value> | ||
<string>/platform/administrators</string> | ||
</value> | ||
</collection> | ||
</field> | ||
<field name="ownerType"> | ||
<string>group</string> | ||
</field> | ||
<field name="override"> | ||
<boolean>${exo.automatic-translation.portalConfig.metadata.override:true}</boolean> | ||
</field> | ||
<field name="importMode"> | ||
<string>${exo.automatic-translation.portalConfig.metadata.importmode:merge}</string> | ||
</field> | ||
<field name="templateLocation"> | ||
<string>war:/conf/automatic-translation/portal</string> | ||
</field> | ||
</object> | ||
</object-param> | ||
</init-params> | ||
</component-plugin> | ||
</external-component-plugins> | ||
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd http://www.exoplatform.org/xml/ns/kernel_1_3.xsd" | ||
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd"> | ||
<external-component-plugins> | ||
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component> | ||
<component-plugin> | ||
<name>new.portal.config.user.listener</name> | ||
<set-method>initListener</set-method> | ||
<type>org.exoplatform.portal.config.NewPortalConfigListener</type> | ||
<description>This listener creates Automatic Translation Admin Pages</description> | ||
<init-params> | ||
<object-param> | ||
<name>group.configuration</name> | ||
<description>description</description> | ||
<object type="org.exoplatform.portal.config.NewPortalConfig"> | ||
<field name="predefinedOwner"> | ||
<collection type="java.util.HashSet"> | ||
<value> | ||
<string>/platform/administrators</string> | ||
</value> | ||
</collection> | ||
</field> | ||
<field name="ownerType"> | ||
<string>group</string> | ||
</field> | ||
<field name="override"> | ||
<boolean>${exo.automatic-translation.portalConfig.metadata.override:true}</boolean> | ||
</field> | ||
<field name="importMode"> | ||
<string>${exo.automatic-translation.portalConfig.metadata.importmode:merge}</string> | ||
</field> | ||
<field name="templateLocation"> | ||
<string>war:/conf/automatic-translation/portal</string> | ||
</field> | ||
</object> | ||
</object-param> | ||
</init-params> | ||
</component-plugin> | ||
<component-plugin> | ||
<name>new.portal.config.user.listener</name> | ||
<set-method>initListener</set-method> | ||
<type>org.exoplatform.portal.config.NewPortalConfigListener</type> | ||
<description>this listener init the portal configuration</description> | ||
<init-params> | ||
<object-param> | ||
<name>portal.configuration</name> | ||
<object type="org.exoplatform.portal.config.NewPortalConfig"> | ||
<field name="predefinedOwner"> | ||
<collection type="java.util.HashSet"> | ||
<value> | ||
<string>administration</string> | ||
</value> | ||
</collection> | ||
</field> | ||
<field name="ownerType"> | ||
<string>portal</string> | ||
</field> | ||
<field name="templateLocation"> | ||
<string>war:/conf/automatic-translation/portal</string> | ||
</field> | ||
<field name="override"> | ||
<boolean>${exo.automatic-translation.portalConfig.administration.override:true}</boolean> | ||
</field> | ||
<field name="importMode"> | ||
<string>${exo.automatic-translation.portalConfig.administration.importmode:merge}</string> | ||
</field> | ||
</object> | ||
</object-param> | ||
</init-params> | ||
</component-plugin> | ||
</external-component-plugins> | ||
</configuration> |
43 changes: 43 additions & 0 deletions
43
...ain/webapp/WEB-INF/conf/automatic-translation/portal/portal/administration/navigation.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<!-- | ||
* Copyright (C) 2023 eXo Platform SAS. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
--> | ||
<node-navigation | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_6 http://www.gatein.org/xml/ns/gatein_objects_1_6" | ||
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_6"> | ||
<priority>3</priority> | ||
|
||
<page-nodes> | ||
<node> | ||
<name>home</name> | ||
<label>#{portal.administration.home}</label> | ||
<icon>fas fa-cog</icon> | ||
<node> | ||
<name>applications</name> | ||
<label>#{portal.administration.applications}</label> | ||
<icon>fas fa-boxes</icon> | ||
<node> | ||
<name>translation</name> | ||
<label>#{portal.administration.translation}</label> | ||
<icon>fas fa-language</icon> | ||
<page-reference>portal::administration::automatic-translation</page-reference> | ||
</node> | ||
</node> | ||
</node> | ||
</page-nodes> | ||
</node-navigation> |
138 changes: 138 additions & 0 deletions
138
...src/main/webapp/WEB-INF/conf/automatic-translation/portal/portal/administration/pages.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
* Copyright (C) 2023 eXo Platform SAS. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
--> | ||
<page-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/gatein_objects_1_8 http://www.exoplatform.org/xml/ns/gatein_objects_1_8" | ||
xmlns="http://www.exoplatform.org/xml/ns/gatein_objects_1_8"> | ||
<page> | ||
<name>automatic-translation</name> | ||
<title>Automatic Translation</title> | ||
<access-permissions>*:/platform/administrators</access-permissions> | ||
<edit-permission>manager:/platform/administrators</edit-permission> | ||
<show-max-window>false</show-max-window> | ||
<container id="singlePageApplicationContainer" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" cssClass="singlePageApplication"> | ||
<portlet-application> | ||
<portlet> | ||
<application-ref>automatic-translation</application-ref> | ||
<portlet-ref>automaticTranslationAdministration</portlet-ref> | ||
</portlet> | ||
<title>Automatic Translation</title> | ||
<access-permissions>*:/platform/administrators</access-permissions> | ||
<show-info-bar>false</show-info-bar> | ||
</portlet-application> | ||
</container> | ||
<container | ||
id="topAnalyticsPage" | ||
template="system:/groovy/portal/webui/container/UIContainer.gtmpl" | ||
cssClass="singlePageApplication"> | ||
<access-permissions>Everyone</access-permissions> | ||
<container cssClass="analyticsPageRow" template="system:/groovy/portal/webui/container/UIContainer.gtmpl"> | ||
<access-permissions>Everyone</access-permissions> | ||
<portlet-application> | ||
<portlet> | ||
<application-ref>analytics</application-ref> | ||
<portlet-ref>AnalyticsPortlet</portlet-ref> | ||
<preferences> | ||
<preference> | ||
<name>settings</name> | ||
<value>{ | ||
"offset": 0, | ||
"filters": [ | ||
{ | ||
"valueString": "translate", | ||
"field": "operation", | ||
"type": "EQUAL", | ||
"range": null | ||
}, | ||
{ | ||
"valueString": "automatic-translation", | ||
"field": "module", | ||
"type": "EQUAL", | ||
"range": null | ||
} | ||
], | ||
"lang": null, | ||
"aggregations": [ | ||
{ | ||
"field": "timestamp", | ||
"type": "DATE", | ||
"offset": null, | ||
"interval": "month", | ||
"useBounds": false, | ||
"minBound": 0, | ||
"maxBound": 0, | ||
"sortDirection": "asc", | ||
"limit": 0 | ||
}, | ||
{ | ||
"field": "messageLength", | ||
"type": "SUM", | ||
"offset": null, | ||
"interval": null, | ||
"useBounds": false, | ||
"minBound": 0, | ||
"maxBound": 0, | ||
"sortDirection": "desc", | ||
"limit": 0 | ||
} | ||
], | ||
"yAxisAggregation": { | ||
"field": "messageLength", | ||
"type": "SUM", | ||
"offset": null, | ||
"interval": null, | ||
"useBounds": false, | ||
"minBound": 0, | ||
"maxBound": 0, | ||
"sortDirection": "desc", | ||
"limit": 0 | ||
}, | ||
"multipleChartsAggregation": null, | ||
"xAxisAggregations": [ | ||
{ | ||
"field": "timestamp", | ||
"type": "DATE", | ||
"offset": null, | ||
"interval": "month", | ||
"useBounds": false, | ||
"minBound": 0, | ||
"maxBound": 0, | ||
"sortDirection": "asc", | ||
"limit": 0 | ||
} | ||
], | ||
"multipleCharts": false, | ||
"chartType": "bar", | ||
"colors": null, | ||
"multipleChartsField": null, | ||
"limit": 0, | ||
"timeZone": null, | ||
"title": "automatic.translation.analytics.title.charTranslated" | ||
} | ||
</value> | ||
</preference> | ||
</preferences> | ||
</portlet> | ||
<title>Characters Translated</title> | ||
<access-permissions>Everyone</access-permissions> | ||
<show-info-bar>false</show-info-bar> | ||
</portlet-application> | ||
</container> | ||
</container> | ||
</page> | ||
</page-set> |