-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated apps config and added migrations
- Loading branch information
1 parent
88374a0
commit 2e91618
Showing
8 changed files
with
166 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
151 changes: 151 additions & 0 deletions
151
channel_integrations/integrated_channel/migrations/0001_initial.py
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,151 @@ | ||
# Generated by Django 4.2.17 on 2024-12-27 06:17 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
import jsonfield.fields | ||
import model_utils.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('enterprise', '0228_alter_defaultenterpriseenrollmentrealization_realized_enrollment'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ApiResponseRecord', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('status_code', models.PositiveIntegerField(blank=True, help_text='The most recent remote API call response HTTP status code', null=True)), | ||
('body', models.TextField(blank=True, help_text='The most recent remote API call response body', null=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ContentMetadataItemTransmission', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('integrated_channel_code', models.CharField(max_length=30)), | ||
('plugin_configuration_id', models.PositiveIntegerField(blank=True, null=True)), | ||
('content_id', models.CharField(max_length=255)), | ||
('content_title', models.CharField(blank=True, default=None, max_length=255, null=True)), | ||
('channel_metadata', jsonfield.fields.JSONField()), | ||
('content_last_changed', models.DateTimeField(blank=True, help_text='Date of the last time the enterprise catalog associated with this metadata item was updated', null=True)), | ||
('enterprise_customer_catalog_uuid', models.UUIDField(blank=True, help_text='The enterprise catalog that this metadata item was derived from', null=True)), | ||
('remote_deleted_at', models.DateTimeField(blank=True, help_text='Date when the content transmission was deleted in the remote API', null=True)), | ||
('remote_created_at', models.DateTimeField(blank=True, help_text='Date when the content transmission was created in the remote API', null=True)), | ||
('remote_errored_at', models.DateTimeField(blank=True, help_text='Date when the content transmission was failed in the remote API.', null=True)), | ||
('remote_updated_at', models.DateTimeField(blank=True, help_text='Date when the content transmission was last updated in the remote API', null=True)), | ||
('api_response_status_code', models.PositiveIntegerField(blank=True, help_text='The most recent remote API call response HTTP status code', null=True)), | ||
('friendly_status_message', models.CharField(blank=True, default=None, help_text='A user-friendly API response status message.', max_length=255, null=True)), | ||
('marked_for', models.CharField(blank=True, help_text='Flag marking a record as needing a form of transmitting', max_length=32, null=True)), | ||
('api_record', models.OneToOneField(blank=True, help_text='Data pertaining to the transmissions API request response.', null=True, on_delete=django.db.models.deletion.CASCADE, to='channel_integration.apiresponserecord')), | ||
('enterprise_customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelintegration_contentmetadataitemtransmission', to='enterprise.enterprisecustomer')), | ||
], | ||
options={ | ||
'unique_together': {('integrated_channel_code', 'plugin_configuration_id', 'content_id')}, | ||
'index_together': {('enterprise_customer', 'integrated_channel_code', 'plugin_configuration_id', 'content_id')}, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='IntegratedChannelAPIRequestLogs', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('enterprise_customer_configuration_id', models.IntegerField(help_text='ID from the EnterpriseCustomerConfiguration model')), | ||
('endpoint', models.URLField(max_length=255)), | ||
('payload', models.TextField()), | ||
('time_taken', models.FloatField()), | ||
('status_code', models.PositiveIntegerField(blank=True, help_text='API call response HTTP status code', null=True)), | ||
('response_body', models.TextField(blank=True, help_text='API call response body', null=True)), | ||
('channel_name', models.TextField(blank=True, help_text='Name of the integrated channel associated with this API call log record.')), | ||
('enterprise_customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelintegration_integratedchannelapirequestlogs', to='enterprise.enterprisecustomer')), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Integrated channels API request logs', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='GenericLearnerDataTransmissionAudit', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('enterprise_customer_uuid', models.UUIDField(blank=True, null=True)), | ||
('user_email', models.CharField(blank=True, max_length=255, null=True)), | ||
('plugin_configuration_id', models.IntegerField(blank=True, null=True)), | ||
('enterprise_course_enrollment_id', models.IntegerField(blank=True, db_index=True, null=True)), | ||
('course_id', models.CharField(max_length=255)), | ||
('content_title', models.CharField(blank=True, default=None, max_length=255, null=True)), | ||
('course_completed', models.BooleanField(default=True)), | ||
('progress_status', models.CharField(blank=True, max_length=255)), | ||
('completed_timestamp', models.DateTimeField(blank=True, null=True)), | ||
('instructor_name', models.CharField(blank=True, max_length=255)), | ||
('grade', models.FloatField(blank=True, null=True)), | ||
('total_hours', models.FloatField(blank=True, null=True)), | ||
('subsection_id', models.CharField(blank=True, db_index=True, max_length=255, null=True)), | ||
('subsection_name', models.CharField(max_length=255, null=True)), | ||
('status', models.CharField(blank=True, max_length=100, null=True)), | ||
('error_message', models.TextField(blank=True, null=True)), | ||
('is_transmitted', models.BooleanField(default=False)), | ||
('friendly_status_message', models.CharField(blank=True, default=None, help_text='A user-friendly API response status message.', max_length=255, null=True)), | ||
('api_record', models.OneToOneField(blank=True, help_text='Data pertaining to the transmissions API request response.', null=True, on_delete=django.db.models.deletion.CASCADE, to='channel_integration.apiresponserecord')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='GenericEnterpriseCustomerPluginConfiguration', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('deleted_at', models.DateTimeField(blank=True, null=True)), | ||
('display_name', models.CharField(blank=True, default='', help_text='A configuration nickname.', max_length=255)), | ||
('idp_id', models.CharField(blank=True, default='', help_text='If provided, will be used as IDP slug to locate remote id for learners', max_length=255)), | ||
('active', models.BooleanField(help_text='Is this configuration active?')), | ||
('dry_run_mode_enabled', models.BooleanField(default=False, help_text='Is this configuration in dry-run mode? (experimental)')), | ||
('show_course_price', models.BooleanField(default=False, help_text='Displays course price')), | ||
('transmission_chunk_size', models.IntegerField(default=500, help_text='The maximum number of data items to transmit to the integrated channel with each request.')), | ||
('channel_worker_username', models.CharField(blank=True, default='', help_text='Enterprise channel worker username to get JWT tokens for authenticating LMS APIs.', max_length=255)), | ||
('catalogs_to_transmit', models.TextField(blank=True, default='', help_text='A comma-separated list of catalog UUIDs to transmit. If blank, all customer catalogs will be transmitted. If there are overlapping courses in the customer catalogs, the overlapping course metadata will be selected from the newest catalog.')), | ||
('disable_learner_data_transmissions', models.BooleanField(default=False, help_text='When set to True, the configured customer will no longer receive learner data transmissions, both scheduled and signal based', verbose_name='Disable Learner Data Transmission')), | ||
('last_sync_attempted_at', models.DateTimeField(blank=True, help_text='The DateTime of the most recent Content or Learner data record sync attempt', null=True)), | ||
('last_content_sync_attempted_at', models.DateTimeField(blank=True, help_text='The DateTime of the most recent Content data record sync attempt', null=True)), | ||
('last_learner_sync_attempted_at', models.DateTimeField(blank=True, help_text='The DateTime of the most recent Learner data record sync attempt', null=True)), | ||
('last_sync_errored_at', models.DateTimeField(blank=True, help_text='The DateTime of the most recent failure of a Content or Learner data record sync attempt', null=True)), | ||
('last_content_sync_errored_at', models.DateTimeField(blank=True, help_text='The DateTime of the most recent failure of a Content data record sync attempt', null=True)), | ||
('last_learner_sync_errored_at', models.DateTimeField(blank=True, help_text='The DateTime of the most recent failure of a Learner data record sync attempt', null=True)), | ||
('last_modified_at', models.DateTimeField(auto_now=True, help_text='The DateTime of the last change made to this configuration.', null=True)), | ||
('enterprise_customer', models.ForeignKey(help_text='Enterprise Customer associated with the configuration.', on_delete=django.db.models.deletion.CASCADE, related_name='channelintegration_enterprisecustomerpluginconfiguration', to='enterprise.enterprisecustomer')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='OrphanedContentTransmissions', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('integrated_channel_code', models.CharField(max_length=30)), | ||
('plugin_configuration_id', models.PositiveIntegerField()), | ||
('content_id', models.CharField(max_length=255)), | ||
('resolved', models.BooleanField(default=False)), | ||
('transmission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orphaned_record', to='channel_integration.contentmetadataitemtransmission')), | ||
], | ||
options={ | ||
'index_together': {('integrated_channel_code', 'plugin_configuration_id', 'resolved')}, | ||
}, | ||
), | ||
] |
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
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
channel_integrations/templates/enterprise_integrated_channels/base.html
This file was deleted.
Oops, something went wrong.
Empty file.
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