Commit 83b132fe authored by Mahëd Benzerga's avatar Mahëd Benzerga
Browse files

Bandeau jaune en bas de page + Page situation (et redirect incident vers /situation)

parent c4f0de29
......@@ -68,7 +68,7 @@ export default {
computed: {
isDisabledMessage() {
if (!this.application.isDisabled) return "";
return `<b>${this.$t('incidentOvh.appErrorMessage')} ${this.$t("incidentOvh.errorMessageLink")}</b>`;
return `<b>${this.$t('situation.appErrorMessage')} ${this.$t("situation.errorMessageLink")}</b>`;
}
}
}
......
<template>
<div>
<navbar/>
<main class="main-content">
<nuxt/>
</main>
<platform-access :academies="academies" :go-to-external-platform="goToExternalPlatform"/>
<message v-if="message" :type="messageType">
<template slot="message">
<icon :aria-label="$t('common.warning')" class="is-hidden-mobile" :type="messageType" icon="alert-circle-outline" inline/>
......@@ -8,10 +12,6 @@
</div>
</template>
</message>
<main class="main-content">
<nuxt/>
</main>
<platform-access :academies="academies" :go-to-external-platform="goToExternalPlatform"/>
<app-footer/>
</div>
</template>
......@@ -21,7 +21,6 @@ import Api from '@/services/Api';
import Navbar from '@/components/layout/Navbar';
import AppFooter from '@/components/layout/AppFooter';
import PlatformAccess from '@/components/platform/PlatformAccess'
import store from '@/store';
export default {
components: {
......@@ -30,17 +29,13 @@ export default {
PlatformAccess
},
data() {
let messageType = "is-success";
let message = this.$t('common.warningMessage');
if (store.incidentOvh) {
messageType = "is-warning";
message = `${this.$t('incidentOvh.errorMessage')} ${this.$t("incidentOvh.errorMessageLink")}`;
}
let messageType = "is-warning";
let message = `${this.$t('situation.errorMessage')} ${this.$t("situation.errorMessageLink")}`;
return {
academies: [],
goToExternalPlatform: !store.incidentOvh,
// TRUE: On redirige vers la plateforme apps.educ, FALSE: on affiche la page plateforme académie sur le front,
goToExternalPlatform: false,
messageType,
message
}
......
......@@ -28,12 +28,12 @@
"available": "Disponible",
"unavailable": "Indisponible"
},
"incidentOvh": {
"errorMessage": "La plateforme et les outils apps.education.fr sont en cours de rétablissement.",
"errorMessageLink": "<a href='/incident'>Cliquez ici pour en savoir +</a>",
"situation": {
"appErrorMessage": "Application momentanément indisponible.",
"errorMessage": "La plateforme et les outils apps.education.fr sont en cours de rétablissement.",
"errorMessageLink": "<a href='/situation'>Situation de la plateforme apps.education.fr</a>",
"page": {
"title": "Incident hébergeur"
"title": "Situation de la plateforme"
}
},
"home": {
......
......@@ -5,12 +5,6 @@ require('dotenv').config();
const isProduction = process.env.NODE_ENV === 'production';
const isTrackingEnabled = process.env.TRACKING === 'true' ? true : false;
// Flag incident OVH
let incidentOvh = true;
if (process.env.INCIDENT_OVH && ['true', 'false'].includes(process.env.INCIDENT_OVH)) {
incidentOvh = process.env.INCIDENT_OVH === 'true' ? true : false;
}
export default {
mode: 'universal',
server: {
......@@ -19,8 +13,7 @@ export default {
},
env: {
tchapChannelUrl: process.env.TCHAP_CHANNEL_URL ? process.env.TCHAP_CHANNEL_URL : 'https://www.tchap.gouv.fr/#/room/#apps.education.fr:agent.education.tchap.gouv.fr',
isTrackingEnabled,
incidentOvh
isTrackingEnabled
},
/*
** Headers of the page
......@@ -99,6 +92,15 @@ export default {
extend (config, ctx) {
}
},
router: {
extendRoutes(routes, resolve) {
routes.push({
name: 'incident',
path: '/incident',
component: resolve(__dirname, 'pages/situation.vue')
})
}
},
/*
** Static files
*/
......
<template>
<div class="incident">
<container>
<container class="situation-intro">
<div class="content">
<h1 class="situation-intro-title is-title is-xl has-text-primary-accent is-mb-0">
{{ $t("situation.page.title") }}
</h1>
<div class="rectangle has-background-white">
</div>
</div>
</container>
<container class="situation-content">
<div class="columns">
<div class="column is-two-thirds">
<article class="incident-article">
<h2 class="is-title is-main is-mb-2 has-text-primary-darker">
Incident <br/>Rétablissement progressif des services
Rétablissement progressif des services
</h2>
<div class="incident-text">
<p>
......@@ -98,7 +107,7 @@ export default {
},
head() {
return {
title: this.$t("siteTitle") + " " + this.$t("incidentOvh.page.title"),
title: this.$t("siteTitle") + " " + this.$t("situation.page.title")
};
},
};
......@@ -120,4 +129,31 @@ export default {
padding-top: 0;
}
}
.situation-intro {
@include from ($desktop) {
background: url("~assets/images/background-bp.png");
display: flex;
justify-content: center;
align-items: center;
min-height: 30vh;
}
.content {
position: relative;
}
.situation-intro-title {
position: relative;
z-index: 2;
text-align: center;
}
.rectangle {
min-height: 50px;
width: 90%;
position: relative;
top: -48px;
z-index: 1;
left: 98px;
}
}
</style>
\ No newline at end of file
import Vue from "vue";
// Flag incident OVH (@nuxt.config.js && process.env)
const incidentOvh = process.env.incidentOvh;
export default Vue.observable({
incidentOvh,
isPlatformAccessShown: false
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment