removed test nginx
parent
eea6982e84
commit
5991d6efc9
|
@ -4,11 +4,13 @@ services:
|
||||||
isard-sso-api:
|
isard-sso-api:
|
||||||
build:
|
build:
|
||||||
context: ${BUILD_ROOT_PATH}/docker/api
|
context: ${BUILD_ROOT_PATH}/docker/api
|
||||||
dockerfile: Dockerfile_nginx
|
dockerfile: Dockerfile
|
||||||
target: production
|
target: production
|
||||||
args:
|
args:
|
||||||
DOMAIN: $DOMAIN
|
DOMAIN: $DOMAIN
|
||||||
container_name: isard-sso-api
|
container_name: isard-sso-api
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- isard_net
|
- isard_net
|
||||||
|
|
|
@ -5,6 +5,7 @@ services:
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
container_name: isard-sso-avatars
|
container_name: isard-sso-avatars
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ${DATA_FOLDER}/avatars:/data
|
- ${DATA_FOLDER}/avatars:/data
|
||||||
- ${SRC_FOLDER}/avatars:/root/.minio
|
- ${SRC_FOLDER}/avatars:/root/.minio
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -13,6 +13,7 @@ services:
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ${BUILD_ROOT_PATH}/scripts/freeipa:/scripts
|
- ${BUILD_ROOT_PATH}/scripts/freeipa:/scripts
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
- ${DATA_FOLDER}/freeipa:/data
|
- ${DATA_FOLDER}/freeipa:/data
|
||||||
|
|
|
@ -9,8 +9,9 @@ services:
|
||||||
container_name: isard-sso-haproxy
|
container_name: isard-sso-haproxy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ${SRC_FOLDER}/haproxy/letsencrypt:/etc/letsencrypt:rw
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ${SRC_FOLDER}/haproxy/certs:/certs:rw
|
- ${SRC_FOLDER}/haproxy/letsencrypt:/etc/letsencrypt:rw
|
||||||
|
- ${SRC_FOLDER}/haproxy/certs:/certs:rw
|
||||||
networks:
|
networks:
|
||||||
- isard_net
|
- isard_net
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
version: '3.7'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
isard-sso-keycloak:
|
isard-sso-keycloak:
|
||||||
image: quay.io/keycloak/keycloak:latest
|
image: quay.io/keycloak/keycloak:latest
|
||||||
container_name: isard-sso-keycloak
|
container_name: isard-sso-keycloak
|
||||||
#hostname: sso.${DOMAIN}
|
#hostname: sso.${DOMAIN}
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ${BUILD_ROOT_PATH}/init/keycloak/jsons:/opt/jboss/keycloak/imports
|
- ${BUILD_ROOT_PATH}/init/keycloak/jsons:/opt/jboss/keycloak/imports
|
||||||
- ${BUILD_ROOT_PATH}/init/keycloak/scripts/:/opt/jboss/startup-scripts/
|
- ${BUILD_ROOT_PATH}/init/keycloak/scripts/:/opt/jboss/startup-scripts/
|
||||||
- ${BUILD_ROOT_PATH}/docker/keycloak/themes:/opt/jboss/keycloak/themes/
|
- ${BUILD_ROOT_PATH}/docker/keycloak/themes:/opt/jboss/keycloak/themes/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version: "3.6"
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
isard-sso-postgresql:
|
isard-sso-postgresql:
|
||||||
image: postgres:alpine
|
image: postgres:alpine
|
||||||
|
@ -7,6 +7,7 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ${DB_FOLDER}/postgres:/var/lib/postgresql/data
|
- ${DB_FOLDER}/postgres:/var/lib/postgresql/data
|
||||||
- ${BUILD_ROOT_PATH}/init/databases:/docker-entrypoint-initdb.d
|
- ${BUILD_ROOT_PATH}/init/databases:/docker-entrypoint-initdb.d
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.13.5 as production
|
FROM nginx:alpine as production
|
||||||
MAINTAINER isard <info@isard.com>
|
MAINTAINER isard <info@isard.com>
|
||||||
|
|
||||||
RUN apk add --no-cache python3 py3-pip
|
RUN apk add --no-cache python3 py3-pip
|
||||||
|
@ -16,6 +16,9 @@ RUN apk add curl py3-yaml
|
||||||
COPY ./src /api
|
COPY ./src /api
|
||||||
|
|
||||||
#EXPOSE 7039
|
#EXPOSE 7039
|
||||||
WORKDIR /api
|
#WORKDIR /api
|
||||||
CMD [ "python3", "start.py" ]
|
#CMD [ "python3", "start.py" ]
|
||||||
|
|
||||||
|
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
ADD entrypoint.sh /docker-entrypoint.d/
|
||||||
|
RUN chmod 775 /docker-entrypoint.d/entrypoint.sh
|
|
@ -1,28 +0,0 @@
|
||||||
#FROM alpine:3.13.5 as build
|
|
||||||
FROM nginx:alpine as production
|
|
||||||
MAINTAINER isard <info@isard.com>
|
|
||||||
|
|
||||||
RUN apk add --no-cache python3 py3-pip
|
|
||||||
RUN pip3 install --upgrade pip
|
|
||||||
RUN apk add --no-cache --virtual .build_deps \
|
|
||||||
build-base \
|
|
||||||
python3-dev \
|
|
||||||
libffi-dev
|
|
||||||
COPY ./requirements.pip3 /requirements.pip3
|
|
||||||
RUN pip3 install --no-cache-dir -r requirements.pip3
|
|
||||||
RUN apk del .build_deps
|
|
||||||
|
|
||||||
RUN apk add curl py3-yaml
|
|
||||||
|
|
||||||
COPY ./src /api
|
|
||||||
|
|
||||||
#EXPOSE 7039
|
|
||||||
#WORKDIR /api
|
|
||||||
#CMD [ "python3", "start.py" ]
|
|
||||||
|
|
||||||
#FROM nginx:alpine as production
|
|
||||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
|
||||||
#COPY --from=build /api/api/static /usr/share/nginx/html
|
|
||||||
ADD entrypoint.sh /docker-entrypoint.d/
|
|
||||||
RUN chmod 775 /docker-entrypoint.d/entrypoint.sh
|
|
||||||
#CMD ["entrypoint.sh"]
|
|
|
@ -1,65 +0,0 @@
|
||||||
#!flask/bin/python
|
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
import os
|
|
||||||
import logging as log
|
|
||||||
|
|
||||||
from flask import Flask, send_from_directory, render_template
|
|
||||||
app = Flask(__name__, static_url_path='')
|
|
||||||
app = Flask(__name__, template_folder='static/templates')
|
|
||||||
app.url_map.strict_slashes = False
|
|
||||||
|
|
||||||
'''
|
|
||||||
App secret key for encrypting cookies
|
|
||||||
You can generate one with:
|
|
||||||
import os
|
|
||||||
os.urandom(24)
|
|
||||||
And paste it here.
|
|
||||||
'''
|
|
||||||
app.secret_key = "Change this key!//\xf7\x83\xbe\x17\xfa\xa3zT\n\\]m\xa6\x8bF\xdd\r\xf7\x9e\x1d\x1f\x14'"
|
|
||||||
|
|
||||||
print('Starting isard-sso api...')
|
|
||||||
|
|
||||||
from api.lib.load_config import loadConfig
|
|
||||||
try:
|
|
||||||
loadConfig(app)
|
|
||||||
except:
|
|
||||||
print('Could not get environment variables...')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'''
|
|
||||||
Debug should be removed on production!
|
|
||||||
'''
|
|
||||||
if app.debug:
|
|
||||||
log.warning('Debug mode: {}'.format(app.debug))
|
|
||||||
else:
|
|
||||||
log.info('Debug mode: {}'.format(app.debug))
|
|
||||||
|
|
||||||
'''
|
|
||||||
Serve static files
|
|
||||||
'''
|
|
||||||
@app.route('/templates/<path:path>')
|
|
||||||
def send_templates(path):
|
|
||||||
return send_from_directory(os.path.join(app.root_path, 'static/templates'), path)
|
|
||||||
|
|
||||||
# @app.route('/static/<path:path>')
|
|
||||||
# def send_static_js(path):
|
|
||||||
# return send_from_directory(os.path.join(app.root_path, 'static'), path)
|
|
||||||
|
|
||||||
# @app.errorhandler(404)
|
|
||||||
# def not_found_error(error):
|
|
||||||
# return render_template('page_404.html'), 404
|
|
||||||
|
|
||||||
# @app.errorhandler(500)
|
|
||||||
# def internal_error(error):
|
|
||||||
# return render_template('page_500.html'), 500
|
|
||||||
|
|
||||||
'''
|
|
||||||
Import all views
|
|
||||||
'''
|
|
||||||
from .views import MenuViews
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from api import app
|
|
||||||
|
|
||||||
import os, sys
|
|
||||||
import logging as log
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
class loadConfig():
|
|
||||||
|
|
||||||
def __init__(self, app=None):
|
|
||||||
try:
|
|
||||||
app.config.setdefault('DOMAIN', os.environ['DOMAIN'])
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
log.error(traceback.format_exc())
|
|
||||||
raise
|
|
|
@ -1,46 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# coding=utf-8
|
|
||||||
# Copyright 2017 the Isard-vdi project authors:
|
|
||||||
# Josep Maria Viñolas Auquer
|
|
||||||
# Alberto Larraz Dalmases
|
|
||||||
# License: AGPLv3
|
|
||||||
import time
|
|
||||||
from api import app as application
|
|
||||||
from datetime import datetime, timedelta
|
|
||||||
import pprint
|
|
||||||
|
|
||||||
import logging
|
|
||||||
import traceback
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
class Menu():
|
|
||||||
def __init__(self):
|
|
||||||
self.menudict=self.gen_header()
|
|
||||||
pprint.pprint(self.menudict)
|
|
||||||
None
|
|
||||||
|
|
||||||
def gen_header(self):
|
|
||||||
with open(r'system.yaml') as yml:
|
|
||||||
system=yaml.load(yml, Loader=yaml.FullLoader)
|
|
||||||
apps_internal = []
|
|
||||||
for app in system['apps_internal']:
|
|
||||||
app['href']='https://'+app['subdomain']+'.'+application.config['DOMAIN']+app['href']
|
|
||||||
del app['subdomain']
|
|
||||||
apps_internal.append(app)
|
|
||||||
|
|
||||||
with open(r'custom.yaml') as yml:
|
|
||||||
custom=yaml.load(yml, Loader=yaml.FullLoader)
|
|
||||||
custom['background_login']='https://api.'+application.config['DOMAIN']+custom['background_login']
|
|
||||||
custom['logo']='https://api.'+application.config['DOMAIN']+custom['logo']
|
|
||||||
|
|
||||||
menudict={**custom,**{'apps_internal':apps_internal}}
|
|
||||||
menudict['user']={}
|
|
||||||
menudict['user']['account']='https://sso.'+application.config['DOMAIN']+system['user']['account']
|
|
||||||
menudict['user']['avatar']='https://sso.'+application.config['DOMAIN']+system['user']['avatar']
|
|
||||||
menudict['user']['password']='https://sso.'+application.config['DOMAIN']+system['user']['password']
|
|
||||||
return menudict
|
|
||||||
|
|
||||||
def get_header(self):
|
|
||||||
return self.menudict
|
|
||||||
# with open('menu.yaml', 'w') as yml:
|
|
||||||
# print(yaml.dump(header, yml, allow_unicode=True))
|
|
File diff suppressed because one or more lines are too long
|
@ -1,196 +0,0 @@
|
||||||
#body-user, #body-settings, #body-public {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
color: #262626;
|
|
||||||
}
|
|
||||||
|
|
||||||
#body-user #app-dashboard>h2, #body-settings #app-dashboard>h2, #body-public #app-dashboard>h2 {
|
|
||||||
color: #262626;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#body-user header#header, #body-settings header#header, #body-public header#header {
|
|
||||||
background-color: white !important;
|
|
||||||
height: 74px ;
|
|
||||||
box-shadow: 0 2px 4px #00000014;
|
|
||||||
border-bottom: 1px solid #262626;
|
|
||||||
background-image: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
#theming-preview-logo, #header #nextcloud {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #unified-search svg {
|
|
||||||
fill: #262626;
|
|
||||||
width: 35px;
|
|
||||||
height: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header .notifications .notifications-button img.svg {
|
|
||||||
background-color: #262626;
|
|
||||||
padding: 5px;
|
|
||||||
border-radius: 18px;
|
|
||||||
height: 23px;
|
|
||||||
width: 23px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#header #contactsmenu {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #contactsmenu .icon-contacts {
|
|
||||||
background-color: #262626;
|
|
||||||
padding: 5px;
|
|
||||||
border-radius: 18px;
|
|
||||||
height: 23px;
|
|
||||||
width: 23px;
|
|
||||||
opacity: 1;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #settings #expand .avatardiv {
|
|
||||||
height: 35px;
|
|
||||||
width: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #settings #expand .avatardiv img {
|
|
||||||
height: 35px;
|
|
||||||
width: 35px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#header #unified-search a.header-menu__trigger {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #unified-search a.header-menu__trigger .magnify-icon {
|
|
||||||
width: 35px;
|
|
||||||
height: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#body-user div#content, #body-settings div#content, #body-public div#content {
|
|
||||||
padding-top: 75px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#body-user div#content div#app-dashboard, #body-settings div#content div#app-dashboard, #body-public div#content div#app-dashboard {
|
|
||||||
background-image: none !important;
|
|
||||||
background-color: #F0F0F0!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#body-user div#app-navigation, #body-settings div#app-navigation, #body-public div#app-navigation {
|
|
||||||
top: 75px;
|
|
||||||
height: calc(100% - 75px);
|
|
||||||
color: #262626 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header .header-menu__wrapper[data-v-a58f012a] {
|
|
||||||
top: 65px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps #menu-apps-btn #dropdownMenuAppsButton {
|
|
||||||
cursor: pointer;
|
|
||||||
border: none;
|
|
||||||
background-color: inherit;
|
|
||||||
padding: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header div#navbar-menu-apps {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps #menu-apps-btn {
|
|
||||||
margin-right: 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps #menu-apps-btn #dropdownMenuAppsButton {
|
|
||||||
cursor: pointer;
|
|
||||||
border: none;
|
|
||||||
background-color: inherit;
|
|
||||||
padding: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
border: 1px solid rgba(0,0,0,.15);
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: rgb(0 0 0 / 20%) 0 3px 8px;
|
|
||||||
margin-top: 15px;
|
|
||||||
padding: 10px;
|
|
||||||
max-height: 500px;
|
|
||||||
overflow-y: scroll;
|
|
||||||
z-index: 2000;
|
|
||||||
background-color: white;
|
|
||||||
top: 33px;
|
|
||||||
right: -14px;
|
|
||||||
left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul {
|
|
||||||
list-style: none;
|
|
||||||
display: grid;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 15px 2px 0 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
grid-template-columns: 82px 82px 82px;
|
|
||||||
grid-gap: 12px 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul#app-admin {
|
|
||||||
border-bottom: 1px solid #D9D9D9;
|
|
||||||
padding-bottom: 4px;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul#app-external {
|
|
||||||
border-top: 1px solid #D9D9D9;
|
|
||||||
padding-top: 20px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: start;
|
|
||||||
text-align: center;
|
|
||||||
color: #262626;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link .icon {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
background-color: #d5045c;
|
|
||||||
border-radius: .25rem;
|
|
||||||
margin-right: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link .text {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 4px;
|
|
||||||
height: 26px;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link .icon i {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 19px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#content-vue {
|
|
||||||
padding-top: 75px;
|
|
||||||
}
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
|
@ -1,5 +0,0 @@
|
||||||
jQuery(document).ready(function() {
|
|
||||||
$('#dropdownMenuAppsButton').click(function (e) {
|
|
||||||
$('#dropdownMenuApps').toggle();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,208 +0,0 @@
|
||||||
|
|
||||||
<div id="navbar-menu-apps">
|
|
||||||
<div id="menu-apps-btn">
|
|
||||||
<button type="button" id="dropdownMenuAppsButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
||||||
<svg id="Menú_Apps" data-name="Menú Apps" xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
|
|
||||||
<rect id="Rectángulo_2" data-name="Rectángulo 2" width="6" height="6" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1447" data-name="Rectángulo 1447" width="6" height="6" transform="translate(0 10)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1450" data-name="Rectángulo 1450" width="6" height="6" transform="translate(0 20)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1440" data-name="Rectángulo 1440" width="6" height="6" transform="translate(10)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1446" data-name="Rectángulo 1446" width="6" height="6" transform="translate(10 10)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1449" data-name="Rectángulo 1449" width="6" height="6" transform="translate(10 20)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1441" data-name="Rectángulo 1441" width="6" height="6" transform="translate(20)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1445" data-name="Rectángulo 1445" width="6" height="6" transform="translate(20 10)" fill="#262626"/>
|
|
||||||
<rect id="Rectángulo_1448" data-name="Rectángulo 1448" width="6" height="6" transform="translate(20 20)" fill="#262626"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<div id="dropdownMenuApps" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" >
|
|
||||||
<ul id="app-admin">
|
|
||||||
<li class="app roles">
|
|
||||||
<a href="https://sso.escola3.digitaldemocratic.net/auth/admin/" class="app-link" target="_blank">
|
|
||||||
<div class="icon roles">
|
|
||||||
<i class="fa fa-user-secret" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Rols</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app evaluation">
|
|
||||||
<a href="https://bfgh.aplicacions.ensenyament.gencat.cat/bfgh" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-edit"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Avaluació</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul id="app-apps" class="apps">
|
|
||||||
<li class="app cloud">
|
|
||||||
<a href="https://moodle.escola3.digitaldemocratic.net" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-graduation-cap"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Aules</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<!--
|
|
||||||
<li class="app email">
|
|
||||||
<a href="/apps/mail" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="far fa-envelope"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Correu</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app search">
|
|
||||||
<a href="http://duckduckgo.com" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-search" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Cercar</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
-->
|
|
||||||
<li class="app create-files">
|
|
||||||
<a href="/apps/files" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="far fa-file-word"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Arxius</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app form-feedback">
|
|
||||||
<a href="/apps/polls" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-chart-bar"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Enquestes</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app form-feedback">
|
|
||||||
<a href="/apps/forms" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-check-square"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Formularis</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app chats">
|
|
||||||
<a href="/apps/spreed" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="far fa-comment-dots"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Xat</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<!--
|
|
||||||
<li class="app meet-jitsi">
|
|
||||||
<a href="http://meet.jit.si" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-video"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Reunions Jitsi</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app meet-bbb">
|
|
||||||
<a href="https://bbb.digitaldemocratic.net" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-video"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Reunions BBB</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
-->
|
|
||||||
<li class="app blogs">
|
|
||||||
<a href="https://wp.escola3.digitaldemocratic.net/wp-login.php?saml_sso" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-rss" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Blogs</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app contacts">
|
|
||||||
<a href="/apps/contacts" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-users" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Contactes</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app schedule">
|
|
||||||
<a href="/apps/calendar" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Calendari</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app tasks">
|
|
||||||
<a href="/apps/tasks" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-list-ol" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Tasques</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<!--
|
|
||||||
<li class="app evaluation">
|
|
||||||
<a href="https://moodle.escola3.digitaldemocratic.net" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="far fa-edit"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Avaluació</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
-->
|
|
||||||
<li class="app photos">
|
|
||||||
<a href="/apps/photos" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="far fa-file-image"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Fotos</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app maps">
|
|
||||||
<a href="/apps/maps" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-map-marker" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Mapes</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app pad">
|
|
||||||
<a href="https://pad.escola3.digitaldemocratic.net" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="far fa-file-alt"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Pads</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul id="app-external" class="external-links">
|
|
||||||
<li class="app youtube">
|
|
||||||
<a href="https://youtube.com" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fab fa-youtube"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Youtube</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app dict">
|
|
||||||
<a href="http://diccionari.cat" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fa fa-book" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Diccionari</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="app meet-jitsi">
|
|
||||||
<a href="http://meet.jit.si" class="app-link" target="_blank">
|
|
||||||
<div class="icon">
|
|
||||||
<i class="fas fa-video"></i>
|
|
||||||
</div>
|
|
||||||
<div class="text">Reunions Jitsi</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,46 +0,0 @@
|
||||||
<div id="navbar-nextcloud" class="header-right">
|
|
||||||
|
|
||||||
<div id="unified-search"></div>
|
|
||||||
<div id="notifications"></div>
|
|
||||||
<div id="contactsmenu">
|
|
||||||
<div class="icon-contacts menutoggle" tabindex="0" role="button"
|
|
||||||
aria-haspopup="true" aria-controls="contactsmenu-menu" aria-expanded="false">
|
|
||||||
<span class="hidden-visually"><?php p($l->t('Contacts'));?></span>
|
|
||||||
</div>
|
|
||||||
<div id="contactsmenu-menu" class="menu"
|
|
||||||
aria-label="<?php p($l->t('Contacts menu'));?>"></div>
|
|
||||||
</div>
|
|
||||||
<div id="settings">
|
|
||||||
<div id="expand" tabindex="0" role="button" class="menutoggle"
|
|
||||||
aria-label="<?php p($l->t('Settings'));?>"
|
|
||||||
aria-haspopup="true" aria-controls="expanddiv" aria-expanded="false">
|
|
||||||
<div class="avatardiv<?php if ($_['userAvatarSet']) {
|
|
||||||
print_unescaped(' avatardiv-shown');
|
|
||||||
} else {
|
|
||||||
print_unescaped('" style="display: none');
|
|
||||||
} ?>">
|
|
||||||
<?php if ($_['userAvatarSet']): ?>
|
|
||||||
<img alt="" width="32" height="32"
|
|
||||||
src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']]));?>"
|
|
||||||
srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']]));?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']]));?> 4x"
|
|
||||||
>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
<div id="expandDisplayName" class="icon-settings-white"></div>
|
|
||||||
</div>
|
|
||||||
<nav class="settings-menu" id="expanddiv" style="display:none;"
|
|
||||||
aria-label="<?php p($l->t('Settings menu'));?>">
|
|
||||||
<ul>
|
|
||||||
<?php foreach ($_['settingsnavigation'] as $entry):?>
|
|
||||||
<li data-id="<?php p($entry['id']); ?>">
|
|
||||||
<a href="<?php print_unescaped($entry['href']); ?>"
|
|
||||||
<?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
|
|
||||||
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
|
|
||||||
<?php p($entry['name']) ?>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!flask/bin/python
|
|
||||||
# coding=utf-8
|
|
||||||
from api import app
|
|
||||||
import logging as log
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
from uuid import uuid4
|
|
||||||
import time,json
|
|
||||||
import sys,os
|
|
||||||
from flask import render_template, Response, request, redirect, url_for, jsonify
|
|
||||||
|
|
||||||
from ..lib.menu import Menu
|
|
||||||
menu = Menu()
|
|
||||||
|
|
||||||
@app.route('/header/<format>', methods=['GET'])
|
|
||||||
@app.route('/header/<format>/application', methods=['GET'])
|
|
||||||
def api_v2_header(format,application=False):
|
|
||||||
if application == False:
|
|
||||||
if format == 'json':
|
|
||||||
if application == False:
|
|
||||||
return json.dumps(menu.get_header()), 200, {'Content-Type': 'application/json'}
|
|
||||||
if format == 'html':
|
|
||||||
if application == False:
|
|
||||||
return render_template('header.html', data=menu.get_header())
|
|
||||||
if application == 'nextcloud':
|
|
||||||
return render_template('header_nextcloud.html', data=menu.get_header())
|
|
||||||
if application == 'wordpress':
|
|
||||||
return render_template('header_wordpress.html', data=menu.get_header())
|
|
|
@ -1,32 +0,0 @@
|
||||||
---
|
|
||||||
background_login: /img/background.png
|
|
||||||
colours:
|
|
||||||
background: "#F0F0F0"
|
|
||||||
primary: "#92AE01"
|
|
||||||
secondary: "#FFFFFF"
|
|
||||||
logo: /img/logo.png
|
|
||||||
apps_external:
|
|
||||||
- href: https://agora.xtec.cat/ceipmontseny-barcelona/
|
|
||||||
icon: fa fa-university
|
|
||||||
name: Escola Web
|
|
||||||
shortname: web
|
|
||||||
- href: https://youtube.com/
|
|
||||||
icon: fa fa-youtube-play
|
|
||||||
name: Youtube
|
|
||||||
shortname: youtube
|
|
||||||
- href: https://www.wordreference.com/
|
|
||||||
icon: fa fa-book
|
|
||||||
name: Diccionari
|
|
||||||
shortname: diccionari
|
|
||||||
- href: http://meet.jit.si/
|
|
||||||
icon: fa fa-video-camera
|
|
||||||
name: Reunions Jitsi
|
|
||||||
shortname: jitsi
|
|
||||||
- href: https://www.google.es/
|
|
||||||
icon: fa fa-search
|
|
||||||
name: Cercar
|
|
||||||
shortname: search
|
|
||||||
- href: https://www.google.es/maps/preview
|
|
||||||
icon: fa fa-map-marker
|
|
||||||
name: Maps
|
|
||||||
shortname: maps
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!flask/bin/python
|
|
||||||
# coding=utf-8
|
|
||||||
from gevent import monkey
|
|
||||||
monkey.patch_all()
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
from api import app
|
|
||||||
|
|
||||||
# import pprint
|
|
||||||
# pprint.pprint(app.yaml)
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app.run(host='0.0.0.0', port=7039, debug=False) #, logger=logger, engineio_logger=engineio_logger)
|
|
|
@ -1,55 +0,0 @@
|
||||||
apps_internal:
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /
|
|
||||||
icon: fa fa-cloud
|
|
||||||
name: Núvol + crear arxius
|
|
||||||
shortname: cloud
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/mail/setup
|
|
||||||
icon: fa fa-envelope-o
|
|
||||||
name: Correu
|
|
||||||
shortname: email
|
|
||||||
- subdomain: pad
|
|
||||||
href: /
|
|
||||||
icon: fa fa-file-text-o
|
|
||||||
name: Pads
|
|
||||||
shortname: pads
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/forms
|
|
||||||
icon: fa fa-check-square-o
|
|
||||||
name: Formularis
|
|
||||||
shortname: forms
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/polls
|
|
||||||
icon: fa fa-bar-chart
|
|
||||||
name: Enquestes
|
|
||||||
shortname: feedback
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/spreed
|
|
||||||
icon: fa fa-commenting-o
|
|
||||||
name: Xat
|
|
||||||
shortname: chat
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/calendar
|
|
||||||
icon: fa fa-calendar
|
|
||||||
name: Calendari
|
|
||||||
shortname: schedule
|
|
||||||
- subdomain: wp
|
|
||||||
href: /wp-login.php?saml_sso
|
|
||||||
icon: fa fa-rss
|
|
||||||
name: Webs
|
|
||||||
shortname: webs
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/bbb
|
|
||||||
icon: fa fa-video-camera
|
|
||||||
name: Reunions BBB
|
|
||||||
shortname: meets_bbb
|
|
||||||
- subdomain: nextcloud
|
|
||||||
href: /apps/photos
|
|
||||||
icon: fa fa-file-image-o
|
|
||||||
name: Fotos
|
|
||||||
shortname: photos
|
|
||||||
user:
|
|
||||||
account: /auth/realms/master/account
|
|
||||||
avatar: /auth/realms/master/avatar-provider
|
|
||||||
password: /auth/realms/master/password
|
|
Loading…
Reference in New Issue