Initial commit: CloudOps infrastructure platform

This commit is contained in:
root
2026-04-09 19:58:57 +02:00
commit 1166a52f26
7762 changed files with 839452 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# Workflow name:
name: Close Pull Requests
# Workflow triggers:
on:
pull_request_target:
types: [opened]
# Workflow jobs:
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Thank you for submitting a pull request. :raised_hands:
We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/mautic/mautic).
We kindly request that you submit this pull request against the [respective directory](https://github.com/mautic/mautic/blob/head/plugins/MauticOutlookBundle) of the main repository where we'll review and provide feedback. If this is your first Mautic contribution, be sure to read the [contributing guide](https://github.com/mautic/mautic/blob/4.x/.github/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions.
Thank you again, and we look forward to receiving your contribution! :smiley:
Best,
The Mautic team

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,33 @@
<?php
return [
'name' => 'Outlook',
'description' => 'Enables integrations with Outlook for email tracking',
'version' => '1.0',
'author' => 'Mautic',
'services' => [
'integrations' => [
'mautic.integration.outlook' => [
'class' => MauticPlugin\MauticOutlookBundle\Integration\OutlookIntegration::class,
'arguments' => [
'event_dispatcher',
'mautic.helper.cache_storage',
'doctrine.orm.entity_manager',
'request_stack',
'router',
'translator',
'monolog.logger.mautic',
'mautic.helper.encryption',
'mautic.lead.model.lead',
'mautic.lead.model.company',
'mautic.helper.paths',
'mautic.core.model.notification',
'mautic.lead.model.field',
'mautic.plugin.model.integration_entity',
'mautic.lead.model.dnc',
'mautic.lead.field.fields_with_unique_identifier',
],
],
],
],
];

View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
use Mautic\CoreBundle\DependencyInjection\MauticCoreExtension;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return function (ContainerConfigurator $configurator): void {
$services = $configurator->services()
->defaults()
->autowire()
->autoconfigure()
->public();
$excludes = [
];
$services->load('MauticPlugin\\MauticOutlookBundle\\', '../')
->exclude('../{'.implode(',', array_merge(MauticCoreExtension::DEFAULT_EXCLUDES, $excludes)).'}');
};

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace MauticPlugin\MauticOutlookBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
class MauticOutlookExtension extends Extension
{
/**
* @param mixed[] $configs
*/
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Config'));
$loader->load('services.php');
}
}

View File

@@ -0,0 +1,51 @@
<?php
namespace MauticPlugin\MauticOutlookBundle\Integration;
use Mautic\CoreBundle\Helper\UrlHelper;
use Mautic\PluginBundle\Integration\AbstractIntegration;
class OutlookIntegration extends AbstractIntegration
{
public function getName(): string
{
return 'Outlook';
}
/**
* Return's authentication method such as oauth2, oauth1a, key, etc.
*/
public function getAuthenticationType(): string
{
// Just use none for now and I'll build in "basic" later
return 'none';
}
/**
* Return array of key => label elements that will be converted to inputs to
* obtain from the user.
*/
public function getRequiredKeyFields(): array
{
return [
'secret' => 'mautic.integration.outlook.secret',
];
}
/**
* @return array<mixed>
*/
public function getFormNotes($section)
{
if ('custom' === $section) {
return [
'template' => '@MauticOutlook/Integration/form.html.twig',
'parameters' => [
'mauticUrl' => UrlHelper::rel2abs('/index.php'),
],
];
}
return parent::getFormNotes($section);
}
}

View File

@@ -0,0 +1,9 @@
<?php
namespace MauticPlugin\MauticOutlookBundle;
use Mautic\PluginBundle\Bundle\PluginBundleBase;
class MauticOutlookBundle extends PluginBundleBase
{
}

View File

@@ -0,0 +1,5 @@
# Mautic bundle for Gmail plugin
## This plugin is managed centrally in https://github.com/mautic/mautic/blob/head/plugins/MauticOutlookBundle and this is a read-only mirror repository.
**📣 Please make PRs and issues against Mautic Core, not here!**

View File

@@ -0,0 +1,7 @@
<div class="well well-sm" style="margin-bottom:0 !important;">
<p>{{ 'mautic.plugin.outlook.url'|trans }}</p>
<div class="alert alert-warning">
{{ 'mautic.plugin.outlook.public_info'|trans|purify }}
</div>
<input type="text" readonly="readonly" onclick="this.setSelectionRange(0, this.value.length);" value="{{ mauticUrl }}" class="form-control">
</div>

View File

@@ -0,0 +1,67 @@
<?php
declare(strict_types=1);
namespace MauticPlugin\MauticOutlookBundle\Tests\Integration;
use Mautic\PluginBundle\Tests\Integration\AbstractIntegrationTestCase;
use MauticPlugin\MauticOutlookBundle\Integration\OutlookIntegration;
final class OutlookIntegrationTest extends AbstractIntegrationTestCase
{
private OutlookIntegration $integration;
protected function setUp(): void
{
parent::setUp();
$this->integration = new OutlookIntegration(
$this->dispatcher,
$this->cache,
$this->em,
$this->request,
$this->router,
$this->translator,
$this->logger,
$this->encryptionHelper,
$this->leadModel,
$this->companyModel,
$this->pathsHelper,
$this->notificationModel,
$this->fieldModel,
$this->integrationEntityModel,
$this->doNotContact,
$this->fieldsWithUniqueIdentifier,
);
}
public function testGetNameReturnsOutlook(): void
{
$this->assertSame('Outlook', $this->integration->getName());
}
public function testGetAuthenticationTypeWillReturnNone(): void
{
$this->assertSame('none', $this->integration->getAuthenticationType());
}
public function testGetRequiredKeyFieldsContainsSerect(): void
{
$this->assertArrayHasKey('secret', $this->integration->getRequiredKeyFields());
}
public function testGetFormNotesWillReturnTheCorrectTemplate(): void
{
// set server globals
// @see Mautic\CoreBundle\Helper\UrlHelper::rel2abs
$_SERVER['SERVER_PROTOCOL'] = 'https';
$_SERVER['SERVER_PORT'] = '80';
$_SERVER['SERVER_NAME'] = 'localhost';
$_SERVER['REQUEST_URI'] = '/';
$formNotes = $this->integration->getFormNotes('custom');
$this->assertArrayHasKey('template', $formNotes);
$this->assertSame('@MauticOutlook/Integration/form.html.twig', $formNotes['template']);
}
}

View File

@@ -0,0 +1,3 @@
mautic.integration.outlook.secret="Outlook Add-In Secret"
mautic.plugin.outlook.url="Please use the following as the Mautic URL in the Outlook Add-In options dialog:"
mautic.plugin.outlook.public_info="<strong>Warning!</strong> This must be a publicly accessible URL for the Add-In to work."

View File

@@ -0,0 +1,17 @@
{
"name": "mautic/plugin-outlook",
"description": "Outlook Plugin",
"type": "mautic-plugin",
"keywords": [
"mautic",
"plugin",
"integration"
],
"extra": {
"install-directory-name": "MauticOutlookBundle"
},
"minimum-stability": "dev",
"require": {
"mautic/core-lib": "^7.0"
}
}