Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customizable look and feel for portal #20848

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions make/harbor.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,19 @@ cache:
# # suggest switch provider to redis if you were ran into the db connections spike around
# # the scenario of high concurrent pushing to same project, no improvement for other scenes.
# quota_update_provider: redis # Or db

# Look and Feel
# Use this section to customize the Look and Feel of your Harbor instance
# see https://goharbor.io/docs/latest/build-customize-contribute/customize-look-feel/
# look_and_feel:
# header_bg_color:
# dark_mode:
# light_mode:
# login_bg_img_base_path:
# login_bg_img_file:
# login_title:
# product:
# logo_base_path:
# logo_file:
# name:
# introduction:
21 changes: 21 additions & 0 deletions make/photon/prepare/migrations/version_2_12_0/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
from jinja2 import Environment, FileSystemLoader, StrictUndefined, select_autoescape
from utils.migration import read_conf

revision = '2.12.0'
down_revisions = ['2.11.0']

def migrate(input_cfg, output_cfg):
current_dir = os.path.dirname(__file__)
tpl = Environment(
loader=FileSystemLoader(current_dir),
undefined=StrictUndefined,
trim_blocks=True,
lstrip_blocks=True,
autoescape = select_autoescape()
).get_template('harbor.yml.jinja')

config_dict = read_conf(input_cfg)

with open(output_cfg, 'w') as f:
f.write(tpl.render(**config_dict))
Loading
Loading