Skip to content

Commit

Permalink
fix: Implement new common connector extension - MEED-2962 - MEED-3080 -
Browse files Browse the repository at this point in the history
  • Loading branch information
AzmiTouil authored and boubaker committed Dec 12, 2023
1 parent a1d3f26 commit fad6c06
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,25 @@
</depends>
</module>

<module>
<name>engagementCenterConnectorsGitHubExtensions</name>
<load-group>engagement-center-connector-extensions</load-group>
<script>
<path>/js/connectorExtensions.bundle.js</path>
</script>
<depends>
<module>vue</module>
</depends>
<depends>
<module>vuetify</module>
</depends>
<depends>
<module>eXoVueI18n</module>
</depends>
<depends>
<module>extensionRegistry</module>
</depends>
</module>

</gatein-resources>

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2023 Meeds Association [email protected]
*
* This program 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 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
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
export function init() {
extensionRegistry.registerExtension('engagementCenterConnectors', 'connector-extensions', {
id: 'github',
name: 'github',
icon: 'fab fa-github',
iconColorClass: 'text-color',
title: 'Github',
description: 'githubConnector.admin.label.description',
rank: 20,
init: () => {
const lang = window.eXo?.env?.portal?.language || 'en';
const url = `${eXo.env.portal.context}/${eXo.env.portal.rest}/i18n/bundle/locale.portlet.GitHubWebHookManagement-${lang}.json`;
return exoi18n.loadLanguageAsync(lang, url);
}
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ export function init() {
extensionRegistry.registerComponent('gamification-admin-connector', 'admin-connector-item', {
id: 'githubSetting',
name: 'github',
icon: 'fab fa-github',
iconColorClass: 'text-color',
title: 'Github',
description: 'githubConnector.admin.label.description',
rank: 20,
init: () => {
const lang = window.eXo?.env?.portal?.language || 'en';
const url = `${eXo.env.portal.context}/${eXo.env.portal.rest}/i18n/bundle/locale.portlet.GitHubWebHookManagement-${lang}.json`;
return exoi18n.loadLanguageAsync(lang, url);
},
vueComponent: Vue.options.components['github-admin-connector-item'],
});
}
1 change: 1 addition & 0 deletions gamification-github-webapp/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const config = {
},
entry: {
engagementCenterExtensions: './src/main/webapp/vue-app/engagementCenterExtensions/extensions.js',
connectorExtensions: './src/main/webapp/vue-app/connectorExtensions/extensions.js',
githubUserConnectorExtension: './src/main/webapp/vue-app/githubUserConnectorExtension/extension.js',
githubAdminConnectorExtension: './src/main/webapp/vue-app/githubAdminConnectorExtension/extension.js'
},
Expand Down

0 comments on commit fad6c06

Please sign in to comment.