diff --git a/.github/workflows/docker-release-build.yml b/.github/workflows/docker-release-build.yml
index 0defa02a6e..c51d60ec23 100644
--- a/.github/workflows/docker-release-build.yml
+++ b/.github/workflows/docker-release-build.yml
@@ -138,7 +138,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
with:
- version: latest
+ version: v0.9.1
- name: ↙️ Download build artifact
uses: actions/download-artifact@v3
with:
diff --git a/front/package-lock.json b/front/package-lock.json
index 2cf2687b4c..543a423843 100644
--- a/front/package-lock.json
+++ b/front/package-lock.json
@@ -6,7 +6,7 @@
"": {
"name": "gladys-front",
"dependencies": {
- "@gladysassistant/gladys-gateway-js": "^4.5.0",
+ "@gladysassistant/gladys-gateway-js": "^4.8.1",
"@gladysassistant/theme-optimized": "^1.0.3",
"@jaames/iro": "^5.5.2",
"@yaireo/tagify": "^4.5.0",
@@ -4089,9 +4089,9 @@
"dev": true
},
"node_modules/@gladysassistant/gladys-gateway-js": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/@gladysassistant/gladys-gateway-js/-/gladys-gateway-js-4.5.0.tgz",
- "integrity": "sha512-+Purv/yJqQwTpi0foO9ssdbPWtDuWr9TnRnqpbfMF2ipVVZN8mk54A7syHDIC7l2UmFyNCzW9EEKXwZ7cY7gzw==",
+ "version": "4.8.1",
+ "resolved": "https://registry.npmjs.org/@gladysassistant/gladys-gateway-js/-/gladys-gateway-js-4.8.1.tgz",
+ "integrity": "sha512-2LuyxOUaUiBfEdMrQ5iXPSvC1u33NhC/zf7cTGgkDqVlmQriqSE0vFUgeihpQrK8p5IlHXwnd482JK+kPj/lHw==",
"dependencies": {
"@ctrlpanel/pbkdf2": "^1.0.0",
"array-buffer-to-hex": "^1.0.0",
@@ -36670,9 +36670,9 @@
"dev": true
},
"@gladysassistant/gladys-gateway-js": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/@gladysassistant/gladys-gateway-js/-/gladys-gateway-js-4.5.0.tgz",
- "integrity": "sha512-+Purv/yJqQwTpi0foO9ssdbPWtDuWr9TnRnqpbfMF2ipVVZN8mk54A7syHDIC7l2UmFyNCzW9EEKXwZ7cY7gzw==",
+ "version": "4.8.1",
+ "resolved": "https://registry.npmjs.org/@gladysassistant/gladys-gateway-js/-/gladys-gateway-js-4.8.1.tgz",
+ "integrity": "sha512-2LuyxOUaUiBfEdMrQ5iXPSvC1u33NhC/zf7cTGgkDqVlmQriqSE0vFUgeihpQrK8p5IlHXwnd482JK+kPj/lHw==",
"requires": {
"@ctrlpanel/pbkdf2": "^1.0.0",
"array-buffer-to-hex": "^1.0.0",
diff --git a/front/package.json b/front/package.json
index 6a4a09ca97..11f91ed621 100644
--- a/front/package.json
+++ b/front/package.json
@@ -44,7 +44,7 @@
"prettier": "^1.17.1"
},
"dependencies": {
- "@gladysassistant/gladys-gateway-js": "^4.5.0",
+ "@gladysassistant/gladys-gateway-js": "^4.8.1",
"@gladysassistant/theme-optimized": "^1.0.3",
"@jaames/iro": "^5.5.2",
"@yaireo/tagify": "^4.5.0",
diff --git a/front/src/assets/integrations/cover/openai.jpg b/front/src/assets/integrations/cover/openai.jpg
new file mode 100644
index 0000000000..9170a8d4eb
Binary files /dev/null and b/front/src/assets/integrations/cover/openai.jpg differ
diff --git a/front/src/components/app.jsx b/front/src/components/app.jsx
index 8d937b1c7a..82a6de31ac 100644
--- a/front/src/components/app.jsx
+++ b/front/src/components/app.jsx
@@ -119,6 +119,9 @@ import EweLinkEditPage from '../routes/integration/all/ewelink/edit-page';
import EweLinkDiscoverPage from '../routes/integration/all/ewelink/discover-page';
import EweLinkSetupPage from '../routes/integration/all/ewelink/setup-page';
+// OpenAI integration
+import OpenAIPage from '../routes/integration/all/openai/index';
+
const defaultState = getDefaultState();
const store = createStore(defaultState);
@@ -230,6 +233,7 @@ const AppRouter = connect(
+
diff --git a/front/src/components/boxs/ecowatt/Ecowatt.jsx b/front/src/components/boxs/ecowatt/Ecowatt.jsx
index b07d445224..2f9c4a267a 100644
--- a/front/src/components/boxs/ecowatt/Ecowatt.jsx
+++ b/front/src/components/boxs/ecowatt/Ecowatt.jsx
@@ -117,7 +117,7 @@ class Ecowatt extends Component {
days.push({
day: dayjs(day.jour)
.locale(this.props.user.language)
- .format('LL'),
+ .format('ddd LL'),
data: day.dvalue
});
});
diff --git a/front/src/config/i18n/en.json b/front/src/config/i18n/en.json
index 1e7802c664..80670c0e2f 100644
--- a/front/src/config/i18n/en.json
+++ b/front/src/config/i18n/en.json
@@ -189,6 +189,7 @@
"editDashboardTitle": "Edit dashboard",
"editDashboardDeleteButton": "Delete",
"editDashboardCancelButton": "Cancel",
+ "editDashboardDeleteText": "Are you sure you want to delete this dashboard?",
"editDashboardSaveButton": "Save",
"emptyDashboardSentenceTop": "Looks like your dashboard is not configured yet.",
"emptyDashboardSentenceBottom": "Click on the \"Edit\" button to design your dashboard.",
@@ -1046,6 +1047,21 @@
"defaultDeletionError": "There was an error deleting the device.",
"conflictError": "Current device is already in Gladys."
}
+ },
+ "openai": {
+ "title": "OpenAI GPT-3",
+ "description": "Give Gladys the power of artifical intelligence",
+ "firstExplanation": "This is an alpha integration that let you talk to OpenAI GPT-3.",
+ "itDoesNothing": "It has no action in Gladys, it's just a proof-of-concept.",
+ "aFewExamples": "A few examples: ",
+ "turnOnTheLight": "Turn on the light in the kitchen",
+ "sizeOfEiffelTower": "What's the size of the Eiffel Tower ?",
+ "whoIsJulesVerne": "Who is Jules Verne ?",
+ "eggDuration": "How do you make hard boiled eggs ?",
+ "rateLimit": "As GPT-3 API is not free, this integration is only available to Gladys Plus users and limited to 100 requests per month.",
+ "notOnGladysPlus": "As GPT-3 API is not free, this integration is only available to Gladys Plus users.",
+ "subscribeToGladysPlus": "Click here to subscribe to Gladys Plus.",
+ "licenseShouldBeActive": "This integration is only available to users with an active license (at least one payment). For trial users, please contact us on the forum or email."
}
},
"editScene": {
@@ -2313,6 +2329,12 @@
"title": "Billing",
"informationTitle": "Your billing information",
"stripeDescription": "Billing is handled by Stripe. We never see you credit card.",
- "stripeButton": "Edit subscription in Stripe"
+ "stripeButton": "Edit subscription in Stripe",
+ "yourCurrentPlan": "Your plan",
+ "monthlyPlan": "You are currently using the monthly plan. If you want to switch to the annual plan (99.99€/year), you can click on the button below. The first payment will be prorated based on your current month.",
+ "yearlyPlan": "You are currently on the annual plan.",
+ "upgradeToYearly": "Switch to annual plan",
+ "upgradeYearlyError": "An error occured while switching to the annual plan, please contact us by email.",
+ "upgradeYearlySuccess": "Thanks for switching to the annual plan!"
}
}
diff --git a/front/src/config/i18n/fr.json b/front/src/config/i18n/fr.json
index 3081b12f18..5a0377871d 100644
--- a/front/src/config/i18n/fr.json
+++ b/front/src/config/i18n/fr.json
@@ -187,6 +187,7 @@
"editDashboardCancelButton": "Annuler",
"editDashboardDeleteButton": "Supprimer",
"editDashboardSaveButton": "Sauvegarder",
+ "editDashboardDeleteText": "Êtes-vous sûr de vouloir supprimer ce tableau de bord ?",
"enableFullScreen": "Plein écran",
"disableFullScreen": "Quitter plein écran",
"editDashboardTitle": "Editer le tableau de bord",
@@ -265,7 +266,7 @@
"lastThreeMonths": "Derniers 3 mois",
"lastYear": "Dernière année",
"noValue": "Pas de valeurs sur cet intervalle.",
- "noValueWarning": "Attention, si vous venez de configurer cet appareil, les données peuvent mettre un certain temps avant d'être aggrégées. Pour les intervalles supérieurs à 24h, cela prend jusqu'à 24h le temps que Gladys collecte assez de données.",
+ "noValueWarning": "Attention, si vous venez de configurer cet appareil, les données peuvent mettre un certain temps avant d'être agrégées. Pour les intervalles supérieurs à 24h, cela prend jusqu'à 24h le temps que Gladys collecte assez de données.",
"editNameLabel": "Entrez le nom de cette box",
"editNamePlaceholder": "Nom affiché sur le tableau de bord",
"editDeviceFeaturesLabel": "Sélectionnez les appareils que vous voulez afficher",
@@ -1046,6 +1047,21 @@
"defaultDeletionError": "Une erreur s'est produite lors de la suppression de l'appareil.",
"conflictError": "L'appareil actuel est déjà dans Gladys."
}
+ },
+ "openai": {
+ "title": "OpenAI GPT-3",
+ "description": "Donne à Gladys la puissance de l'intelligence artificielle.",
+ "firstExplanation": "Ceci est une alpha d'une intégration avec l'intelligence artificielle OpenAI GPT-3. Vous pouvez demander ce que vous voulez à Gladys ici.",
+ "itDoesNothing": "Cette alpha ne fait aucune action avec Gladys, ce n'est qu'une preuve de concept qui sera déployée dans Gladys si l'expérience est un succès.",
+ "aFewExamples": "Quelques exemples :",
+ "turnOnTheLight": "Allume la lumière du salon !",
+ "sizeOfEiffelTower": "Quelle est la taille de la tour Eiffel ?",
+ "whoIsJulesVerne": "Qui est Jules Verne ?",
+ "eggDuration": "Comment cuire les oeufs durs ?",
+ "rateLimit": "L'API GPT-3 étant payante, cette intégration n'est disponible que via Gladys Plus, et est pour l'instant limitée à 100 requêtes par mois.",
+ "notOnGladysPlus": "L'API GPT-3 étant payante, cette intégration est proposée via Gladys Plus uniquement.",
+ "subscribeToGladysPlus": "Cliquez-ici pour souscrire à Gladys Plus.",
+ "licenseShouldBeActive": "Cette intégration n'est disponible qu'aux utilisateurs Gladys Plus dont l'abonnement est actuellement actif avec au moins un paiement. Pour les utilisateurs en périodes d'essai, merci de me contacter sur le forum ou par email !"
}
},
"editScene": {
@@ -1540,9 +1556,9 @@
"previous": "Précédent",
"next": "Suivant",
"jobTypes": {
- "monthly-device-state-aggregate": "Aggrégation donnée capteur mensuelle",
- "daily-device-state-aggregate": "Aggrégation donnée capteur journalière",
- "hourly-device-state-aggregate": "Aggrégation donnée capteur horaire",
+ "monthly-device-state-aggregate": "Agrégation donnée capteur mensuelle",
+ "daily-device-state-aggregate": "Agrégation donnée capteur journalière",
+ "hourly-device-state-aggregate": "Agrégation donnée capteur horaire",
"gladys-gateway-backup": "Sauvegarde Gladys Plus",
"device-state-purge-single-feature": "Nettoyage des états d'un appareil",
"vacuum": "Nettoyage de la base de donnée"
@@ -2313,6 +2329,12 @@
"title": "Facturation",
"informationTitle": "Vos informations de paiement",
"stripeDescription": "Le paiement est géré par Stripe. Nous ne voyons jamais votre carte de crédit.",
- "stripeButton": "Gérer la facturation dans Stripe"
+ "stripeButton": "Gérer la facturation dans Stripe",
+ "yourCurrentPlan": "Votre plan actuel",
+ "monthlyPlan": "Vous êtes actuellement en paiement mensuel. Si vous souhaitez passer au plan annuel ( 99.99€/an ), vous pouvez cliquer sur le bouton ci-dessous. Si vous êtes en cours d'un mois, le prix du premier paiement annuel sera fait au pro-rata pour vous éviter de payer plusieurs fois le mois en cours !",
+ "yearlyPlan": "Vous êtes actuellement en paiement annuel.",
+ "upgradeToYearly": "Passer au plan annuel",
+ "upgradeYearlyError": "Une erreur est survenue lors de la mise à jour vers le plan annuel, merci de nous contacter par email ou sur le forum.",
+ "upgradeYearlySuccess": "Merci d'être passé au plan annuel !"
}
}
diff --git a/front/src/config/integrations/communications.json b/front/src/config/integrations/communications.json
index 194ef92d83..4e918b28d0 100644
--- a/front/src/config/integrations/communications.json
+++ b/front/src/config/integrations/communications.json
@@ -14,5 +14,9 @@
{
"key": "homekit",
"img": "/assets/integrations/cover/homekit.jpg"
+ },
+ {
+ "key": "openai",
+ "img": "/assets/integrations/cover/openai.jpg"
}
]
diff --git a/front/src/routes/dashboard/EditActions.jsx b/front/src/routes/dashboard/EditActions.jsx
index ee36d13c5d..0d298a7929 100644
--- a/front/src/routes/dashboard/EditActions.jsx
+++ b/front/src/routes/dashboard/EditActions.jsx
@@ -4,17 +4,31 @@ const EditActions = props => (