Commit d74bed49 authored by Bruno López Trigo's avatar Bruno López Trigo

Modificado o código do demostrador, mellora de rendemento selección de instancias

parent c3c065b9
......@@ -41,7 +41,7 @@
// Build a system
const ui = SwaggerUIBundle({
url: "http://172.16.244.175:8080/expliclas/swagger.json",
url: "http://172.16.244.175:8080/expliclas/expliclas/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
......
......@@ -41,7 +41,7 @@
// Build a system
const ui = SwaggerUIBundle({
url: "http://172.16.244.175:8080/expliclas/swagger.json",
url: "http://172.16.244.175:8080/expliclas/expliclas/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
......
#Generated by Maven
#Wed Jun 06 20:12:19 CEST 2018
#Thu Jun 07 13:02:39 CEST 2018
version=1.0
groupId=brunolopez
artifactId=expliclas-api
{
"main.css": "static/css/main.6ecb0d03.css",
"main.css.map": "static/css/main.6ecb0d03.css.map",
"main.js": "static/js/main.abfd176b.js",
"main.js.map": "static/js/main.abfd176b.js.map",
"main.css": "static/css/main.7c354912.css",
"main.css.map": "static/css/main.7c354912.css.map",
"main.js": "static/js/main.5a5e9f72.js",
"main.js.map": "static/js/main.5a5e9f72.js.map",
"static/media/beer.png": "static/media/beer.70f695ba.png",
"static/media/default.jpeg": "static/media/default.ca7bbe95.jpeg",
"static/media/glass.jpg": "static/media/glass.bcc512b5.jpg",
......
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.png"><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"><link href="https://fonts.googleapis.com/css?family=Yeseva+One" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Ovo|Yeseva+One" rel="stylesheet"><title>ExpliClass</title><link href="/static/css/main.6ecb0d03.css" rel="stylesheet"></head><body><div id="root"></div><script type="text/javascript" src="/static/js/main.abfd176b.js"></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.png"><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"><link href="https://fonts.googleapis.com/css?family=Yeseva+One" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Ovo|Yeseva+One" rel="stylesheet"><title>ExpliClass</title><link href="/static/css/main.7c354912.css" rel="stylesheet"></head><body><div id="root"></div><script type="text/javascript" src="/static/js/main.5a5e9f72.js"></script></body></html>
\ No newline at end of file
"use strict";var precacheConfig=[["/index.html","1ad8cd7a7df641f5e8c2bcaa8369b94d"],["/static/css/main.6ecb0d03.css","8820267d8bf7951ecc7162a279140a72"],["/static/js/main.abfd176b.js","dc990b8a53fd8370fdd12cf98ec36842"],["/static/media/beer.70f695ba.png","70f695ba03218435fa67bbce30f116f0"],["/static/media/default.ca7bbe95.jpeg","ca7bbe95968570738b2818810dac3b63"],["/static/media/glass.bcc512b5.jpg","bcc512b56043dd730b1541ccbac287ba"],["/static/media/iris.1e626fb8.jpg","1e626fb8678e34b9a69468cd9a2b17c0"],["/static/media/leaf.41640b3b.jpg","41640b3bf944f3b32b0a413ff7447900"],["/static/media/letters.74256f21.jpg","74256f217d7733b542ae1142f2f26d80"],["/static/media/notebook.3cdb6b06.jpg","3cdb6b06481b312175a61b7a25b4ef30"],["/static/media/wine.9b49c81e.jpg","9b49c81e6573307c25621382d8a9dcbf"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,/\.\w{8}\./);return[r.toString(),a]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(r){return setOfCachedUrls(r).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return r.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),r="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,r),e=urlsToCacheKeys.has(n));var a="/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(a,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}});
\ No newline at end of file
"use strict";var precacheConfig=[["/index.html","4b4ceb05140db32db8005597ad2ca618"],["/static/css/main.7c354912.css","ab292266f3e2d6ee2058428b2afb0fdb"],["/static/js/main.5a5e9f72.js","a66fa93e6e5e86d1af9441f27ab78ba8"],["/static/media/beer.70f695ba.png","70f695ba03218435fa67bbce30f116f0"],["/static/media/default.ca7bbe95.jpeg","ca7bbe95968570738b2818810dac3b63"],["/static/media/glass.bcc512b5.jpg","bcc512b56043dd730b1541ccbac287ba"],["/static/media/iris.1e626fb8.jpg","1e626fb8678e34b9a69468cd9a2b17c0"],["/static/media/leaf.41640b3b.jpg","41640b3bf944f3b32b0a413ff7447900"],["/static/media/letters.74256f21.jpg","74256f217d7733b542ae1142f2f26d80"],["/static/media/notebook.3cdb6b06.jpg","3cdb6b06481b312175a61b7a25b4ef30"],["/static/media/wine.9b49c81e.jpg","9b49c81e6573307c25621382d8a9dcbf"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,a){var r=new URL(e);return a&&r.pathname.match(a)||(r.search+=(r.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),r.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],a=new URL(t,self.location),r=createCacheKey(a,hashParamName,n,/\.\w{8}\./);return[a.toString(),r]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(a){return setOfCachedUrls(a).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return a.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),a="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,a),e=urlsToCacheKeys.has(n));var r="/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(r,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}});
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -96,10 +96,10 @@ class Explanation extends Component {
}
selectDataset(event){
var url = API_ROOT + '/dataset/' + this.state.problem;
// var url = API_ROOT + '/dataset/' + this.state.problem;
var id = event.target.id;
fetch(url,{
/*fetch(url,{
headers: new Headers({
'Authorization': localStorage.getItem('token')
})
......@@ -107,13 +107,12 @@ class Explanation extends Component {
.then((response) => {
return response.json();
})
.then((data) => {
.then((data) => {*/
this.setState({
datasets: data,
actualValues: data.lines[id-1].values,
actualValues: this.state.datasets.lines[id-1].values,
activeDataset: id
});
})
//})
}
render(){
......
......@@ -8,7 +8,7 @@
text-align: right;
font-weight: bold;
padding: 10px;
padding-bottom: 0px;
padding-bottom: 10px;
}
.btn-footer{
......@@ -37,4 +37,4 @@
.footer img, p{
display: none;
}
}
\ No newline at end of file
}
export const API_ROOT = 'http://localhost:8080/expliclas';
export const API_DOC = 'http://localhost:8080/expliclas/';
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