-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added notification mechanism for some operations
- Loading branch information
1 parent
d74b996
commit f062cff
Showing
13 changed files
with
184 additions
and
10 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
upsonic_on_prem/dash/app/migrations/0012_thenotifications_section_alter_user_dark_mode.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,23 @@ | ||
# Generated by Django 4.2.9 on 2024-10-09 09:10 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('app', '0011_user_ldap'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='thenotifications', | ||
name='section', | ||
field=models.CharField(blank=True, max_length=1000), | ||
), | ||
migrations.AlterField( | ||
model_name='user', | ||
name='dark_mode', | ||
field=models.BooleanField(blank=True, default=False, null=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
upsonic_on_prem/dash/app/migrations/0013_thenotifications_type.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,18 @@ | ||
# Generated by Django 4.2.9 on 2024-10-09 09:40 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('app', '0012_thenotifications_section_alter_user_dark_mode'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='thenotifications', | ||
name='type', | ||
field=models.CharField(blank=True, max_length=1000), | ||
), | ||
] |
27 changes: 27 additions & 0 deletions
27
upsonic_on_prem/dash/app/migrations/0014_alter_thenotifications_options_and_more.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,27 @@ | ||
# Generated by Django 4.2.9 on 2024-10-09 11:36 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('app', '0013_thenotifications_type'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='thenotifications', | ||
options={'ordering': ['-date']}, | ||
), | ||
migrations.AlterField( | ||
model_name='thenotifications', | ||
name='section', | ||
field=models.CharField(blank=True, max_length=1000, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='thenotifications', | ||
name='type', | ||
field=models.CharField(blank=True, max_length=1000, null=True), | ||
), | ||
] |
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 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 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 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 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 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 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 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,55 @@ | ||
{% load tags %} | ||
|
||
|
||
<div class="uk-flex uk-flex-column "> | ||
|
||
{% notifications as notifications %} | ||
|
||
{% for notif in notifications %} | ||
|
||
|
||
{% if notif.type == "info" or notif.type == "danger" %} | ||
|
||
|
||
|
||
{% if notif.type == "info" %} | ||
<div class="uk-alert uk-margin-small-bottom" uk-alert> | ||
|
||
{% elif notif.type == "danger" %} | ||
<div class="uk-alert uk-alert-danger uk-margin-small-bottom" uk-alert> | ||
|
||
|
||
|
||
{% endif %} | ||
|
||
|
||
{% if notif.section == "ai" %} | ||
<svg uk-icon="nut" style="top: 0.8rem;"></svg> | ||
{% endif %} | ||
{% if notif.section == "edit" %} | ||
<svg uk-icon="file-edit" style="top: 0.8rem;"></svg> | ||
{% endif %} | ||
|
||
|
||
<a href class="uk-alert-close" uk-close></a> | ||
|
||
|
||
|
||
<div class="uk-alert-title">{{notif.title}}</div> | ||
|
||
|
||
|
||
<div class="uk-alert-description"> | ||
{{notif.message}} | ||
</div> | ||
</div> | ||
|
||
{% endif %} | ||
|
||
{% endfor %} | ||
|
||
|
||
|
||
|
||
|
||
</div> |
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 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