Ratel mutation input textbox does not have syntax highlighting and autoindent

Filing this on behalf of one of our users who asked a question via Drift.

Report a Ratel Bug

What Version of Ratel are you using?

Ratel Version
$ dgraph-ratel -version
Ratel Version: 
Commit ID: 
Commit Info: 

Which Version of the UI are you using

  • Stable
  • Bleeding Edge

Have you tried reproducing the issue with the latest release?

Yes.

Steps to reproduce the issue (command/config used to run Dgraph).

All JSON mutations does not have syntax highlighting. Furthermore the autoindent doesn’t work correctly when using JSON mutations.

Expected behaviour and actual result.

The syntax to be highlighted and the indents to work correctly. I personally don’t care for syntax highlighting as much, but I can see why this is such a blocker to our users

1 Like

The same issue.
Everything is fine if I connect by localhost:8080 through play.dgraph.io.
But once a VM is launched and a connection through $ dgraph-ratel is performed - there is no autoindent and autocomplete of predicates.

Are you seeing any errors in, say, the Chrome dev tools console? Normally, Ratel fetches /ui/keywords on localhost:8080 or wherever the Alpha HTTP endpoint is to get the info to do autocompletion of predicates.

Everything seems fine. And there is auto-completion of functions, but not predicates + everything collapses to the left (all braces, etc). However, there was an error, but I’m not sure if it affects:

Editor: Error while fetching schema t: invalid username or password
    t errors.js:25
    t errors.js:43
    callAPI clientStub.js:397
    s clientStub.js:44
    s clientStub.js:25
    o clientStub.js:16
    promise callback*c clientStub.js:18
    o clientStub.js:16
    promise callback*c clientStub.js:18
    i clientStub.js:19
    i clientStub.js:15
    callAPI clientStub.js:365
    login clientStub.js:285
    s clientStub.js:44
    s clientStub.js:25
    i clientStub.js:19
    i clientStub.js:15
    login clientStub.js:263
    e Editor.js:65
    u runtime.js:63
    _invoke runtime.js:293
    w runtime.js:118

I used VM (hosted on Azure) with the following set up configuration:

dgraph zero --my=localhost:5080
dgraph alpha --my=localhost:7080 --zero=localhost:5080 --whitelist 109.251.100.146
dgraph alpha --my=localhost:7081 --zero=localhost:5080 -o=1 -p ./backup/p -w ./backup/w
dgraph-ratel

It works fine but for auto-completion of predicates…

Hi, Also having this getting started on a local server. No syntax highlighting or auto-indentation. As I said, running locally accessing from the same PC the docker is running on. Ubuntu 20.10.

Firefox, no errors in console.

Stable release.

This is being worked on. Either @hardik or I will update you when progress has been made

Same Issue.

Is this still not fixed?