Skip to content

Commit

Permalink
Add Issue admin panel.
Browse files Browse the repository at this point in the history
Signed-off-by: Edmondfrank <[email protected]>
  • Loading branch information
EdmondFrank committed Nov 7, 2024
1 parent 1bd464f commit 285790f
Show file tree
Hide file tree
Showing 6 changed files with 410 additions and 12 deletions.
7 changes: 5 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ config ExIndexea.Config,

config :ex_indexea,
repo_index: 1027,
issue_index: 1028,
issue_index: 1115,
creator_id: 1072,
owner_id: 1066,
open_search_id: 1074
issue_owner_id: 1067,
open_search_id: 1074,
issue_search_id: 1154

config :compass_admin, :configurations, %{
nginx_config: "/path/to/nginx/nginx.conf",
Expand All @@ -59,6 +61,7 @@ config :compass_admin, CompassAdmin.Agents.FrontendAgent,
config :compass_admin, CompassAdmin.Agents.BackendAgent,
input: [""],
execute: "pyinfra prod-nodes.py prod-backend-deploy.py"

config :compass_admin, CompassAdminWeb.ConfigurationLive,
execute:
"cd {config_dir} && git config user.name {username} && git config user.email {useremail} && git add {config_path} && git commit -m '{commit_message}' && git push"
Expand Down
2 changes: 2 additions & 0 deletions lib/compass_admin/user.ex
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ defmodule CompassAdmin.User do
def super_role, do: 10

def admin_role, do: 65535

def is_admin?(user), do: user.role_level >= admin_role()
end
16 changes: 13 additions & 3 deletions lib/compass_admin_web/live/backoffice/layout.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,19 @@ defmodule CompassAdminWeb.Live.Backoffice.Layout do
},
%{
label: "Gitee",
link: "/admin/gitee",
icon: gitee_icon()
}
icon: gitee_icon(),
expanded: true,
links: [
%{
label: "Repositories",
link: "/admin/gitee/repos"
},
%{
label: "Issues",
link: "/admin/gitee/issues"
}
]
},
]
end
end
Loading

0 comments on commit 285790f

Please sign in to comment.