-
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.
Merge pull request #3 from jyssy/main
TAGS, URLS, context_processor, removed Notes from Export, added ability to handle multiple IP addresses
- Loading branch information
Showing
22 changed files
with
289 additions
and
54 deletions.
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
Operations_ServiceIndex_Django/services/context_processors.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 @@ | ||
# myapp/context_processors.py | ||
from .models import Misc_urls | ||
|
||
def misc_urls_processor(request): | ||
# Create a dictionary to hold the URL mappings | ||
url_mapping = {} | ||
|
||
# Fetch all entries in the Misc_urls table | ||
misc_urls = Misc_urls.objects.all() | ||
|
||
# Populate the dictionary with names as keys and URLs as values | ||
for entry in misc_urls: | ||
url_mapping[entry.name] = entry.urls | ||
|
||
# Return the dictionary so it can be accessed in templates | ||
return { | ||
'MISC_URLS': url_mapping | ||
} |
18 changes: 18 additions & 0 deletions
18
Operations_ServiceIndex_Django/services/migrations/0006_service_service_tags.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.1.13 on 2024-08-08 12:53 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('services', '0005_logentry_event_logentry_host_logentry_staff_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='service', | ||
name='service_tags', | ||
field=models.CharField(blank=True, max_length=256, null=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
Operations_ServiceIndex_Django/services/migrations/0007_host_host_tags.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.1.13 on 2024-08-08 13:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('services', '0006_service_service_tags'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='host', | ||
name='host_tags', | ||
field=models.CharField(blank=True, max_length=256, null=True), | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
.../services/migrations/0008_alter_editlock_username_alter_hosteventlog_username_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,28 @@ | ||
# Generated by Django 4.1.13 on 2024-08-08 13:50 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('services', '0007_host_host_tags'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='editlock', | ||
name='username', | ||
field=models.CharField(max_length=25), | ||
), | ||
migrations.AlterField( | ||
model_name='hosteventlog', | ||
name='username', | ||
field=models.CharField(max_length=25), | ||
), | ||
migrations.AlterField( | ||
model_name='logentry', | ||
name='username', | ||
field=models.CharField(max_length=25), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
Operations_ServiceIndex_Django/services/migrations/0009_alter_host_ip_address.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.1.13 on 2024-08-13 13:16 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('services', '0008_alter_editlock_username_alter_hosteventlog_username_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='host', | ||
name='ip_address', | ||
field=models.CharField(blank=True, max_length=256), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
...tions_ServiceIndex_Django/services/migrations/0010_rename_ip_address_host_ip_addresses.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.1.13 on 2024-08-13 15:22 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('services', '0009_alter_host_ip_address'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='host', | ||
old_name='ip_address', | ||
new_name='ip_addresses', | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
Operations_ServiceIndex_Django/services/migrations/0011_misc_urls.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,24 @@ | ||
# Generated by Django 4.1.13 on 2024-08-28 18:10 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('services', '0010_rename_ip_address_host_ip_addresses'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Misc_urls', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=50)), | ||
('urls', models.URLField(max_length=512)), | ||
], | ||
options={ | ||
'db_table': '"serviceindex"."misc_urls"', | ||
}, | ||
), | ||
] |
Oops, something went wrong.