From bbd260c0c866b64d34cfe3c55c41694040522c04 Mon Sep 17 00:00:00 2001 From: mschwrdtnr Date: Mon, 16 Sep 2019 17:00:29 +0200 Subject: [PATCH 1/2] insert smartSpacesUrl --- Phonebook.Demo/values.yml | 1 + Phonebook.Frontend/docker-compose.yml | 1 + Phonebook.Frontend/src/environments/EnvironmentInterfaces.ts | 4 ++++ Phonebook.Frontend/src/environments/runtime-environment.ts | 1 + Phonebook.Frontend/src/index.html | 1 + Phonebook.Frontend/substitute_variables.sh | 2 +- Phonebook/phonebook/templates/frontend-deployment.yaml | 2 ++ Phonebook/readme.md | 1 + 8 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Phonebook.Demo/values.yml b/Phonebook.Demo/values.yml index b549f60b0..888fa734b 100644 --- a/Phonebook.Demo/values.yml +++ b/Phonebook.Demo/values.yml @@ -6,6 +6,7 @@ host: &host 'demo-phonebook.me' contactUrl: 'https://github.com/T-Systems-MMS/phonebook/issues' roomPlanningToolUrl: null +smartSpacesUrl: null contactEmail: &contactEmail 'phonebook-t-systems-mms@mg.telekom.de' ravenUrl: null employeePictureEndpoint: null diff --git a/Phonebook.Frontend/docker-compose.yml b/Phonebook.Frontend/docker-compose.yml index bd02fc4ca..8b53e5192 100644 --- a/Phonebook.Frontend/docker-compose.yml +++ b/Phonebook.Frontend/docker-compose.yml @@ -28,6 +28,7 @@ services: RAVEN_URL: 'https://sdfdsf9876987sdf987sdfs876sdf9@sentry.example.de/1' EMPLOYEE_PICTURES_ENDPOINT: 'https://pictures.example.com/' ASSETS_ENDPOINT: 'https://localhost:8081/api/assets' + SMARTSPACES_URL: 'http://example.com' ROOMPLANNINGTOOL_URL: 'http://example.com' ports: - 80:80 diff --git a/Phonebook.Frontend/src/environments/EnvironmentInterfaces.ts b/Phonebook.Frontend/src/environments/EnvironmentInterfaces.ts index d1bb463e7..7675c07f2 100644 --- a/Phonebook.Frontend/src/environments/EnvironmentInterfaces.ts +++ b/Phonebook.Frontend/src/environments/EnvironmentInterfaces.ts @@ -50,6 +50,10 @@ export interface RuntimeEnvironmentInterface { * Your Companies Room Planning Tool Url, that users can use to book rooms for meetings etc. **/ readonly roomPlanningToolUrl?: string; + /** + * Your Companies Smart Spaces Url, that users can use to view the Smart Spaces. + **/ + readonly smartSpacesUrl?: string; } export enum Environment { diff --git a/Phonebook.Frontend/src/environments/runtime-environment.ts b/Phonebook.Frontend/src/environments/runtime-environment.ts index 0690b30e9..fdf7c16e2 100644 --- a/Phonebook.Frontend/src/environments/runtime-environment.ts +++ b/Phonebook.Frontend/src/environments/runtime-environment.ts @@ -10,5 +10,6 @@ export const runtimeEnvironment: RuntimeEnvironmentInterface = { assetsEndpoint: ENV.assetsEndpoint !== '${ASSETS_ENDPOINT}' ? ENV.assetsEndpoint : '/external_assets', contactEmail: ENV.contactEmail !== '${CONTACT_EMAIL}' ? ENV.contactEmail : undefined, roomPlanningToolUrl: ENV.roomPlanningToolUrl !== '${ROOMPLANNINGTOOL_URL}' ? ENV.roomPlanningToolUrl : undefined, + smartSpacesUrl: ENV.smartSpacesUrl !== '${SMARTSPACES_URL}' ? ENV.smartSpacesUrl : undefined, contactUrl: ENV.contactUrl !== '${CONTACT_URL}' ? ENV.contactUrl : undefined }; diff --git a/Phonebook.Frontend/src/index.html b/Phonebook.Frontend/src/index.html index 3bb321a2f..12b00db64 100644 --- a/Phonebook.Frontend/src/index.html +++ b/Phonebook.Frontend/src/index.html @@ -15,6 +15,7 @@ assetsEndpoint: '${ASSETS_ENDPOINT}', contactEmail: '${CONTACT_EMAIL}', roomPlanningToolUrl: '${ROOMPLANNINGTOOL_URL}', + smartSpacesUrl: '${SMARTSPACES_URL}', contactUrl: '${CONTACT_URL}' }; diff --git a/Phonebook.Frontend/substitute_variables.sh b/Phonebook.Frontend/substitute_variables.sh index fb8d32443..8bcb9b1c4 100644 --- a/Phonebook.Frontend/substitute_variables.sh +++ b/Phonebook.Frontend/substitute_variables.sh @@ -4,7 +4,7 @@ requiredVariables=( BASE_URL SERVER_NAME ENVIRONMENT ENVIRONMENT_TAG ASSETS_ENDPOINT CONTACT_EMAIL CONTACT_URL) # State all optional variables here -optionalVariables=( RAVEN_URL EMPLOYEE_PICTURES_ENDPOINT ROOMPLANNINGTOOL_URL) +optionalVariables=( RAVEN_URL EMPLOYEE_PICTURES_ENDPOINT ROOMPLANNINGTOOL_URL SMARTSPACES_URL) # BASE_URL - used througout the whole app (e.g. opensearch.xml) - example: https://example.com/ diff --git a/Phonebook/phonebook/templates/frontend-deployment.yaml b/Phonebook/phonebook/templates/frontend-deployment.yaml index 077f57686..b36885a7d 100644 --- a/Phonebook/phonebook/templates/frontend-deployment.yaml +++ b/Phonebook/phonebook/templates/frontend-deployment.yaml @@ -60,6 +60,8 @@ spec: value: "{{ .Values.employeePictureEndpoint }}" - name: ASSETS_ENDPOINT value: "{{ .Values.assetsEndpoint }}" + - name: SMARTSPACES_URL + value: {{ .Values.smartSpacesUrl }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/Phonebook/readme.md b/Phonebook/readme.md index 3d0d0f81e..923e17fcf 100644 --- a/Phonebook/readme.md +++ b/Phonebook/readme.md @@ -16,6 +16,7 @@ We use [traefik](https://traefik.io/) under the hood. host: &host 'example.com' contactUrl: '' roomPlanningToolUrl: '' + smartSpacesUrl: '' contactEmail: &contactEmail '' employeePictureEndpoint: '' assetsEndpoint: '' From 812da016b27ba54357c174219585d9ab982a30a2 Mon Sep 17 00:00:00 2001 From: mschwrdtnr Date: Fri, 27 Sep 2019 14:02:49 +0200 Subject: [PATCH 2/2] feat(room-plan): Smart spaces integration --- .../room-plan/room-plan.component.html | 22 ++++++- .../room-plan/room-plan.component.scss | 6 ++ .../room-plan/room-plan.component.ts | 9 ++- .../components/room-plan/room-plan.module.ts | 3 +- .../src/environments/runtime-environment.ts | 5 +- Phonebook.Frontend/src/i18n/messages.de.xlf | 4 ++ Phonebook.Frontend/src/i18n/messages.en.xlf | 4 ++ Phonebook.Frontend/src/i18n/messages.test.xlf | 4 ++ Phonebook.Frontend/src/i18n/messages.xlf | 60 ++++++++++--------- 9 files changed, 85 insertions(+), 32 deletions(-) diff --git a/Phonebook.Frontend/src/app/shared/components/room-plan/room-plan.component.html b/Phonebook.Frontend/src/app/shared/components/room-plan/room-plan.component.html index b638ad7e4..a41777077 100644 --- a/Phonebook.Frontend/src/app/shared/components/room-plan/room-plan.component.html +++ b/Phonebook.Frontend/src/app/shared/components/room-plan/room-plan.component.html @@ -1,4 +1,24 @@ -
+ + + View Smart Spaces +
+ +
+ +
+ +
Die Suche ergab keine Treffer. Sentence displayed if search did not return any results TableComponent + + View Smart SpacesSmart Spaces öffnen + View Smart Spaces Toggle + Room-planComponent Link to diff --git a/Phonebook.Frontend/src/i18n/messages.en.xlf b/Phonebook.Frontend/src/i18n/messages.en.xlf index 5ad5bf328..f543c7afa 100644 --- a/Phonebook.Frontend/src/i18n/messages.en.xlf +++ b/Phonebook.Frontend/src/i18n/messages.en.xlf @@ -1351,6 +1351,10 @@ Sentence displayed if search did not return any results TableComponent + + View Smart SpacesView Smart Spaces + View Smart Spaces Toggle + Room-planComponent Link to diff --git a/Phonebook.Frontend/src/i18n/messages.test.xlf b/Phonebook.Frontend/src/i18n/messages.test.xlf index cb3e41dea..8f0f966a6 100644 --- a/Phonebook.Frontend/src/i18n/messages.test.xlf +++ b/Phonebook.Frontend/src/i18n/messages.test.xlf @@ -1124,6 +1124,10 @@ TEST Sentence displayed if search did not return any results TableComponent + + View Smart SpacesTEST + View Smart Spaces Toggle + Room-planComponent diff --git a/Phonebook.Frontend/src/i18n/messages.xlf b/Phonebook.Frontend/src/i18n/messages.xlf index 52a847c10..baa498dde 100644 --- a/Phonebook.Frontend/src/i18n/messages.xlf +++ b/Phonebook.Frontend/src/i18n/messages.xlf @@ -2,34 +2,7 @@ - - - Call for Contributors! - - Subtitle Contributes - Page-informationComponent - - - - The Phonebook is an Open Source Project and lives from his active contributors. There are many different topics - where you can work on. You can help with solving an - Issue, work out an User-Guide or - document new Bugs. - - - You can get in touch with us - in our official Repository or you take a - look at our Documentation. - To be a part of this community it is not required to have programming skills. - - - Thanks to our Contributors! - - - - Text for Contribute - Page-informationComponent - + Welcome to the new Phonebook! @@ -669,6 +642,10 @@ Sentence displayed if search did not return any results TableComponent + + View Smart Spaces + View Smart Spaces Toggle + Room-planComponent @@ -817,6 +794,33 @@ {VAR_PLURAL, plural, =0 {No Learners } =1 {Learner: } other {Learners: } } Learners Property OrganigramNodeComponent + + + Call for Contributors! + + Subtitle Contributes + Page-informationComponent + + + + The Phonebook is an Open Source Project and lives from his active contributors. There are many different topics + where you can work on. You can help with solving an + Issue, work out an User-Guide or + document new Bugs. + + + You can get in touch with us + in our official Repository or you take a + look at our Documentation. + To be a part of this community it is not required to have programming skills. + + + Thanks to our Contributors! + + + + Text for Contribute + Page-informationComponent Phonebook