FUB-HCC / IKON-projektor

Frontend component for https://github.com/FUB-HCC/IKON-backend
https://fub-hcc.github.io/IKON/
GNU Affero General Public License v3.0
5 stars 2 forks source link

logging #203

Closed ckinkeldey closed 4 years ago

ckinkeldey commented 4 years ago

Wir brauchen Logging der Interaktionen für die Feldstudie: Timestamp X: User 1 wählt “Geisteswissenschaften” ab Timestamp Y: User 5 hovert über Projekt X Timestamp Z: User 3 stellt Jahres-Slider auf “2003-2008" (aber keine Maus-Koordinaten oder so)

Am Besten auf den Server schreiben und abrufbar machen als JSON oder CSV.

Bei Nutzern wäre es voll OK, wenn wir jeden ne eigene URL geben, mit der sie die Anwendung aufrufen, und dann über Param die Nutzer.ID übermittelt wird.

Hier ein Beispiel für so ein Log: user_11277.csv.zip

ckinkeldey commented 4 years ago

Let's keep it simple and use asynchronous http requests to write the logs: JSON-string with: user=2 event=time_slider params=2002,2010

ckinkeldey commented 4 years ago

user=0 event=uncertainty params: switch_on

ckinkeldey commented 4 years ago

Timestamp wird auf dem Server gesetzt

ckinkeldey commented 4 years ago

If simple http requests do not work for whatever reason here is a simple javascript lib that I used in a former project: trace.js.zip

ckinkeldey commented 4 years ago

@wittenator hat unter /Users/ck/workspace/IKON-backend/src/logging/src/server.js den Logging-Server integriert

ckinkeldey commented 4 years ago

@mx-e Unser Vorschlag für den "event"-String, können wir das so kodieren? {type},{label},{action},{value} z.B.: filter,forschungsgebiete,deselect,Geisteswisseschaften button,tutorial,select,start symbol,project,select,78

mx-e commented 4 years ago

ungern, das erfordert sehr viel relabelling. es gibt bereits actions mit action namen und parametern, nämlich diese hier:

mx-e commented 4 years ago

export const changeGraph = value => { return { type: actionTypes.CHANGE_GRAPH, value: value }; };

export const checkboxFilterChange = (filterId, value) => { return { type: actionTypes.CHECKBOX_FILTER_CHANGE, id: filterId, value: value }; };

export const timerangeFilterChange = value => { return { type: actionTypes.TIMERANGE_FILTER_CHANGE, value: value }; };

export const projectHovered = projectId => { return { type: actionTypes.PROJECT_HOVERED, value: projectId }; };

export const catHovered = catId => { return { type: actionTypes.CAT_HOVERED, value: catId }; };

export const infraHovered = infraName => { return { type: actionTypes.INFRA_HOVERED, value: infraName }; };

export const ktaHovered = ktaId => { return { type: actionTypes.KTA_HOVERED, value: ktaId }; };

export const yearHovered = data => { return { type: actionTypes.YEAR_HOVERED, value: data }; };

export const unHovered = () => { return { type: actionTypes.UNHOVERED }; };

export const projectClicked = projectId => { return { type: actionTypes.PROJECT_CLICKED, value: projectId }; };

export const catClicked = catId => { return { type: actionTypes.CAT_CLICKED, value: catId }; };

export const infraClicked = infraName => { return { type: actionTypes.INFRA_CLICKED, value: infraName }; };

export const ktaClicked = ktaId => { return { type: actionTypes.KTA_CLICKED, value: ktaId }; };

export const yearClicked = data => { return { type: actionTypes.YEAR_CLICKED, value: data }; };

export const unClicked = () => { return { type: actionTypes.UNCLICKED }; };

export const showUncertainty = data => { return { type: actionTypes.SHOW_UNCERTAINTY, value: data }; };

export const highlightUncertainty = data => { return { type: actionTypes.HIGHLIGHT_UNCERTAINTY, value: data }; };

export const legendHovered = legendKey => ({ type: actionTypes.LEGEND_HOVERED, value: legendKey });

export const fetchClusterData = () => { return dispatch => { axios.get("./cluster.json").then(result => { batch(() => { dispatch(updateClusterData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchInstitutionsData = () => { return dispatch => { axios.get("https://localhost/api/institutions").then(result => { batch(() => { dispatch(updateInstitutionsData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchProjectsData = () => { return dispatch => { axios.get("https://localhost/api/projects").then(result => { batch(() => { dispatch(updateProjectsData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchKTAData = () => { return dispatch => { axios .get("https://localhost/api/knowledgeTransferActivities") .then(result => { batch(() => { dispatch(updateKTAData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchKTAMappingData = () => { return dispatch => { axios.get("https://localhost/api/ktastargetgroups").then(result => { batch(() => { dispatch(updateKTAMappingData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchTargetGroupsData = () => { return dispatch => { axios.get("https://localhost/api/targetgroups").then(result => { batch(() => { dispatch(updateTargetGroupsData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchInfrastructureData = () => { return dispatch => { axios.get("https://localhost/api/infrastructure").then(result => { batch(() => { dispatch(updateInfrastructureData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const fetchCollectionsData = () => { return dispatch => { axios.get("https://localhost/api/collections").then(result => { batch(() => { dispatch(updateCollectionsData(result.data)); dispatch(processDataIfReady()); }); }); }; };

export const updateClusterData = clusterData => { return { type: actionTypes.UPDATE_CLUSTER_DATA, value: clusterData }; };

export const updateInstitutionsData = institutionsData => { return { type: actionTypes.UPDATE_INSTITUTIONS_DATA, value: institutionsData }; };

export const updateProjectsData = projectsData => { return { type: actionTypes.UPDATE_PROJECTS_DATA, value: projectsData }; };

export const updateKTAData = ktaData => { return { type: actionTypes.UPDATE_KTA_DATA, value: ktaData }; };

export const updateTargetGroupsData = targetgroups => { return { type: actionTypes.UPDATE_TARGETGROUPS_DATA, value: targetgroups }; };

export const updateInfrastructureData = infrastructures => { return { type: actionTypes.UPDATE_INFRASTRUCTURE_DATA, value: infrastructures }; };

export const updateCollectionsData = collections => { return { type: actionTypes.UPDATE_COLLECTIONS_DATA, value: collections }; };

export const updateKTAMappingData = ktaMappingData => { return { type: actionTypes.UPDATE_KTA_MAPPING_DATA, value: ktaMappingData }; };

export const processDataIfReady = () => { return { type: actionTypes.PROCESS_DATA_IF_READY }; };

mx-e commented 4 years ago

würde alle nicht Daten-relateten actions loggen

mx-e commented 4 years ago

+USER ID

ckinkeldey commented 4 years ago

note: CAT_HOVERED / CLICKED: target groups in vis KAT_HOVERED / CLICKED: ktas in sidebar list