Run Axios Interceptor - vue.js

Im trying to do the logs . However i follow this documentation
https://github.com/hg-pyun/axios-logger
Im getting the same result but i wanted to ask how can i run it in vuejs like the picture shown? i only see the output in inspector in info. Kindly help how can i run this inceptor in my vuejs

Currently, your Vue app can only print logs to the client, thus, on each user browser's console.
If you need some kind of dashboard to aggregate all production logs, you'll have to consider adding another tool. Such tool will send via http requests all your logs to their own dashboard, which you can consult later to analyse every user's logs.
You may consider using Sentry for example.

Related

Logging console error of UI application into AWS

I am new to vue js and front end development. How can I direct the console errors and API errors from front end application that is running on user's browser to cloud watch logs.
I know that in Java backend development, we can use log4j to log the errors to a rolling log file and wire those logs to cloudwatch log groups (so I can monitor cloudwatch logs for any potential errors or warnings). How can I have similar functionality for logging console and API errors from front end vue js application to cloud watch logs
There really isn't a great way to do this from a security standpoint. You'd have to expose your cloudwatch log stream to the world essentially.
You can use npm packages like winston-cloudwatch for this fairly easily, but you have to more or less "hardcode" your credentials since a frontend/vue app runs in the users browser. They'll always be able to see the credentials you're sending along which makes them meaningless.
With that being said, there really isn't any risk of someone doing anything malicious besides sending dirty messages to your logs.
What about creating a Lambda endpoint that receives the logs from the vue app and writes them to cloud watch, this way you will be able to log more activities such elements being clicked, or the time each component was shown in the screen.

How can I possibly implement a VueJS app to Odoo?

I have to integrate a VueJS app in Odoo. I don't exactly know how I can achieve that?
I found this https://www.odooinvue.org/ (not my app, but an example app) . Still no idea on how can I implement odoo in Vue. Login gives me a Failed to Login error message in this example app.
Any idea how to implement odoo in vue??
Actually, odooinvue works fine. Read carefully the instructions, in development it shows how to start a traefik docker container in order to serve both odoo and Vue.js.
Note: If I am not wrong, the purpose is to use odooinvue as a pure frontend, so it's not really an integration, basically you build vuejs (quasar, specifically) apps with odoo used as a pure backend.
See also this answer, by odooinvue's author
I am the author of that project. Its really impossible to answer you without knowing what steps you have taken to setup the project, but for that error, make sure of the following:
The Odoo server is up and running in the backend and you can login.
When you login with the front-end Vue app, you are using credentials that you know are working.
If that fails, open the dev console of your browser and check the network log. Make sure that the authentication request is returning status code 200.
I know others that are using the project just fine without any issue, so I am going to assume that you need some technical help. Perhaps hire a software developer to assist you.

Do I have to use browser login to use Google Sheets API from node instance?

I read all similar questions without arriving to the point.
I have a node instance and it runs on my "index.js" only in my local machine.
I have to take a cvs and put on new google sheet.
I have "credentials.json" in my project. Google say me "incorrect redirect_urls". But I cannot put a redirect url since it's a node script.
And I do not want to pass in a browser for a login. This because maybe tomorrow I will put the same script on a real server.
If you are trying to use the Google Sheep API I'm pretty sure you are not getting the results you want. ;)
Assuming you have enabled the Sheets API in you project, and you plan to use a server to deploy the application, then you need to configure you consent screen accordingly.
During development you can use localhost as a redirect URL, which will enable you to test the app.
You should have a read through this help article to correctly set up your OAuth credentials and consent screen for each type of project.

Start with viewer HTML/JavaScript

I followed this steps:
https://forge.autodesk.com/blog/tutorial-using-curl-2-legged-authentication-model-translation
and uploaded and checked file, everything is OK.
Now I need to view file in viewer so I try this example:
http://learnforge.autodesk.io/#/viewer/2legged/ui
when I execute index.html, I see this error in debugger:
Failed to load resource: the server responded with a status of 401
(Unauthorized)
How to authorize using examples from http://learnforge.autodesk.io/#/viewer/2legged/ui
The Learn Forge tutorial code includes all you need to authorize/upload/translate/view files, but you need all steps to get your app running. The tutorial starts here.
You'll see that the UI side calls the server side to require an access token. As a learning experience, I would suggest doing all steps on the tutorial. The cURL tutorial is a different approach.
Or just download the ready-to-use code at this github repo.
If you just want to show a model with a token obtained by cURL, using the Developer Portal tutorial, you'll that it hard-code the token. This is just for testing, the token will expire after 30 minutes.
Regarding mouse right-click, please check this blog post.

Empty log for Safari Push Notifications webservice

I've implemented Safari Push Notifications both server-side and client-side. On the client, after asking for permissions, the callback function is called with permission "denied".
On the server-side, the logs show that a request for the push package has been made and returns a 200, but a few seconds later the /v1/log endpoint is called with no payload.
Does anyone have an idea how to debug this?
May help following guide and push package creator.
browser-push
A helpful tip is to look in the System Log, from the Console app. Safari shows messages in there.
Another reason for my issue is realted to Django, which as 1.5 doesn't show non-form data in request.POST, but in request.body.