This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
39d89ed Feature/SK-343 + SK-369 + SK-391 | Add Project Network Policy app, security contexts and update MLFlow example (#46) 1674a95 Feature/SK-393 | Limit apps per project (#102) 29a79a5 Feature/SK-374 | Remove usage of AppPermissions model (#94) 01d144e Bug/SK-382 | Default version for model is always v1 when user selects serve from models list. (#95) 1ef30e5 Feature/SK-377 | App lists - Handle status check when response is empty (#89) 9e8a7d1 Bug/SK-381 | It is possible to create an empty tag (#91) a0c46e4 Feature/SK-383 | Remove subdomain field in apps create/update view (#92) 2b230a5 Feature/SK-363 | Remove old CSS and Update bootstrap version (#85) 51deea2 Feature/SK-342 | Remove access to URL for rule "user can create" (#80) git-subtree-dir: apps git-subtree-split: 39d89ed
- Loading branch information
Showing
18 changed files
with
768 additions
and
357 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
from django.contrib import admin | ||
|
||
from .models import ( | ||
AppCategories, | ||
AppInstance, | ||
AppPermission, | ||
Apps, | ||
AppStatus, | ||
ResourceData, | ||
) | ||
from .models import AppCategories, AppInstance, Apps, AppStatus, ResourceData | ||
|
||
admin.site.register(Apps) | ||
|
||
class AppsAdmin(admin.ModelAdmin): | ||
list_display = ("name", "user_can_create", "slug", "revision") | ||
list_filter = ("user_can_create",) | ||
|
||
|
||
admin.site.register(Apps, AppsAdmin) | ||
admin.site.register(AppInstance) | ||
admin.site.register(AppCategories) | ||
admin.site.register(AppPermission) | ||
admin.site.register(ResourceData) | ||
admin.site.register(AppStatus) |
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,22 @@ | ||
from django.conf import settings | ||
|
||
|
||
def get_apps_limit_per_user(slug): | ||
"""get_apps_limit_per_user | ||
Args: | ||
slug (App.slug): slug for the app type | ||
Returns: | ||
Integer or None: returns the limit or None if not set | ||
""" | ||
try: | ||
apps_per_user_limit = ( | ||
settings.APPS_PER_USER_LIMIT | ||
if settings.APPS_PER_USER_LIMIT is not None | ||
else {} | ||
) | ||
except Exception: | ||
apps_per_user_limit = {} | ||
|
||
return apps_per_user_limit[slug] if slug in apps_per_user_limit else None |
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,16 @@ | ||
# Generated by Django 4.1.7 on 2023-03-14 13:26 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('apps', '0002_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='AppPermission', | ||
), | ||
] |
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
Oops, something went wrong.