GithubHelp home page GithubHelp logo

dql-explorer's Issues

JSON contains useless values

It happened to me that the JSON for the fieldnames of a form were empty. You could check that and then omit this element in the generated JSON

Add operator only if condition is added

I created a plain simple query whre I did not add any condition. This results in

[018518:000012-00007F2861CA7700] 03/09/2019 06:44:53 AM Agent 'runDQLQuery' error: Domino Query execution error: Query is not understandable - syntax error - MUST have at least one operator (Call hint: OSLocalAllc, Core call #0) ^ ******************

which is ok, because the query submitted to the server is

dqlissue001

So pls. add the operator only if a condition is configured.

Wrong number of search results is displayed when no document have been found

If the query returns no results, the number of matching documents should be 0 instead of a random(?) number ( always 143 in my environment )

Server console shows

[018518:000012-00007F2861CA7700] 03/09/2019 06:59:29 AM Agent message: timeType = '1'
[018518:000012-00007F2861CA7700] 03/09/2019 06:59:29 AM Agent 'runDQLQuery' error: Domino Query execution error: Entry not found in index - validation error Error validating field name (field not defined) - [timeType] (Call hint: NIFFindByKeyExtended2, Core call #0) ******************

Readme.md misleading

There's two stories told in readme.md:

  1. For the DQL Newbie to try DQL via DQL explorer. For this we need a crisp intro that simply focuses on getting the nsf on the disk and prereqs set up
  2. For building the NTF from scratch

Currently, these stories are mixed - basically it starts with story 1, then deep dives in story 2 and the last line finally is the missing piece of story 1.

Let's make this help wanted and i'm ready to work on this

Query by view / column creates a query by form / field

Building a query by view and column name, then activating Developer Options: the resulting query has the wrong format.
Example:
configured node-demo.nsf (demo db from appdevpack) in dql Explorer, also made sure the db design is indexed in GQFDsgn.cat.
Using query builder I select "Views" >> "AllContactsByState" >> "State" >> "in" >> "CA" and "FL".
The resulting query should be "'AllContactsByState'.State in ('CA', 'FL')".
However it is listed as "State in ('CA', 'FL').
Running "Explain" from the Developer Options has the following result:

Query Processed:
[State in ('CA','FL')]

0. IN    (childct 2) (totals when complete:) Prep 0.0 msecs, Exec 8.401 msecs, ScannedDocs 986, Entries 0, FoundDocs 70
1.State = 'CA' NSF document search estimated cost = 100  
Prep 1.102 msecs, Exec 8.395 msecs, ScannedDocs 986, Entries 0, FoundDocs 50
1.State = 'FL' NSF document search estimated cost = 100  
Prep 0.691 msecs, Exec 0.0 msecs, ScannedDocs 936, Entries 0, FoundDocs 20

Also see screenshot
DQLExplorer_Query_by_view

UI crashes while entering the value

UI shows following error while entering the value in a text field in "Query Builder" Section

Error

2.62e4ba75.chunk.js:1 TypeError: Cannot read property 'type' of undefined
at a.onTermChange (main.23744580.chunk.js:1)
at Object.onChange (main.23744580.chunk.js:1)
at t. (2.62e4ba75.chunk.js:1)
at ia (2.62e4ba75.chunk.js:1)
at ra (2.62e4ba75.chunk.js:1)
at Ya (2.62e4ba75.chunk.js:1)
at Va (2.62e4ba75.chunk.js:1)
at 2.62e4ba75.chunk.js:1
at Object.t.unstable_runWithPriority (2.62e4ba75.chunk.js:1)
at As (2.62e4ba75.chunk.js:1)

'DefaultButton' is defined but never used no-unused-vars

Compiled with warnings.

./src/components/querybuilder/ShareDialog.js
Line 3: 'DefaultButton' is defined but never used no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

TODO: remove DefaultButton from line 3 ; it has been used in line 73, but line 73 is commented out.

Problem with query by form if form's alias is different from it's 'real' name

There's a problem building a query by form if the form's name is different from its alias, as in 'Main form | fmMain':
Drop-down to select forms shows the 'real' form names, but obviously the field selection is looking for the form definition by the alias name: selecting "Main form" from the list leaves the field selection empty.

This can be solved by changing form name / form alias so that they are equal as in 'fmMain | fmMain' (or eliminate alias name altogether).
Then I have the proper field selection

BTW: difference between name and alias of course is case-sensitive: if the form's name is 'Main | main' no fields can be selected; name has to be'main | main'.
Environment info:
node.js 10.15.3 is running locally on a Windows 10 notebook;
database to be queried is hosted by a Domino 10.0.1 server running on CentOS.
DQLExplorer version is 0.2.7

Also see here: https://www.openntf.org/main.nsf/project.xsp?r=project/DQL%20Explorer/discussions/BD568D0F285460CC852583C20041611A

Error parsing timedate string

Resulting query contains wrong timedate string

Domino Query execution error: Release 10.0.1|November 29, 2018 - error during planning and tree generation Error parsing timedate string - 2019-21-13 (ISO massaged string = 20192113)Error filling node for timeTimeFrom = '2019-21-13' (Call hint: OSLocalAllc, Core call #0)******************

timedate

Please provide the NSF as ODP

This would enable us to contribute to the NSF as well ;-)
I'd then switch to using Java for the Agents or even better: use a custom service bean to create a REST service using the REST service control from the Extlib.

Query does not take selected FORM into account

I have created a database with 2 forms ( form1 and form2 ) . Both forms have an item with name 'subject'
I also have created douments for each form.

I have configured a query to get all documents from the database that are of type form1 AND have the word form in 'subject'

DqlExplorer builds the correct query in the Development Options sections, but the submitted qury is missing the Form="form1" part.

The result is 2 documents, but this also includes the document created with form2

dqlissue002

Type error 's is undefinded' if databases are located deeper in File-directory

If the folder or the database is locate deeper in the file directory than you get a s is undefined error.
It is because the json-File has a wrong escape character like :"...folder1/folder2\database.nsf
The agent 'getDatabasesFromServer' only replace the first backslash with the function "replaceSubstring". I put a new function in it:

Public Function ReplaceSubstring3(SourceS As String) As String
	Dim SearchS As String, ReplaceS As String	
	SearchS="\"
	ReplaceS="/"	
	While InStr(SourceS, SearchS) > 0		
		SourceS = Left$(SourceS, InStr(SourceS, SearchS) -1) + ReplaceS + _
		Right$(SourceS, Len(SourceS) -InStr(SourceS, SearchS) - Len(SearchS) + 1)		
	Wend
	ReplaceSubstring3 = SourceS	
End Function

If you use this function in line 66 the json-file is ok und will work.

Query by Form : No fields in dropdown

When I try to build a query using a Form, I'm unable to select fields. Neither in the Query Builder section, nor in the Columns/Fields to display ... section.
When I look at the network traffic in the browser (Firefox), the agent getFieldNamesFromForm is called with the appropriate parameters and I get a valid JSON containing all fields.

[{"name": "$fldSecAuthors","displayName":"$fldSecAuthors","type": "name"},{"name": "StoreId","displayName":"StoreId","type": "text"},{"name": "StorePhone","displayName":"StorePhone","type": "text"},{"name": "StoreCountry","displayName":"StoreCountry","type": "text"},{"name": "StoreRegion","displayName":"StoreRegion","type": "text"},{"name": "StoreCity","displayName":"StoreCity","type": "text"},{"name": "StoreZip","displayName":"StoreZip","type": "text"},{"name": "StoreStreet","displayName":"StoreStreet","type": "text"},{"name": "StoreName","displayName":"StoreName","type": "text"},{"name": "StoreBanner","displayName":"StoreBanner","type": "text"}]

Thus the agent is called and returns values, but the comboboxes are not filled with the data.
I don't see any errors in the browser console.

I'm running the database on a Domino V11 beta 1 server, but I assume this is not a server issue, since the agent returns valid data.

Please advise.

Remove hard coded in who you can share query with ..

When you create a query, you have the ability to share the query with other users. Currently the names that appear in the drop down for sharing is hard coded to 4 names:

image

This enhancement would be to add an agent to the dqlexplorer.nsf (like was done for the getdatabases agent) or a page (like was done for the getuser page) , that will get a list of all individuals in the ACL for dqlexplorer.nsf and return a json object to the app in the form of

  {
    "key": 1,
    "imageInitials": "AM",
    "text": "Andrew Manby",
    "secondaryText": "Director, Product Management",
    "tertiaryText": "CN=Andrew Manby/O=MyOrg"
  },
  {
    "key": 2,
    "imageInitial"s: "DP",
    "text": "Dimitri Prosper",
    "secondaryText": "Developer",
    "tertiaryText": "CN=Dimitri Prosper/O=MyOrg"
  },
  {
    "key": 3,
    "imageInitials": "LG",
    "text": "Luis Guirigay",
    "secondaryText": "Technical Leader",
    "tertiaryText": "CN=Luis Guirigay/O=MyOrg"
  },
  {
    "key": 4,
    "imageInitials": "SG",
    "text": "Scott Good",
    "secondaryText": "Designer",
    "tertiaryText": "CN=Scott Good/O=MyOrg"
  }

This object can then be used in the src/components/querybuilder/PeoplePicker.js component to make the names available in the above drop down.

Question: What about security of targeted databases?

If I'm understanding correctly, the ACLs setup for the DQL database (say Bob as Author) would then use "Bob" in the query to the targeted database. So, the results given are what "Bob" would be able to see in that target database.

If I make this query available to other users, will they also see what "Bob" would get from the query or what the end-user himself would be able to see from the target database.

This to me has been the fundamental flaw in keeping DQL from being truly useable at this stage in the game. I have not played with it enough to determine how I'd want to manage users of the Node app against their ACL rights in the targeted Domino DBs.

Perhaps I've missed something in more recent updates to DQL and it's been addressed?

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.