Skip to content

Commit

Permalink
Re-organize the versioned ui api code files. (#2253)
Browse files Browse the repository at this point in the history
Now that we have two versions of the ui api, this change organizes them into subfolders to match
the pattern we have in the non-ui api code.

No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner authored Sep 5, 2024
1 parent 08dc2d6 commit 87a759d
Show file tree
Hide file tree
Showing 47 changed files with 17 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from galaxy_ng.app.api import base as api_base
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api.ui.serializers import LoginSerializer
from galaxy_ng.app.api.ui.v1.serializers import LoginSerializer
from galaxy_ng.app.auth.session import SessionAuthentication

from requests import post as requests_post
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from rest_framework.permissions import AllowAny

from galaxy_ng.app.api import base as api_base
from galaxy_ng.app.api.ui.serializers import SearchResultsSerializer
from galaxy_ng.app.api.ui.v1.serializers import SearchResultsSerializer
from galaxy_ng.app.api.v1.models import LegacyRole
from galaxy_ng.app.models.namespace import Namespace

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from galaxy_ng.app.api import base as api_base
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api.ui import serializers, versioning
from galaxy_ng.app.api.ui.v1 import serializers, versioning
from galaxy_ng.app.api.v3.serializers.sync import CollectionRemoteSerializer


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pulpcore.plugin.util import get_objects_for_user

from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api.ui import serializers, versioning
from galaxy_ng.app.api.ui.v1 import serializers, versioning
from galaxy_ng.app.api import base as api_base
from galaxy_ng.app import models

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from galaxy_ng.app import models
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api import base as api_base
from galaxy_ng.app.api.ui import serializers
from galaxy_ng.app.api.ui.v1 import serializers
from galaxy_ng.app.api.utils import GetObjectByIdMixin

log = logging.getLogger(__name__)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from galaxy_ng.app.api.v3.viewsets.namespace import NamespaceViewSet
from galaxy_ng.app.api.ui import versioning
from galaxy_ng.app.api.ui.v1 import versioning

log = logging.getLogger(__name__)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from galaxy_ng.app import models
from galaxy_ng.app.api import base as api_base
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api.ui import serializers
from galaxy_ng.app.api.ui.v1 import serializers


log = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pulp_ansible.app.serializers import TagSerializer

from galaxy_ng.app.api import base as api_base
from galaxy_ng.app.api.ui import versioning
from galaxy_ng.app.api.ui.v1 import versioning
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api.v1.models import LegacyRoleTag
from galaxy_ng.app.api.v1.serializers import LegacyRoleTagSerializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from galaxy_ng.app.models import auth as auth_models
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.api.ui import serializers, versioning
from galaxy_ng.app.api.ui.v1 import serializers, versioning
from galaxy_ng.app.api import base as api_base


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions galaxy_ng/app/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from django.urls import include, path

from . import views
from .ui import urls as ui_urls
from .ui_v2 import urls as ui_v2_urls
from .ui.v1 import urls as ui_v1_urls
from .ui.v2 import urls as ui_v2_urls
from .v1 import urls as v1_urls
from .v3 import urls as v3_urls

Expand Down Expand Up @@ -60,7 +60,7 @@
]

urlpatterns = [
path("_ui/", include((ui_urls, app_name), namespace="ui")),
path("_ui/", include((ui_v1_urls, app_name), namespace="ui")),
path("_ui/v2/", include((ui_v2_urls, app_name), namespace="ui_v2")),

path("", include((v3_combined, app_name), namespace='v3')),
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/app/api/v3/serializers/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rest_framework import serializers
from rest_framework.exceptions import ValidationError, _get_error_details

from galaxy_ng.app.api.ui.serializers.base import Serializer
from galaxy_ng.app.api.ui.v1.serializers.base import Serializer
from galaxy_ng.app.api.utils import parse_collection_filename

log = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/app/api/v3/serializers/execution_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from galaxy_ng.app import models
from galaxy_ng.app.access_control.fields import MyPermissionsField

from galaxy_ng.app.api.ui import serializers as ui_serializers
from galaxy_ng.app.api.ui.v1 import serializers as ui_serializers

namespace_fields = ("id", "pulp_href", "name", "my_permissions",
"owners", "created_at", "updated_at")
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
# -- ANSIBLE BASE RBAC --
# The rbac viewsets inherit from a defined base class to get their
# pagination settings
ANSIBLE_BASE_CUSTOM_VIEW_PARENT = "galaxy_ng.app.api.ui_v2.views.BaseView"
ANSIBLE_BASE_CUSTOM_VIEW_PARENT = "galaxy_ng.app.api.ui.v2.views.BaseView"
# If a role does not already exist that can give those object permissions
# then the system must create one, this is used for naming the auto-created role
ANSIBLE_BASE_ROLE_CREATOR_NAME = "{obj._meta.model_name} Creator Role"
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/app/tasks/index_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from pulp_container.app import models as container_models

from galaxy_ng.app.api.ui import serializers
from galaxy_ng.app.api.ui.v1 import serializers
from galaxy_ng.app import models


Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/app/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from galaxy_ng.app import models
from galaxy_ng.app.access_control import access_policy
from galaxy_ng.app.access_control.statements.roles import LOCKED_ROLES as GALAXY_LOCKED_ROLES
from galaxy_ng.app.api.ui import serializers
from galaxy_ng.app.api.ui.v1 import serializers
from galaxy_ng.app.api.v3.serializers import (
ContainerRepositorySerializer,
NamespaceSummarySerializer
Expand Down

0 comments on commit 87a759d

Please sign in to comment.