Skip to content

Commit

Permalink
refactor: use drf instead of pure django views in admin42 (#1677)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzqs authored Oct 24, 2024
1 parent a8ef634 commit 97da5b9
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 926 deletions.
9 changes: 0 additions & 9 deletions apiserver/paasng/paasng/infras/perm_insure/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@
#
# A debug page, doesn't need perm checking
"StreamDebuggerView",
# TODO: The front page of admin, should add perm checking soon
"FrontPageView",
# TODO: The dynamic view created by runtime_views.ViewBuilder
"ListView",
"UpdateView",
"CreateView",
"DeleteView",
# TODO: The dynamic view created by runtimes.RuntimeAdminViewGenerator
"APIViewSet",
#
# == Function-based views
# below are django system views
Expand Down
90 changes: 0 additions & 90 deletions apiserver/paasng/paasng/plat_admin/admin42/forms.py

This file was deleted.

232 changes: 0 additions & 232 deletions apiserver/paasng/paasng/plat_admin/admin42/runtime_views.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
from paasng.utils.i18n.serializers import TranslatedCharField


class SlugBuilderBindRequest(serializers.Serializer):
buildpack_id_list = serializers.ListField(child=serializers.CharField())


class AppSlugBuilderSLZ(serializers.ModelSerializer):
display_name = TranslatedCharField()
description = TranslatedCharField()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ <h3 v-else class="panel-title">$[ panel.name ]</h3>
},
{
name: "运行时管理",
url: "{% url 'admin.buildpack.list' %}",
url: "{% url 'admin.runtimes.buildpack.manage' %}",
},
{
name: "智能顾问",
url: "{% url 'admin.smart_advisor.documents.manage' %}",
},
{
name: "应用资源方案",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,6 @@
{
name: '运行时管理',
icon: 'icon-tree-module-shape',
url: "{% url 'admin.runtime.buildpack.manage' %}",
children: [
{
name: 'BuildPack管理',
url: '{% url "admin.runtime.buildpack.manage" %}'
},
{
name: 'SlugBuilder管理',
url: '{% url "admin.runtime.slugbuilder.manage" %}'
},
{
name: 'SlugRunner管理',
url: '{% url "admin.runtime.slugrunner.manage" %}'
},
]
},
{
name: '运行时管理 (新)',
icon: 'icon-tree-module-shape',
url: "{% url 'admin.runtimes.buildpack.manage' %}",
children: [
{
Expand All @@ -87,7 +68,7 @@
{
name: '智能顾问',
icon: 'icon-tree-module-shape',
url: "{% url 'admin.services.manage' %}",
url: "{% url 'admin.smart_advisor.documents.manage' %}",
children: [
{
name: '文档管理',
Expand Down
Loading

0 comments on commit 97da5b9

Please sign in to comment.