= VIVA = L'objectif du projet `VIVA` est le développement d'une [https://fr.wikipedia.org/wiki/Application_web_monopage application Web monopage] basée sur le framework [https://angularjs.org/ AngularJS 1.6]. Les outils de développement sont: [https://nodejs.org/en/download/releases/ Node.js 8.x] ([https://trac.crealp.ch/VIVA/browser/trunk/web/package.json package.json]), [https://bower.io/ Bower] ([https://trac.crealp.ch/VIVA/browser/trunk/web/bower.json bower.json]) et [https://gruntjs.com/ Grunt] ([https://trac.crealp.ch/VIVA/browser/trunk/web/Gruntfile.js Gruntfile.js]).\\ '''NB.''' Depuis octobre 2017 l'outil [https://webpack.js.org/ Webpack] remplace Bower dans tous les projets. === Séances === [/export/214/trunk/docs/pv/eau-vs-pv-20160629.pdf PV 2016-06-29]\\ [/export/214/trunk/docs/pv/eau-vs-pv-20160126.pdf PV 2016-01-26]\\ [/export/214/trunk/docs/pv/eau-vs-pv-20160120.pdf PV 2016-01-20]\\ [/export/214/trunk/docs/pv/eau-vs-pv-20160113.pdf PV 2016-01-13]\\ [/export/214/trunk/docs/pv/eau-vs-pv-20151028.pdf PV 2015-10-28] === Notes === - Voici comment procéder pour ajouter une donnée SpatialTemp (par ex. `cosmo1_t_500m`) sur un graphe du portail VIVA: 1. dans le fichier [https://trac.crealp.ch/VIVA/browser/trunk/web/app/scripts/services/apiData.js services/apiData.js] - on choisit la section qui correspond à la source de données (Users/Maya/MINERVE/resource) - on ajoute la fonction {{{ #!div style="font-size:90%;width:60%;" {{{ var getWeatherStationsForecastData = function (product, stationId, refDate) { return getAPIResponse('minerve/weather-stations/forecast/'+product+'/'+stationId+'/'+refDate); }; }}} }}} 2. dans le fichier [https://trac.crealp.ch/VIVA/browser/trunk/web/app/scripts/services/appData.js services/appData.js] {{{ #!div style="font-size:90%;width:60%;" {{{ this.loadMeteoStationData = function (station, callback) { // [...] var prevC1Temp500m = apiData.getWeatherStationsForecastData(config.weatherProductId.cosmo1_t_500m, station.stationId, refDate).then(function (data) { stationData.prevData.c1Temp500m = data; }); }}} }}} 3. dans le fichier [https://trac.crealp.ch/VIVA/browser/trunk/web/app/scripts/directives/graph.js directives/graph.js] {{{ #!div style="font-size:90%;width:60%;" {{{ // Spatial temperatures if (scope.station.data.prevData.c1Temp500m.length > 0) { highchart.addSeries(graphService.createSerie( gettextCatalog.getString('portal_right_panel_tab_meteo_graph_temp_prev_c1_500m_serie_name'), scope.station.data.prevData.c1Temp500m, '#9900ff', config.highchart.types.line, 0, false, null, appData.getDates().ref, gettextCatalog.getString('portal_unit_c') )); } }}} }}} {{{ #!div style="margin-top:3em; width:95%;border:1px solid #cccccc;" }}} [[span(Personne(s) de contact:,style=font-weight:bold;)]] [mailto:gilles.marchand@crealp.vs.ch?subject=Projet%20CRUEX%20sur%20Trac gilmac] {{{ #!div style="width:95%;border:1px solid #cccccc;" }}} [[span(Projets:,style=font-weight:bold;)]] [https://trac.crealp.ch/Crealp-Admin/wiki Crealp-Admin], [https://trac.crealp.ch/Crealp-API/wiki Crealp-API], [https://trac.crealp.ch/CRUEX/wiki CRUEX], [https://trac.crealp.ch/polhydro-bulletin/wiki MINERVE-bulletin], [https://trac.crealp.ch/MINERVE-D3/wiki MINERVE-D3], [https://trac.crealp.ch/polhydro-db/wiki MINERVE-db], [https://trac.crealp.ch/MINERVE-operationnel/wiki MINERVE-operationnel], [https://trac.crealp.ch/polhydro-rest/wiki MINERVE-rest], [https://trac.crealp.ch/polhydro-scripts/wiki MINERVE-scripts], [https://trac.crealp.ch/MINERVE-SpatialTemp/wiki MINERVE-SpatialTemp], [https://trac.crealp.ch/polhydro-www/wiki MINERVE-www], [https://trac.crealp.ch/Ofev-CC/wiki Ofev-CC], [https://trac.crealp.ch/polhydro-pcr/wiki polhydro-pcr], [https://trac.crealp.ch/RSDataset/wiki RSDataset], [https://trac.crealp.ch/RSMinerve/wiki RSMinerve], [https://trac.crealp.ch/SIGES/wiki SiGES], [https://trac.crealp.ch/SnowMapping/wiki SnowMapping], [https://trac.crealp.ch/S.T.R.E.S.S/wiki S.T.R.E.S.S], [https://trac.crealp.ch/TeREsA/wiki TeREsA], [https://trac.crealp.ch/toolmap2/wiki ToolMap2], [[span(VIVA, style=color:grey;)]] {{{ #!div style="width:95%;border:1px solid #cccccc;" }}}