Merge branch 'fix-dashboard-custom-menu' into 'master'
fix(admin): dashboard update custom menu list bug See merge request isard/isard-sso!72
commit
4523078eb2
|
@ -47,11 +47,13 @@ class Dashboard:
|
|||
return self.apply_updates()
|
||||
|
||||
def update_menu(self, menu):
|
||||
items = []
|
||||
for menu_item in menu.keys():
|
||||
for mustexist_key in ["href", "icon", "name", "shortname"]:
|
||||
if mustexist_key not in menu[menu_item].keys():
|
||||
return False
|
||||
self._update_custom_menu({"apps_external": menu})
|
||||
items.append(menu[menu_item])
|
||||
self._update_custom_menu({"apps_external": items})
|
||||
return self.apply_updates()
|
||||
|
||||
def update_logo(self, logo):
|
||||
|
@ -83,7 +85,5 @@ class Dashboard:
|
|||
return self.apply_updates()
|
||||
|
||||
def apply_updates(self):
|
||||
resp = requests.get(
|
||||
"http://isard-sso-api:7039/restart"
|
||||
)
|
||||
resp = requests.get("http://isard-sso-api:7039/restart")
|
||||
return True
|
||||
|
|
|
@ -480,7 +480,6 @@ def check_upload_errors(data):
|
|||
# @login_required
|
||||
def dashboard_put(item):
|
||||
if item == "colours":
|
||||
print("colours")
|
||||
try:
|
||||
data = request.get_json(force=True)
|
||||
dashboard.update_colours(data)
|
||||
|
|
Loading…
Reference in New Issue