Skip to content

Commit

Permalink
Merge dev to tst (#157)
Browse files Browse the repository at this point in the history
* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

* Performance optimization (#156)

* load users optimization

* performance improvements for inventory list page

* inventory load fix

* performance improvement by reordering api calls and asyncronicity

* removed sentry lib, removed unused unicef logo

* update node 12 to 14 in containers and fron 10 to 14 as compilation in babel

* lazy loading images

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>
  • Loading branch information
4 people authored Jun 30, 2023
1 parent f4128d2 commit a84130a
Show file tree
Hide file tree
Showing 24 changed files with 77 additions and 231 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.21.0-alpine
FROM node:14.21.0-alpine
# This is to allow yarn to install from github
RUN apk update && apk upgrade && \
apk add --no-cache bash
Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.21.0-alpine
FROM node:14.21.0-alpine
# This is to allow yarn to install from github
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
Expand Down
8 changes: 0 additions & 8 deletions frontend/components/DhaLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,6 @@ export default {
confirmButtonText: this.$gettext('OK'),
}
)
if (this.$sentry) {
this.$sentry.captureMessage('Un-caught validation error in initiative page', {
level: 'warning',
extra: {
e,
},
})
}
},
async loginLocal() {
this.$nuxt.$loading.start('loginLoader')
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/common/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:class="`Avatar ${noBorder}`"
:style="`color: ${colors.text}; background-color: ${colors.background}; border: ${colors.border};`"
>
<img v-if="profileImage" :src="profileImage" />
<img v-if="profileImage" :src="profileImage" alt="Profile image" loading="lazy" />
<template v-else-if="profileIcon">
<i :class="`icon ${profileIcon}`"></i>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/common/CountryFlag.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<img :class="['CountryFlag', `${size}`]" :src="countryFlagUrl" />
<img :class="['CountryFlag', `${size}`]" :src="countryFlagUrl" loading="lazy" />
</template>

<script>
Expand Down
19 changes: 9 additions & 10 deletions frontend/components/common/DhaFooter.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<template>
<div class="footer-bg">
<img class="logo-who" src="/unicef-logo-footer-blue.png" alt="WHO" />
<img class="logo-who" src="/unicef-logo-footer-blue.png" alt="WHO" loading="lazy" />
<div class="text">
<span><translate>Disclaimer:</translate>&nbsp;</span>
<span>
<span v-html="translateFooter">
</span>
<span v-html="translateFooter"> </span>
</span>
<nuxt-link
:to="localePath({ name: 'organisation-terms', params: $route.params })"
>
<nuxt-link :to="localePath({ name: 'organisation-terms', params: $route.params })">
<translate>Terms of use</translate>
</nuxt-link>
</div>
Expand All @@ -19,10 +16,12 @@
<script>
export default {
computed: {
translateFooter () {
return this.$gettext('All reasonable precautions have been taken by the UNICEF to verify the information contained in this publication. However, the published material is being distributed without warranty of any kind, either expressed or implied. The responsibility for the interpretation and use of the material lies with the reader. In no event shall the UNICEF be liable for damages arising from its use. Please read our')
}
}
translateFooter() {
return this.$gettext(
'All reasonable precautions have been taken by the UNICEF to verify the information contained in this publication. However, the published material is being distributed without warranty of any kind, either expressed or implied. The responsibility for the interpretation and use of the material lies with the reader. In no event shall the UNICEF be liable for damages arising from its use. Please read our'
)
},
},
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion frontend/components/common/EmptyProjects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<el-row type="flex">
<el-col>
<div class="SquareWrapper">
<img src="~assets/img/icons-all.svg" />
<img src="~assets/img/icons-all.svg" loading="lazy" />
</div>
</el-col>
</el-row>
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/common/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<nuxt-link :to="localePath({ name: 'organisation', params: $route.params })">
<el-row type="flex" align="middle">
<el-col class="LogoUnicef">
<img class="UnicefLogoNormal" src="/unicef-logo-banner.svg" alt="Unicef" />
<img class="UnicefLogoLong" src="/unicef-logo-horizontal.svg" alt="Unicef" />
<!-- <img class="UnicefLogoNormal" src="/unicef-logo-banner.svg" alt="Unicef" /> -->
<img class="UnicefLogoLong" src="/unicef-logo-horizontal.svg" alt="Unicef" loading="lazy" />
</el-col>
</el-row>
</nuxt-link>
Expand Down
4 changes: 0 additions & 4 deletions frontend/components/dialogs/ProjectHistoryDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,6 @@ export default {
return { added, removed }
} catch (error) {
console.error('🚀 ~ parseChanges ~ error', error)
this.$sentry.captureMessage('Field parsing error', {
level: 'error',
extra: change,
})
}
},
parseDate(value) {
Expand Down
83 changes: 13 additions & 70 deletions frontend/components/feedback/RawDjangoFeedback.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<div
:class="['vue-django-feedback', 'main', 'container', 'right', { opened }]"
>
<div :class="['vue-django-feedback', 'main', 'container', 'right', { opened }]">
<button
class="feedback-button"
@click="togglePopUp()"
Expand All @@ -20,8 +18,7 @@
<div>
<div>
<slot name="hint-text">
Click here if you are experiencing any issues or have suggestion for
improving the website!
Click here if you are experiencing any issues or have suggestion for improving the website!
</slot>
</div>
</div>
Expand All @@ -40,12 +37,7 @@
<div v-show="!submitted" class="form-container">
<div v-show="showUserBlock" class="user-block">
<div class="avatar">
<img
v-if="!showAvatarPlaceholder"
:src="avatarUrl"
class="avatar-img"
alt="avatar"
/>
<img v-if="!showAvatarPlaceholder" :src="avatarUrl" class="avatar-img" alt="avatar" loading="lazy" />
<div v-show="showAvatarPlaceholder" class="avatar-placeholder">
<i class="icon icon-avatar" />
</div>
Expand All @@ -60,24 +52,11 @@
</div>
</div>

<div
v-if="!showUserBlock"
:class="[
'input-container',
'input',
'name',
{ danger: errors.has('name') },
]"
>
<div v-if="!showUserBlock" :class="['input-container', 'input', 'name', { danger: errors.has('name') }]">
<label>
{{ nameLabel }}
</label>
<input
v-model="form.name"
v-validate="{ required: true }"
name="name"
type="text"
/>
<input v-model="form.name" v-validate="{ required: true }" name="name" type="text" />
<div class="feedback">
<div class="errors">
<span v-show="errors.has('name')" class="error danger">
Expand All @@ -87,24 +66,11 @@
</div>
</div>

<div
v-if="!showUserBlock"
:class="[
'input-container',
'input',
'email',
{ danger: errors.has('email') },
]"
>
<div v-if="!showUserBlock" :class="['input-container', 'input', 'email', { danger: errors.has('email') }]">
<label>
{{ emailLabel }}
</label>
<input
v-model="form.email"
v-validate="{ required: true, email: true }"
name="email"
type="email"
/>
<input v-model="form.email" v-validate="{ required: true, email: true }" name="email" type="email" />
<div class="feedback">
<div class="errors">
<span v-show="errors.has('email')" class="error danger">
Expand All @@ -114,14 +80,7 @@
</div>
</div>

<div
:class="[
'input-container',
'input',
'subject',
{ danger: errors.has('subject') },
]"
>
<div :class="['input-container', 'input', 'subject', { danger: errors.has('subject') }]">
<label>
{{ subjectLabel }}
</label>
Expand All @@ -137,20 +96,11 @@
{{ errors.first('subject') }}
</span>
</div>
<div class="char-count">
{{ form.subject.length }} / {{ limit.subjectLimit }}
</div>
<div class="char-count">{{ form.subject.length }} / {{ limit.subjectLimit }}</div>
</div>
</div>

<div
:class="[
'input-container',
'textarea',
'message',
{ danger: errors.has('message') },
]"
>
<div :class="['input-container', 'textarea', 'message', { danger: errors.has('message') }]">
<label>
{{ messageLabel }}
</label>
Expand All @@ -166,9 +116,7 @@
{{ errors.first('message') }}
</span>
</div>
<div class="char-count">
{{ form.message.length }} / {{ limit.messageLimit }}
</div>
<div class="char-count">{{ form.message.length }} / {{ limit.messageLimit }}</div>
</div>
</div>
</div>
Expand All @@ -192,10 +140,7 @@
<slot name="success-header"> Thank you! </slot>
</h4>
<p>
<slot name="success-message">
Your message has been successfully sent! We will be back to you
soon!
</slot>
<slot name="success-message"> Your message has been successfully sent! We will be back to you soon! </slot>
</p>
</div>

Expand All @@ -204,9 +149,7 @@
<slot name="error-header"> Sorry </slot>
</h4>
<p>
<slot name="error-message">
There was a problem processing your ticket, please try again
</slot>
<slot name="error-message"> There was a problem processing your ticket, please try again </slot>
</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/landing/AboutSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="partners">
<div v-for="partner in partners" :key="partner.name">
<img :src="partner.logo" :alt="partner.name" />
<img :src="partner.logo" :alt="partner.name" loading="lazy" />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/landing/CountryFlagInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="Separator" />
</el-col>
<el-col class="CountryHolder">
<img :src="countryFlag" alt="country flag" class="CountryFlag" />
<img :src="countryFlag" alt="country flag" class="CountryFlag" loading="lazy" />
</el-col>
<el-col>
<div class="country-text">
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/landing/parts/NewsCard.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<a :href="news.link" target="_blank" class="NewsCard" :class="{ noImg: !news.thumbnail }">
<img v-if="news.thumbnail" :src="news.thumbnail" :alt="news.alt_text" />
<img v-if="news.thumbnail" :src="news.thumbnail" :alt="news.alt_text" loading="lazy" />
<div class="content">
<div class="title">
{{ news.title }}
Expand Down
9 changes: 0 additions & 9 deletions frontend/components/portfolio/form/NewPortfolioForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@ export default {
setLoading: 'portfolio/setLoading',
}),
async unCaughtErrorHandler(errors) {
if (this.$sentry) {
this.$sentry.captureMessage('Un-caught validation error in portfolio page', {
level: 'error',
extra: {
apiErrors: this.apiErrors,
errors,
},
})
}
const errorList = Object.entries(this.apiErrors).map((e) => {
if (e[0] === 'problem_statements') {
return `${e[0]}: ${join(
Expand Down
10 changes: 0 additions & 10 deletions frontend/components/project/ProjectForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ export default {
}
},
async unCaughtErrorHandler(errors) {
if (this.$sentry) {
this.$sentry.captureMessage('Un-caught validation error in project page', {
level: 'error',
extra: {
apiErrors: this.apiErrors,
errors,
},
})
}
try {
await this.$confirm(
this.$gettext('There was an un-caught validation error an automatic report has been submitted'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="field">{{ index + 1 }}) {{ changes.fieldTitle }}</div>
<div v-for="(value, idx) in changes.values" :key="idx" :class="`value ${value.changeType}`">
<i :class="value.changeTypeIcon"></i>
<img v-if="value.imageUrl" :src="value.imageUrl" class="cover" />
<img v-if="value.imageUrl" :src="value.imageUrl" class="cover" loading="lazy" />
<a v-if="value.imageUrl" :href="value.imageUrl" target="_blank">{{ value.imageUrl }}</a>
<span v-else>N/A</span>
</div>
Expand Down
Loading

0 comments on commit a84130a

Please sign in to comment.