bug fixes ...

main
Steve Nyemba 3 days ago
parent 6fb5cec1e4
commit 5dc93bc40e

@ -7,7 +7,7 @@
"host": "0.0.0.0"
},
"context": "",
"logo": "www/html/_assets/images/logo.png",
"logo": "_assets/images/logo.png",
"source": {
"id": "disk",
"key": "/home/steve/dev/data/qcms/data-transport.key",
@ -35,9 +35,9 @@
"on": {
"load": {
"studio-menu": [
"www/html/menu.html"
"menu.html"
],
"studio-intro":["www/html/about.html"]
"studio-intro":["about.html"]
}
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

@ -11,7 +11,7 @@ studio.defaults = {
'postgresql':'SELECT *\nFROM INFORMATION_SCHEMA.COLUMNS LIMIT 10',
'iceberg':'SHOW TABLES',
'mysql':'SELECT * \nFROM INFORMATION_SCHEMA.COLUMNS LIMIT 10',
'mariadb':'SHOW TABLES'
'mariadb':'SHOW TABLES','files':'{"query":"index > -1"}'
}
studio.init = function (_context){
studio._context = _context
@ -241,6 +241,10 @@ studio.frame = function (_args){
http.setData (JSON.stringify(_data))
http.post(uri,function(x){
var _id = `.${_args.label} .control .apply`
$(_id).empty()
$(_id).append($('<i class="fa-solid fa-play"></i>'))
if(x.status == 200 && x.readyState == 4){
_r = JSON.parse(x.responseText)
// sessionStorage._data = x.responseText
@ -417,6 +421,7 @@ studio.frame = function (_args){
});
}
this.render = function (){
var _args = this._args
@ -435,17 +440,37 @@ studio.frame = function (_args){
read = this.read
_compute = this.compute
_xbutton = $('<div class="border-left"><div class="active apply" align="center" title="Run Query"><i class="fa-solid fa-play"></i></div></div>').on('click',function (){
var _id = '.code.'+_args.label.trim()
_query = $(_id).val()
// var _id = '.code.'+_args.label.trim()
// _query = $(_id).val()
if (_query.length != ''){
var _data = read(_args,_query,_compute)
// if (_query.length != ''){
// var _data = read(_args,_query,_compute)
// }
var _child = $(`.${_args.label} .control .apply`).children()[0]
if ($(_child).attr('class').match(/play/)){
$(`.${_args.label} .control .apply`).empty()
$(`.${_args.label} .control .apply`).append($('<i class="fa-solid fa-cog fa-spin" style="color:#FF6500"></i>'))
//
//
var _id = '.code.'+_args.label.trim()
_query = $(_id).val()
if (_query.length != ''){
var _data = read(_args,_query,_compute)
}
}else{
}
})
_pythonCode = $('<div class="border-left" title="Python Code"><div class="active" align="center"><img src="api/disk/read?uri=www/html/_assets/images/python.png" style="width:20px" /></div></div>')
_pythonCode = $('<div class="border-left" title="Python Code"><div class="active" align="center"><img src="_assets/images/python.png" style="width:20px" /></div></div>')
_pythonCode.on('click',()=>{

@ -17,7 +17,7 @@ import pandas as pd
from langchain_openai import AzureOpenAI, AzureChatOpenAI
from langchain_ollama import OllamaEmbeddings, OllamaLLM
from langchain_core.messages import HumanMessage, AIMessage
from langchain.chains import LLMChain
from langchain_classic.chains import LLMChain
from langchain_core.prompts import PromptTemplate
from langchain_core.runnables import RunnablePassthrough
from langchain_core.output_parsers import StrOutputParser

@ -31,6 +31,7 @@ def get (**_args) :
_table = 'NA' if not _name else _data[_key][_name]
_plugins = [] if 'plugins' not in _data[_key]else _data[_key]['plugins']
_icon = f'{_context}/api/disk/read?uri=www/html/_assets/images/{_provider}.png'
_icon = f'_assets/images/{_provider}.png'
_labels.append({"label":_key,"provider":_provider,'table':_table,'icon':_icon,'AI': (_provider in _CATALOGS and _HAS_LLM)})
else:
continue

@ -47,7 +47,8 @@ def apply (**_args):
_query = _request.json['query']
_qreader = transport.get.reader(label=_label)
try:
if not _query.startswith("{") :
if _query.strip()[0] not in ['{','[']:
_query = _query.replace('%%','%').replace('%','%%')
_data = _qreader.apply(_query) #.astype(str).to_dict(orient='split')
else:
_data = _qreader.read( **json.loads(_query))

@ -1,11 +1,11 @@
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/layout.css" rel="stylesheet" type="text/css">
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/header.css" rel="stylesheet" type="text/css">
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/menu.css" rel="stylesheet" type="text/css">
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/borders.css" rel="stylesheet" type="text/css">
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/footer.css" rel="stylesheet" type="text/css">
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/pane.css" rel="stylesheet" type="text/css">
<link href="http://localhost:8082/api/disk/read?uri=www/html/_assets/themes/default/responsive.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/layout.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/header.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/menu.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/borders.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/footer.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/pane.css" rel="stylesheet" type="text/css">
<link href="_assets/themes/default/responsive.css" rel="stylesheet" type="text/css">
<style>
.features {display:grid; grid-template-columns: repeat(2,1fr); gap:4px; padding:4px ;

@ -1,48 +1,48 @@
<link href="www/html/_assets/css/studio.css" type="text/css" rel="stylesheet">
<link href="_assets/css/studio.css" type="text/css" rel="stylesheet">
<link href="www/html/_assets/css/mermaid.min.css" type="text/css" rel="stylesheet">
<script src="www/html/_assets/js/gridjs.umd.js"></script>
<link href="_assets/css/mermaid.min.css" type="text/css" rel="stylesheet">
<script src="_assets/js/gridjs.umd.js"></script>
<!-- data table for grid implementation ... -->
<link href="www/html/_assets/css/dataTables.min.css" type="text/css" rel="stylesheet">
<script src="www/html/_assets/js/dataTables.min.js"></script>
<link href="_assets/css/dataTables.min.css" type="text/css" rel="stylesheet">
<script src="_assets/js/dataTables.min.js"></script>
<!-- jspredhsheet (community edition) -->
<link href="www/html/_assets/lib/spreadsheet/jspreadsheet-ce/css/material.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/jspreadsheet-ce/css/jspreadsheet.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/jspreadsheet-ce/css/jsuites.css" rel="stylesheet" type="text/css">
<script src="www/html/_assets/lib/spreadsheet/jspreadsheet-ce/jspreadsheet.js"></script>
<script src="www/html/_assets/lib/spreadsheet/jspreadsheet-ce/jsuites.js"></script>
<link href="_assets/lib/spreadsheet/jspreadsheet-ce/css/material.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/jspreadsheet-ce/css/jspreadsheet.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/jspreadsheet-ce/css/jsuites.css" rel="stylesheet" type="text/css">
<script src="_assets/lib/spreadsheet/jspreadsheet-ce/jspreadsheet.js"></script>
<script src="_assets/lib/spreadsheet/jspreadsheet-ce/jsuites.js"></script>
<!-- syncfusion spreadsheet-->
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-0.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-1.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-2.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-3.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-4.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-5.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-6.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-7.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-8.css" rel="stylesheet" type="text/css">
<link href="www/html/_assets/lib/spreadsheet/syncfusion/css/material-9.css" rel="stylesheet" type="text/css">
<script src="www/html/_assets/lib/spreadsheet/syncfusion/ej2.min.js"></script>
<script src="www/html/_assets/lib/spreadsheet/syncfusion/shim.min.js"></script>
<script src="www/html/_assets/lib/spreadsheet/syncfusion/syncfusion-helper.js"></script>
<link href="_assets/lib/spreadsheet/syncfusion/css/material-0.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-1.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-2.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-3.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-4.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-5.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-6.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-7.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-8.css" rel="stylesheet" type="text/css">
<link href="_assets/lib/spreadsheet/syncfusion/css/material-9.css" rel="stylesheet" type="text/css">
<script src="_assets/lib/spreadsheet/syncfusion/ej2.min.js"></script>
<script src="_assets/lib/spreadsheet/syncfusion/shim.min.js"></script>
<script src="_assets/lib/spreadsheet/syncfusion/syncfusion-helper.js"></script>
<link href="www/html/_assets/css/prism.css" type="text/css" rel="stylesheet">
<script src="www/html/_assets/js/prism.js"></script>
<link href="_assets/css/prism.css" type="text/css" rel="stylesheet">
<script src="_assets/js/prism.js"></script>
<script src="www/html/_assets/js/forms.js"></script>
<script src="_assets/js/forms.js"></script>
<!-- <script src="https://bossanova.uk/jspreadsheet/v5/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://bossanova.uk/jspreadsheet/v5/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
-->
<script src="www/html/_assets/js/studio.js"></script>
<script src="www/html/_assets/js/ai.js"></script>
<script src="_assets/js/studio.js"></script>
<script src="_assets/js/ai.js"></script>
<script>
var Initialize =function(){

@ -8,7 +8,7 @@
if (! _item.name.match(/http|callback/ig) ){
var _frame = $('<div class="provider-slot border-round border"></div>').attr('group',_item.group).attr('provider',_item.name)
_text = $('<div class="small bold" align="center"></div>').html(_item.name)
_icon = $('<img>').attr('src','www/html/_assets/images/'+_item.name+'.png')
_icon = $('<img>').attr('src','_assets/images/'+_item.name+'.png')
_pane = $('<div class="provider active"></div>').append(_icon,_text)
$(_frame).attr('icon',$(_icon).attr('src'))
_frame.append(_pane)

Loading…
Cancel
Save