diff --git a/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/outdated_instance_en.xml b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/outdated_instance_en.xml new file mode 100644 index 0000000000000000000000000000000000000000..da727e635a1c77c0bf0d2202f80870743d5429c0 --- /dev/null +++ b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/outdated_instance_en.xml @@ -0,0 +1,132 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + _Add_portal_content_Permission + + + Manager + + + + + _Delete_objects_Permission + + + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + categories + + + function/production + + + + + content_md5 + + + + + + content_type + text/plain + + + default_reference + outdated-instance-en + + + description + + + + + + id + outdated_instance_en + + + language + en + + + portal_type + Notification Message + + + text_content + Hello ${owner_name},\n +\n +Your instance ${instance_name} is outdated and should be upgrade to the latest available Software Release version.\n +\n +In order to guarantee the integrity and stability of resilient instances, it’s necessary for them to be regularly updated to get the latest features and bug fixes, then simplifying their maintenance.\n +For this, you need to take one of the following actions:\n +\n +- Check if your instance is still used, as it’s not necessary to keep unused instances, and either destroy or stop it if that’s the case.\n +- Check your tickets corresponding to “Upgrade Decisions” for your instances and accept them (if there is multiples tickets, you only need to accept the latest one corresponding to the latest SR version)\n + The latest one found is: ${preferred_slapos_web_site_url}/#/${upgrade_decision_path}\n +\n +Without news or actions until three working days, we won’t guarantee the instance’s integrity anymore.\n +Also don’t hesitate to contact me in case of problems or questions.\n +\n +Support Team + + + text_content_substitution_mapping_method_id + Event_getOutdatedHostingSubscriptionData + + + title + Outdated instance + + + version + 001 + + + + + diff --git a/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/outdated_instance_fr.xml b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/outdated_instance_fr.xml new file mode 100644 index 0000000000000000000000000000000000000000..80d45a85f2ee6e49f322c26870a3fbbadb295aed --- /dev/null +++ b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/outdated_instance_fr.xml @@ -0,0 +1,134 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + _Add_portal_content_Permission + + + Manager + + + + + _Delete_objects_Permission + + + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + categories + + + function/production + + + + + content_md5 + + + + + + content_type + text/plain + + + default_reference + outdated-instance-fr + + + description + + + + + + id + outdated_instance_fr + + + language + fr + + + portal_type + Notification Message + + + text_content + Bonjour ${owner_name},\n +\n +Votre instance ${instance_name} n\'est pas à la dernière version de la Software Release disponible.\n +\n +Or afin de garantir une intégrité et une stabilité des instances, il est nécessaire que celles-ci soient régulièrement mise à jour afin qu’elles puissent profiter des dernières fonctionnalités et correction de bugs, simplifiant ainsi leur maintenance.\n +De ce fait, il est nécessaire que vous effectuez une des actions suivantes:\n +\n +- Vérifier que votre instance est toujours utilisée, étant nécessaire de ne pas garder des instances qui ne sont plus utilisées, et de soit détruire l’instance en question ou la stopper le cas étant.\n +- Consulter les tickets correspondant aux “Upgrade Decision” conçernant vos instances et que vous les acceptiez (s’il y en a plusieurs, il n’est nécessaire que d’accepter la dernière en date correspondant à la dernière version disponible pour l’instance)\n + La dernière trouvée étant: ${preferred_slapos_web_site_url}/#/${upgrade_decision_path}\n +\n +Sans nouvelles ou actions de votre part d’ici trois jours, nous ne garantirons plus l’intégrité de votre instance.\n +N’hésitez pas à revenir vers moi en cas de problèmes ou de questions.\n +\n +PS: Lorsqu’un ticket “Upgrade Decision” est accepté et complété, l’instance correspondante nécessite [pour le moment] d’être redémarrée afin que la mise à jour s’applique (il faut stopper l’instance et la redémarrer une fois complètement stoppée pour cela)\n +\n +Support Team + + + text_content_substitution_mapping_method_id + Event_getOutdatedHostingSubscriptionData + + + title + Instance dépréciée + + + version + 001 + + + + + diff --git a/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/slapos_broken_instance_en.xml b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/slapos_broken_instance_en.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ee9fdd1489a673856c3ee7aa4c15cf25f271245 --- /dev/null +++ b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/slapos_broken_instance_en.xml @@ -0,0 +1,129 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + _Add_portal_content_Permission + + + Manager + + + + + _Delete_objects_Permission + + + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + categories + + + function/production + + + + + content_md5 + + + + + + content_type + text/plain + + + default_reference + slapos-broken-instance-en + + + description + + + + + + id + slapos_broken_instance_en + + + language + en + + + portal_type + Notification Message + + + text_content + Hello ${owner_name},\n +\n +Your instance ${instance_name} seems to not instanciate correctly anymore in resiliency due to an error in the process of compilation or instantiation.\n +This problem come from incorrect buildout files.\n +\n +In order to guarantee the integrity and stability of resilient instances, it\'s necessary for them to be constantly capable of being rebuilt without errors.\n +For this, you need to correct the errors on your instancel, displayed on your monitoring interface available at the URL on slapos.vifib.com UI.\n +\n +Without news or actions until three working days, we won’t guarantee the instance’s integrity anymore.\n +Also don’t hesitate to contact me in case of problems or questions.\n +\n +Support Team + + + text_content_substitution_mapping_method_id + Event_getHostingSubscriptionData + + + title + Your instance is broken + + + version + 001 + + + + + diff --git a/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/slapos_broken_instance_fr.xml b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/slapos_broken_instance_fr.xml new file mode 100644 index 0000000000000000000000000000000000000000..97ef23cf5763bd376a72043229b2bb1323e8491d --- /dev/null +++ b/master/bt5/slapos_crm/PathTemplateItem/notification_message_module/slapos_broken_instance_fr.xml @@ -0,0 +1,129 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + _Add_portal_content_Permission + + + Manager + + + + + _Delete_objects_Permission + + + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Assignee + Assignor + Associate + Auditor + Manager + + + + + categories + + + function/production + + + + + content_md5 + + + + + + content_type + text/plain + + + default_reference + slapos-broken-instance-fr + + + description + + + + + + id + slapos_broken_instance_fr + + + language + fr + + + portal_type + Notification Message + + + text_content + Bonjour ${owner_name},\n +\n +Votre instance ${instance_name} semble ne plus correctement s\'instancier en résilience suite à une erreur dans le processus de compilation et/ou d\'instanciation.\n +Ce problème provient des fichiers buildout qui sont incorrects.\n +\n +Afin de garantir une intégrité et une stabilité des instances résilientes, il est nécessaire que celles-ci soient constamment en état d’être reconstruite sans erreur.\n +De ce fait, il faut que vous corrigiez les erreurs présentes sur vos instances, celles-ci étant affichées sur votre interface de monitoring disponible à l’URL indiquée sur slapos.vifib.com.\n +\n +Sans nouvelles ou actions de votre part d’ici trois jours, nous ne garantirons plus l’intégrité de votre instance.\n +N’hésitez pas à revenir vers moi en cas de problèmes ou de questions.\n +\n +Support Team + + + text_content_substitution_mapping_method_id + Event_getHostingSubscriptionData + + + title + Votre instance est cassée + + + version + 001 + + + + + diff --git a/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getHostingSubscriptionData.py b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getHostingSubscriptionData.py new file mode 100644 index 0000000000000000000000000000000000000000..ce0bf038ac7bb5cd1c028c67783b36bc73b452f5 --- /dev/null +++ b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getHostingSubscriptionData.py @@ -0,0 +1,14 @@ +if event_value is None: + event_value = context + +support_request = event_value.getFollowUpValue() +hosting_subscription = support_request.getAggregateValue() +if hosting_subscription is None: + return {} + +owner = hosting_subscription.getDestinationSectionValue() + +return { + "owner_name": owner.getFirstName(), + "instance_name": hosting_subscription.getTitle(), +} diff --git a/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getHostingSubscriptionData.xml b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getHostingSubscriptionData.xml new file mode 100644 index 0000000000000000000000000000000000000000..72548ef2dc945904f8f6cc97737b48c59e641359 --- /dev/null +++ b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getHostingSubscriptionData.xml @@ -0,0 +1,62 @@ + + + + + + + + + + Script_magic + 3 + + + _bind_names + + + + + + + + + + _asgns + + + + name_container + container + + + name_context + context + + + name_m_self + script + + + name_subpath + traverse_subpath + + + + + + + + + + + _params + event_value=None, **kwargs + + + id + Event_getHostingSubscriptionData + + + + + diff --git a/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getOutdatedHostingSubscriptionData.py b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getOutdatedHostingSubscriptionData.py new file mode 100644 index 0000000000000000000000000000000000000000..a1fe8356f61e34c28f2bc0d8f30150f272e8537d --- /dev/null +++ b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getOutdatedHostingSubscriptionData.py @@ -0,0 +1,26 @@ +portal = context.getPortalObject() + +if event_value is None: + event_value = context + +support_request = event_value.getFollowUpValue() +hosting_subscription = support_request.getAggregateValue() +if hosting_subscription is None: + return {} + +upgrade_decision_list = hosting_subscription.getAggregateRelatedValueList( + portal_type='Upgrade Decision Line', + sort_by='start_date DESC', + limit=1, +) +upgrade_decision_path = upgrade_decision_list[0].getParent().getRelativeUrl() +preferred_slapos_web_site_url = portal.portal_preferences.getPreferredSlaposWebSiteUrl() + +owner = hosting_subscription.getDestinationSectionValue() + +return { + "owner_name": owner.getFirstName(), + "instance_name": hosting_subscription.getTitle(), + "upgrade_decision_path": upgrade_decision_path, + "preferred_slapos_web_site_url": preferred_slapos_web_site_url, +} diff --git a/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getOutdatedHostingSubscriptionData.xml b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getOutdatedHostingSubscriptionData.xml new file mode 100644 index 0000000000000000000000000000000000000000..dc5c834b4c01d81b36f7e1c3a855a63e6aed086d --- /dev/null +++ b/master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Event_getOutdatedHostingSubscriptionData.xml @@ -0,0 +1,62 @@ + + + + + + + + + + Script_magic + 3 + + + _bind_names + + + + + + + + + + _asgns + + + + name_container + container + + + name_context + context + + + name_m_self + script + + + name_subpath + traverse_subpath + + + + + + + + + + + _params + event_value=None, **kwargs + + + id + Event_getOutdatedHostingSubscriptionData + + + + + diff --git a/master/bt5/slapos_crm/bt/template_path_list b/master/bt5/slapos_crm/bt/template_path_list index 41a76667f660eff60ecf16bae3bf53ebc2d11acc..e61c77538cd8c5045cb09efae98495db647e2542 100644 --- a/master/bt5/slapos_crm/bt/template_path_list +++ b/master/bt5/slapos_crm/bt/template_path_list @@ -1,4 +1,8 @@ event_module/slapos_crm_web_message_template +notification_message_module/outdated_instance_en +notification_message_module/outdated_instance_fr +notification_message_module/slapos_broken_instance_en +notification_message_module/slapos_broken_instance_fr person_module/allocation_tester portal_alarms/slapos_crm_* portal_categories/monitor_scope/**