Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
fe39d9ee
Commit
fe39d9ee
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
DRAFT: Add function to extract and transform query string
parent
7522865b
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!47
Release v0.4.0
,
!44
ENH: Add all query results to bookmarks
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/js/ext_bookmarks.js
+15
-0
15 additions, 0 deletions
src/core/js/ext_bookmarks.js
with
15 additions
and
0 deletions
src/core/js/ext_bookmarks.js
+
15
−
0
View file @
fe39d9ee
...
@@ -599,6 +599,20 @@ var ext_bookmarks = function ($, logger, config) {
...
@@ -599,6 +599,20 @@ var ext_bookmarks = function ($, logger, config) {
}
}
}
}
/**
* Return the SELECT query created from the contents of the query response field
*/
const
get_query_from_response
=
function
()
{
// Go through divs in response field and extract the query string.
const
divs
=
$
(
"
.caosdb-query-response-heading
"
).
find
(
"
div
"
);
for
(
const
div
of
divs
)
{
if
(
div
.
innerText
.
startsWith
(
"
Query:
"
)
&&
!
div
.
innerText
.
includes
(
"
Results:
"
))
{
return
get_select_id_query_string
(
div
.
innerText
.
slice
(
div
.
innerText
.
indexOf
(
"
"
)
+
1
));
}
}
}
/**
/**
* Initialize this module.
* Initialize this module.
*/
*/
...
@@ -690,6 +704,7 @@ var ext_bookmarks = function ($, logger, config) {
...
@@ -690,6 +704,7 @@ var ext_bookmarks = function ($, logger, config) {
init_button
:
init_button
,
init_button
:
init_button
,
get_bookmark_data
:
get_bookmark_data
,
get_bookmark_data
:
get_bookmark_data
,
get_select_id_query_string
:
get_select_id_query_string
,
get_select_id_query_string
:
get_select_id_query_string
,
get_query_from_response
:
get_query_from_response
,
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment