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

feat: add organization name variable #854

Merged
merged 6 commits into from
Jun 4, 2024
Merged
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
1 change: 1 addition & 0 deletions Phonebook.Frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ARG EMPLOYEE_PICTURES_ENDPOINT
ARG ASSETS_ENDPOINT
ARG CONTACT_EMAIL
ARG CONTACT_URL
ARG ORGANIZATION_NAME

RUN rm -r ./*
COPY ./nginx/ ./
Expand Down
6 changes: 2 additions & 4 deletions Phonebook.Frontend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
context: ./
dockerfile: Dockerfile
environment:
DEBUG: 'true'
# DEBUG: 'true'
mr-woodapple marked this conversation as resolved.
Show resolved Hide resolved
ENVIRONMENT: 'development'
ENVIRONMENT_TAG: 'docker'
BASE_URL: 'http://localhost/'
Expand All @@ -29,11 +29,9 @@ services:
EMPLOYEE_PICTURES_ENDPOINT: 'https://pictures.example.com/'
ASSETS_ENDPOINT: 'https://localhost:8081/api/assets'
ROOMPLANNINGTOOL_URL: 'http://example.com'
ORGANIZATION_NAME: 'Your very fancy Company'
ports:
- 80:80
volumes:
- ./nginx.conf /etc/nginx/nginx.conf
- ./conf.d /etc/nginx/conf.d
restart: always
# stdin_open: true
# tty: true
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ <h4 mat-line i18n="@@ColumnTitleMobile">Mobile</h4>
</mat-list-item>
<mat-list-item *ngIf="person.Contacts.Fax !== ''">
<mat-icon mat-list-icon>print</mat-icon>
<h4 mat-line i18n="Datapoint|Label for Person.Fax data@@DataPersonFax">
Fax
</h4>
<h4 mat-line i18n="Datapoint|Label for Person.Fax data@@DataPersonFax"> Fax </h4>
<p mat-line>
<app-interactive-attribute-field
[value]="person.Contacts.Fax"
Expand Down Expand Up @@ -252,9 +250,7 @@ <h3 mat-subheader i18n="@@UserDetailComponentSubTitleFurtherInformation">
<mat-list-item>
<mat-icon mat-list-icon>business</mat-icon>
<h4 mat-line>
<ng-container i18n="@@ColumnTitleOrgUnit">
Organization Unit
</ng-container>
<ng-container i18n="@@ColumnTitleOrgUnit"> Organization Unit </ng-container>
<a mat-button [routerLink]="organigramLink">
<span
class="mat-small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class UserDetailComponent implements OnInit, OnChanges, OnDestroy {
{ value: this.person.Contacts.Phone, param: { type: 'work' } },
],
organization: {
value: 'T-Systems Multimedia Solutions',
value: runtimeEnvironment.organizationName,
param: { type: ['work'] },
},
categories: [...this.person.Business.OrgUnit, ...this.person.Business.ShortOrgUnit],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export interface RuntimeEnvironmentInterface {
* The Base Url of the RocketChat Messenger
*/
readonly rocketChatUrl?: string;
/**
* The name of your company/organization. Empty string if not set.
*/
readonly organizationName: string;
}

export enum Environment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export const runtimeEnvironment: RuntimeEnvironmentInterface = {
ENV.roomPlanningToolUrl !== '${ROOMPLANNINGTOOL_URL}' ? ENV.roomPlanningToolUrl : undefined,
contactUrl: ENV.contactUrl !== '${CONTACT_URL}' ? ENV.contactUrl : undefined,
rocketChatUrl: ENV.rocketChatUrl !== '${ROCKETCHAT_URL}' ? ENV.rocketChatUrl : undefined,
organizationName: ENV.organizationName !== '${ORGANIZATION_NAME}' ? ENV.organizationName : '',
};
1 change: 1 addition & 0 deletions Phonebook.Frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
roomPlanningToolUrl: '${ROOMPLANNINGTOOL_URL}',
contactUrl: '${CONTACT_URL}',
rocketChatUrl: '${ROCKETCHAT_URL}',
organizationName: '${ORGANIZATION_NAME}',
};
</script>
<base href="/" />
Expand Down
2 changes: 1 addition & 1 deletion Phonebook.Frontend/substitute_variables.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# State all required variables here
requiredVariables=( BASE_URL SERVER_NAME ENVIRONMENT ENVIRONMENT_TAG ASSETS_ENDPOINT CONTACT_EMAIL CONTACT_URL)
requiredVariables=( BASE_URL SERVER_NAME ENVIRONMENT ENVIRONMENT_TAG ASSETS_ENDPOINT CONTACT_EMAIL CONTACT_URL ORGANIZATION_NAME)

# State all optional variables here
optionalVariables=( RAVEN_URL EMPLOYEE_PICTURES_ENDPOINT ROOMPLANNINGTOOL_URL ROCKETCHAT_URL)
Expand Down
2 changes: 2 additions & 0 deletions Phonebook/phonebook/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ spec:
value: "{{ .Values.assetsEndpoint }}"
- name: ROCKETCHAT_URL
value: "{{ .Values.rocketChatUrl }}"
- name: ORGANIZATION_NAME
value: "{{ .Values.organizationName }}"
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
6 changes: 3 additions & 3 deletions demo/source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ function generateBranch() {
}

fs.writeFileSync(
'./mocks/synthetic/persons.json',
'./mocks/synthetic/api/people.json',
JSON.stringify(generateArray(1500, generatePerson))
);
fs.writeFileSync('./mocks/synthetic/rooms.json', JSON.stringify(rooms));
fs.writeFileSync('./mocks/synthetic/api/rooms.json', JSON.stringify(rooms));
fs.writeFileSync(
'./mocks/synthetic/branches.json',
'./mocks/synthetic/api/OrgUnit.json',
JSON.stringify(generateArray(cityCount * 2, generateBranch))
);
1 change: 1 addition & 0 deletions demo/source/mocks/synthetic/api/OrgUnit.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/source/mocks/synthetic/api/branches.json
mr-woodapple marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/source/mocks/synthetic/api/people.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/source/mocks/synthetic/api/rooms.json

Large diffs are not rendered by default.

Loading
Loading