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,136 @@
{% extends '@MauticCore/Default/content.html.twig' %}
{% block mauicContent %}message
{% endblock %}
{% block headerTitle %}
{{ item.getName() }}
{% endblock %}
{% block preHeader %}
{{- include('@MauticCore/Helper/page_actions.html.twig',
{
'item' : item,
'templateButtons' : {
'close' : securityHasEntityAccess(permissions['channel:messages:viewown'], permissions['channel:messages:viewother'], item.getCreatedBy()),
},
'routeBase' : 'message',
'targetLabel' : 'mautic.channel.messages'|trans
}
) -}}
{{ include('@MauticCore/Modules/category--inline.html.twig', {'category': item.category}) }}
{% endblock %}
{% block actions %}
{{- include('@MauticCore/Helper/page_actions.html.twig', {
'item': item,
'templateButtons': {
'edit': securityHasEntityAccess(permissions['channel:messages:editown'], permissions['channel:messages:editother'], item.getCreatedBy()),
'clone': permissions['channel:messages:create'],
'delete': securityHasEntityAccess(permissions['channel:messages:deleteown'], permissions['channel:messages:deleteother'], item.getCreatedBy()),
},
'routeBase': 'message'
}) -}}
{% endblock %}
{% block publishStatus %}
{{- include('@MauticCore/Helper/publishstatus_badge.html.twig', {'entity' : item}) -}}
{% endblock %}
{% block content %}
<!-- start: box layout -->
<div class="box-layout">
<!-- left section -->
<div class="col-md-9 height-auto">
<div>
<!-- form detail header -->
{% include '@MauticCore/Helper/description--expanded.html.twig' with {'description': item.description} %}
<!--/ form detail header -->
<!-- form detail collapseable -->
<div class="collapse pr-md pl-md" id="focus-details">
<div class="pr-md pl-md pb-md">
<div class="panel shd-none mb-0">
<table class="table table-hover mb-0">
<tbody>
{{- include('@MauticCore/Helper/details.html.twig', {'entity' : item}) -}}
</tbody>
</table>
</div>
</div>
</div>
<!--/ form detail collapseable -->
</div>
<!--/ form detail collapseable toggler -->
<div>
<!-- form detail collapseable toggler -->
<div class="hr-expand nm">
<span data-toggle="tooltip" title="{% trans %}mautic.core.details{% endtrans %}">
<a href="javascript:void(0)" class="arrow text-secondary collapsed" data-toggle="collapse" data-target="#focus-details"><span class="caret"></span> {% trans %}mautic.core.details{% endtrans %}</a>
</span>
</div>
<!-- stats -->
<div class="pa-md">
<div class="row">
<div class="col-sm-12">
<div class="panel">
<div class="panel-body box-layout">
<div class="col-md-6 va-m">
<h5 class="text-white dark-md fw-sb mb-xs">
<div><i class="ri-line-chart-fill pull-left"></i>
<span class="pull-left"> {% trans %}mautic.messages.processed.messages{% endtrans %}</span></div>
</h5>
</div>
<div class="col-md-9 va-m">
{{- include('@MauticCore/Helper/graph_dateselect.html.twig', {'dateRangeForm' : dateRangeForm, 'class' : 'pull-right'}) -}}
</div>
</div>
<div class="d-flex fd-column pt-0 pl-15 pb-15 pr-15 min-h-256">
{{- include('@MauticCore/Helper/chart.html.twig', {'chartData' : eventCounts, 'chartType' : 'line', 'chartHeight' : 300}) -}}
</div>
</div>
</div>
</div>
</div>
<!--/ stats -->
{{ customContent('details.stats.graph.below', _context) }}
<!-- tabs controls -->
<ul class="nav nav-tabs nav-tabs-contained">
{% set active = 'active' %}
{% for channel, contacts in messagedLeads %}
<li class="{{ active }}">
<a href="#contacts-{{ channel }}" role="tab" data-toggle="tab">
{{ ('all' is not same as(channel)) ? channels[channel]['label'] : 'mautic.lead.leads'|trans() }}
</a>
</li>
{% set active = '' %}
{% endfor %}
</ul>
<!--/ tabs controls -->
</div>
<!-- start: tab-content -->
<div class="tab-content pa-md">
{% set active = ' active in' %}
{% for channel, contacts in messagedLeads %}
<div class="tab-pane bdr-w-0 page-list{{ active }}" id="contacts-{{ channel }}">
{% set message = ('all' is same as(channel)) ? 'mautic.channel.message.all_contacts' : 'mautic.channel.message.channel_contacts' %}
<div class="alert alert-info"><strong>{{ message|trans }}</strong></div>
<div class="message-{{ channel }}">
{{ contacts|raw }}
</div>
</div>
{% set active = '' %}
{% endfor %}
</div>
</div>
<!-- right section -->
<div class="col-md-3 bdr-l height-auto">
<!-- recent activity -->
{{- include('@MauticCore/Helper/recentactivity.html.twig', {'logs' : logs}) -}}
{% block rightFormContent %}
{% endblock %}
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,87 @@
{% extends "@MauticCore/FormTheme/form_tabbed.html.twig" %}
{% form_theme form _self %}
{% block channel_row %}
{% if form.children.channel is defined %}
{% set channel = form.children.channel.vars.data %}
{% set enabled = form.children.isEnabled.vars.data %}
{% set channelContent = customContent('channel.right', _context) %}
{% set leftCol = channelContent ? 6 : 12 %}
{% set enableCol = channelContent ? '' : 'col-md-2' %}
{% set propsCol = channelContent ? '' : 'col-md-10' %}
{{ form_row(form.children.channel) }}
{{ form_errors(form) }}
<div class="row">
<div class="col-md-{{ leftCol }}">
<div class="{{ enableCol }}">
{{ form_row(form.children.isEnabled) }}
</div>
<div class="{{ propsCol }}">
<div class="message_channel_properties_{{ channel }}{% if not enabled %} hide{% endif %}">
{% if form.children.channelId is defined %}
{{ form_row(form.children.channelId) }}
{% endif %}
{% if form.children.properties is defined and form.children.properties is not empty %}
{{ form_row(form.children.properties) }}
{% endif %}
</div>
</div>
</div>
{% if channelContent %}
<div class="col-md-6">
{{ channelContent }}
</div>
{% endif %}
</div>
{% endif %}
{% endblock %}
{# active, id, name, content #}
{% set tabs, active = [], true %}
{% set _channel = '' %}
{% for channel, config in channels %}
{% if form.channels[channel] is defined %}
{% set tab = {
'active' : active,
'id' : 'channel_' ~ channel,
'name' : config.label,
'content' : form_row(form.channels[channel]),
'containerAttr' : {
'style' : 'min-height: 200px;',
},
} %}
{% if formContainsErrors(form.channels[channel]) %}
{% set tab = tab|merge({'class': 'text-danger', 'icon': 'ri-alert-fill'}) %}
{% elseif form.channels[channel].isEnabled.vars.data %}
{% set tab = tab|merge({'published': true}) %}
{% endif %}
{% set tabs, active = tabs|merge([tab]), false %}
{% endif %}
{% endfor %}
{% set formTabs = tabs %}
{% block aboveTabsContent %}
<div class="pa-md row">
<div class="col-md-12">
{{ form_row(form.name) }}
{{ form_row(form.description) }}
</div>
</div>
{% endblock %}
{% block rightFormContent %}
{{ form_row(form.category) }}
{{ form_row(form.projects) }}
{{ form_row(form.isPublished, {
'attr': {
'data-none': 'mautic.core.form.unavailable_regardless_of_scheduling',
'data-start': 'mautic.core.form.available_on_scheduled_date',
'data-both': 'mautic.core.form.available_during_scheduled_period',
'data-end': 'mautic.core.form.available_until_scheduled_end'
}
}) }}
{{ form_row(form.publishUp, {'label': 'mautic.core.form.available.available_from'}) }}
{{ form_row(form.publishDown, {'label': 'mautic.core.form.available.unavailable_from'}) }}
{% endblock %}
{% block _content %}{% endblock %}

View File

@@ -0,0 +1,13 @@
{% set messageChannels, channels = item.getChannels(), [] %}
{% if messageChannels %}
{% for channelName, channel in messageChannels %}
{% if channel.isEnabled() %}
{% set channels = channels|merge({0: translatorHasId('mautic.channel.' ~ channelName) ? ('mautic.channel.' ~ channelName)|trans : channelName|title, }) %}
{% endif %}
{% endfor %}
{% endif %}
<td class="visible-md visible-lg">
{% for channel in channels %}
<span size="sm" class="label label-gray">{{ channel }}</span>
{% endfor %}
</td>

View File

@@ -0,0 +1,16 @@
{% if showMore is defined %}
<a href="{{ url('mautic_message_index', {'search': searchString}) }}" data-toggle="ajax">
<span>{{ 'mautic.core.search.more'|trans({'%count%': remaining}) }}</span>
</a>
{% else %}
<a href="{{ url('mautic_message_action', {'objectAction': 'view', 'objectId': item.id}) }}" data-toggle="ajax">
<span class="fw-sb">{{ item.name }}</span>
<span class="ml-4 mr-sm">#{{ item.id }}</span>
{{- include('@MauticCore/Helper/publishstatus_badge.html.twig', {
'entity': item,
'status': 'available',
'simplified': 'true'
}) -}}
</a>
<div class="clearfix"></div>
{% endif %}

View File

@@ -0,0 +1,40 @@
{% set extra = event.extra %}
{% set log = extra.log %}
{% set eventType = log.type %}
{% set eventSettings = extra.campaignEventSettings %}
{% set messageSettings = eventSettings.action[eventType].timelineTemplateVars.messageSettings %}
{% set template = '@MauticCampaign/SubscribedEvents/Timeline/index.html.twig' %}
{% set channelEvent = event %}
{% set channelEvent = channelEvent|merge({extra: {log: log}}) %}
{% set vars = {'event' : channelEvent} %}
{% set counter = extra.log.metadata|length %}
{% for channel, results in extra.log.metadata %}
{% if messageSettings[channel] is defined %}
<h4>{{ messageSettings[channel]['label'] }}</h4>
{% if log.metadata[channel].dnc is defined %}
{{ getChannelDncText(log.metadata[channel].dnc) }}
{% endif %}
{# Successful send through this channel #}
{% if messageSettings[channel].campaignAction is not empty %}
{% set eventType = messageSettings[channel]['campaignAction'] %}
{% if eventSettings.action[eventType].timelineTemplate is defined and eventSettings.action[eventType].timelineTemplate is not empty %}
{% set template = eventSettings.action[eventType].timelineTemplate %}
{% endif %}
{% if eventSettings.action[eventType].timelineTemplateVars is defined and eventSettings.action[eventType].timelineTemplateVars is not empty %}
{% set extra = vars.event.extra|merge(eventSettings.action[eventType].timelineTemplateVars) %}
{% set vars = {
'event': {
'extra' : extra
}
} %}
{% endif %}
{% endif %}
{% set counter = counter - 1 %}
{% if counter > 0 %}
<hr/>
{% endif %}
{% endif %}
{{- include(template, vars) -}}
{% endfor %}

View File

@@ -0,0 +1,33 @@
{% set item = event.extra.log is not empty ? event.extra.log : null %}
{% if item is not empty %}
<table class="table table-hover table-sm table-condensed">
<thead>
<tr>
<th>{% trans %}mautic.queued.message.timeline.channel{% endtrans %}</th>
<th>{% trans %}mautic.queued.message.timeline.attempts{% endtrans %}</th>
<th>{% trans %}mautic.queued.message.timeline.date.added{% endtrans %}</th>
<th>{% trans %}mautic.queued.message.timeline.rescheduled{% endtrans %}</th>
<th>{% trans %}mautic.queued.message.timeline.status{% endtrans %}</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">{{ getChannelLabel(item.channelName) }}</th>
<td>{{ item.attempts }}</td>
<td>{% if item.dateAdded is not empty %}{{ dateToFullConcat(item.dateAdded, 'UTC') }}{% endif %}</td>
<td>{% if item.scheduledDate is not empty %}{{ dateToFullConcat(item.scheduledDate, 'UTC') }}{% endif %}</td>
<td id="queued-status-{{ item.id }}">
{{ ('mautic.message.queue.status.' ~ item.status) | trans({},'javascript') }}
</td>
<td>
{% if ('pending' == item.status) %}
<button type="button" id="queued-message-{{ item.id }}" class="btn btn-ghost btn-nospin" onclick="Mautic.cancelQueuedMessageEvent({{ item.id }})" data-toggle="tooltip" title="{% trans %}mautic.queued.message.event.cancel{% endtrans %}">
<i class="ri-close-line text-danger"></i>
</button>
{% endif %}
</td>
</tr>
</tbody>
</table>
{% endif %}