feature: endpoints in config

This commit is contained in:
Jean-Baptiste Pasquier 2019-06-24 13:56:49 +02:00
parent fddc9151e6
commit 539b297417
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
10 changed files with 68 additions and 31 deletions

View File

@ -1,29 +1,66 @@
{
"dev": {
"sdn": "http://127.0.0.1:8000",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "000000"
"authority": "http://127.0.0.1:8000/openid/",
"client_id": "000000",
"endpoints": {
"businessproviders": "http://127.0.0.1:8000/businessproviders/",
"circles": "http://127.0.0.1:8000/circles/",
"groups": "http://127.0.0.1:8000/groups/",
"joboffers": "http://127.0.0.1:8000/job-offers/",
"projects": "http://127.0.0.1:8000/projects/",
"skills": "http://127.0.0.1:8000/skills/",
"users": "http://127.0.0.1:8000/users/"
}
},
"alpha": {
"sdn": "https://api.alpha.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "218707"
"authority": "https://api.alpha.happy-dev.fr/openid/",
"client_id": "218707",
"endpoints": {
"businessproviders": "https://api.alpha.happy-dev.fr/businessproviders/",
"circles": "https://api.alpha.happy-dev.fr/circles/",
"groups": "https://api.alpha.happy-dev.fr/groups/",
"joboffers": "https://api.alpha.happy-dev.fr/job-offers/",
"projects": "https://api.alpha.happy-dev.fr/projects/",
"skills": "https://api.alpha.happy-dev.fr/skills/",
"users": "https://api.alpha.happy-dev.fr/users/"
}
},
"paris": {
"sdn": "https://api.test-paris.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "196656"
"authority": "https://api.test-paris.happy-dev.fr/openid/",
"client_id": "196656",
"endpoints": {
"businessproviders": "https://api.test-paris.happy-dev.fr/businessproviders/",
"circles": "https://api.test-paris.happy-dev.fr/sources/circles/",
"groups": "https://api.test-paris.happy-dev.fr/groups/",
"joboffers": "https://api.test-paris.happy-dev.fr/sources/job-offers/",
"projects": "https://api.test-paris.happy-dev.fr/sources/projects/",
"skills": "https://api.test-paris.happy-dev.fr/skills/",
"users": "https://api.test-paris.happy-dev.fr/users/"
}
},
"nantes": {
"sdn": "https://api.test-nantes.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "621272"
"authority": "https://api.test-nantes.happy-dev.fr/openid/",
"client_id": "621272",
"endpoints": {
"businessproviders": "https://api.test-nantes.happy-dev.fr/businessproviders/",
"circles": "https://api.test-nantes.happy-dev.fr/sources/circles/",
"groups": "https://api.test-nantes.happy-dev.fr/groups/",
"joboffers": "https://api.test-nantes.happy-dev.fr/sources/job-offers/",
"projects": "https://api.test-nantes.happy-dev.fr/sources/projects/",
"skills": "https://api.test-nantes.happy-dev.fr/skills/",
"users": "https://api.test-nantes.happy-dev.fr/users/"
}
}
}

View File

@ -27,7 +27,7 @@ button(role='log in' onclick="document.querySelector('sib-auth').login();") Logi
sib-auth
sib-auth-provider(
class="sib-auth-provider"
data-authority=`${sdn}/openid/`
data-authority=`${authority}`
data-client_id=`${client_id}`,
data-id="paris"
data-response_type='id_token token',

View File

@ -18,10 +18,10 @@ nav#main__menu
div.menu-icon.icon-arrow-up
div.menu-label Projects
div.menu-icon.icon-folder-alt
sib-route(hidden,name='project', id-prefix=`${sdn}/projects/`, rdf-type='hd:project', use-id='')
sib-route(hidden,name='project', id-prefix=`${endpoints.projects}`, rdf-type='hd:project', use-id='')
div.sub-menu.menu-notification
sib-display(
data-src=`${sdn}/sources/projects/`
data-src=`${endpoints.projects}`
data-fields='project'
set-project='customer.name, dash, name'
value-dash=' - '
@ -34,10 +34,10 @@ nav#main__menu
//- div.menu-icon.icon-arrow-up
//- div.menu-label Cercles
//- div.menu-icon.icon-globe
//- sib-route(hidden, name='circle', id-prefix=`${sdn}/circles/`, rdf-type='hd:circle')
//- sib-route(hidden, name='circle', id-prefix=`${endpoints.circles}`, rdf-type='hd:circle')
//- div.sub-menu
//- sib-display(
//- data-src=`${sdn}/sources/circles/`,
//- data-src=`${endpoints.circles}`,
//- data-fields='name',
//- widget-name='sib-display-div',
//- next='circle'
@ -49,10 +49,10 @@ nav#main__menu
div.menu-icon.icon-arrow-up
div.menu-label Chat
div.menu-icon.icon-envelope-letter
sib-route(hidden, name='messages', id-prefix=`${sdn}/users/`, rdf-type='foaf:user', use-id='')
sib-route(hidden, name='messages', id-prefix=`${endpoints.users}`, rdf-type='foaf:user', use-id='')
div.sub-menu.menu-notification
sib-display(
data-src=`${sdn}/users/`
data-src=`${endpoints.users}`
data-fields='username, account.user'
widget-username='sib-display-div'
widget-account.user='hd-counter'

View File

@ -3,9 +3,9 @@
p Here you can create a new group according to your interests, what you want to share, etc.
sib-form(
data-src=`${sdn}/sources/circles/`,
range-owner=`${sdn}/users/`,
range-team=`${sdn}/users/`
data-src=`${endpoints.circles}`,
range-owner=`${endpoints.users}`,
range-team=`${endpoints.users}`
data-fields='name, description, description-text, owner, owner-text, team, team-text, jabberRoom, foaf:jabberID',

View File

@ -1,9 +1,9 @@
#circle-edit.content-box.with-form.full-width
h1 Edit group
sib-form.block(
range-owner=`${sdn}/members/`,
range-owner=`${endpoints.users}`,
data-fields="name, description, owner, team, jabberID, jabberRoom"
range-team=`${sdn}/members/`,
range-team=`${endpoints.users}`,
widget-team='sib-form-multiple-dropdown',
bind-resources
)

View File

@ -11,8 +11,8 @@
p Be specific and exhaustive to avoid answering too many questions later. Indicate what is the best way to fill the offer, the prerequisites...'
sib-form.block(
data-src=`${sdn}/sources/job-offers/`
range-skills=`${sdn}/skills/`
data-src=`${endpoints.joboffers}`
range-skills=`${endpoints.skills}`
data-fields='title, title-text, description, description-text, skills, closingDate'

View File

@ -1,7 +1,7 @@
.job-offers__container
sib-job-board(
data-src=`${sdn}/job-offers/`,
range-skills=`${sdn}/skills/`
data-src=`${endpoints.joboffers}`,
range-skills=`${endpoints.skills}`
)
div.job-offers__newoffer

View File

@ -1,6 +1,6 @@
sib-directory(
data-src=`${sdn}/users/`,
range-groups=`${sdn}/groups/`,
range-skills=`${sdn}/skills/`
data-src=`${endpoints.users}`,
range-groups=`${endpoints.groups}`,
range-skills=`${endpoints.skills}`
)

View File

@ -3,9 +3,9 @@
p Here you can create your project, add members and assign them a job.
sib-form.block(
data-src=`${sdn}/sources/projects/`,
range-members=`${sdn}/users/`,
range-team=`${sdn}/users/`,
data-src=`${endpoints.projects}`,
range-members=`${endpoints.users}`,
range-team=`${endpoints.users}`,
data-fields='block-project__info, block-project__fee, block-project__customer',

View File

@ -14,7 +14,7 @@
naked,
data-src='${id}',
data-fields='user.name, name',
range-user.name=`${sdn}/users/`,
range-user.name=`${endpoints.users}`,
class-name='field',
class-user.name='field',
label-name='Role',
@ -31,7 +31,7 @@
label-description='Project description',
set-block-project__fee='fieldset-fee, businessProvider, businessProvider.fee',
range-businessProvider=`${sdn}/businessproviders/`,
range-businessProvider=`${endpoints.businessproviders}`,
label-businessProvider='Business provider',
label-businessProvider.fee='Amount of the contribution (%)',
widget-fieldset-fee='hd-template-project-title',