GithubHelp home page GithubHelp logo

Comments (5)

mastropi avatar mastropi commented on June 18, 2024

As agreed with Matthieu after our call this morning, to begin with we will implement a response from the backend with the following format:

{
	"message": {
		"type": "error",
		"value": "Error message here"
		}
}

On the frontend, the message will be displayed as a red banner via a notifier.

The error message related to this issue can be triggered at any of the following contexts in the Kibella client:
(the third column shows the pattern matching performed by the backend (requests.php) on the URI received with the request; the fourth column is for my reference)

image

from kibella.

Kranf99 avatar Kranf99 commented on June 18, 2024

This looks great! This is ok for me!

from kibella.

mastropi avatar mastropi commented on June 18, 2024

TODO: (2020/08/22) Once the interface is able to handle the above JSON string with an error message to display, the backend should be adapted so that all error messages are sent using that JSON protocol; and probably additional error/warning messages should also be sent in order to provide the user with suitable information.

For the adaptation of existing error messages, look for all calls to showMessage() and calls to echo of exception messages. For example, there are many of these in classes.php that are related to the the connection to databases.

For new error messages, there are already some commented out in dbDBHExecuteSqlQuery() when the query to execute is ill-formed. Note that this can be caused by the user typing an incorrect filter expression in the free-text box that can be used to filter data.

from kibella.

Kranf99 avatar Kranf99 commented on June 18, 2024

The frontend code now contains a little piece of code that cannot be transpiled using the standard "grunt dist" command because grunt does not support yet the new extended javascript syntax (using arrow-expression "=>"). More precisely, inside the file "interface/elasticsearch.angular.js", there is one usage of "=>" that prevents all "grunt dist" commands to work. This little piece of code needs to be converted back to "standard" javascript.

Currently, to still be able to transpile the code, I follow these steps:

  1. Inside the original source code, I replace this line:
    }).then((response) => {
    with
    }).then( function (response) {
  2. I transpile the code
  3. Inside the transpiled code, I replace this :
    }).then( function (response) {
    with
    }).then( (response) => {

This is ugly.
Needs fixing...

from kibella.

Kranf99 avatar Kranf99 commented on June 18, 2024

Also: no banner is displayed when the message is sent from the formRegisterTableSubmit.php script.

from kibella.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.