Skip to content

Commit 18e4ba2

Browse files
Open ai UI (#256)
* review * change color of button * add package-lock * open AI help message * ui styling * review dash * add hasKey * changes * merge indexing * ai changes ... * progress ... * review css * add message --------- Co-authored-by: Francesca-Bit <[email protected]> Co-authored-by: Kitty Jose <[email protected]>
1 parent 3ad39fc commit 18e4ba2

32 files changed

+13646
-294
lines changed

package-lock.json

Lines changed: 635 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/tdb-dashboard/src/App.css

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -296,17 +296,17 @@ div.progress-bar-container {
296296
min-width: "33.333333%"
297297
}
298298

299-
.table {
299+
/*.table {
300300
border: 0px solid transparent !important;
301301
table-layout: fixed;
302302
margin-left: auto;
303303
margin-right: auto;
304-
background-color: #303030;
304+
background-color: transparent!important;
305305
}
306306
307307
.table td, .table th {
308308
border-top: 0 !important;
309-
/*word-wrap: break-word !important;*/
309+
310310
word-break: break-all !important;
311311
}
312312
@@ -316,7 +316,7 @@ div.progress-bar-container {
316316
317317
.table > :not(:first-child) {
318318
border-top: 0 !important;
319-
}
319+
}*/
320320

321321
.RRT__tab {
322322
background: transparent !important;
@@ -1093,6 +1093,20 @@ button.graphiql-tab-add>svg
10931093
color:white;
10941094
}
10951095

1096+
1097+
.graphiql-query-editor{
1098+
width: 100%;
1099+
height: 100%;
1100+
}
1101+
.graphiql-editor{
1102+
width: 100%;
1103+
height: 100%;
1104+
}
1105+
.graphiql-query-editor-wrapper{
1106+
width: 100%;
1107+
height: 100%;
1108+
}
1109+
10961110
.mainGraphIql{
10971111
height : calc(100vh - 80px);
10981112
}
@@ -1106,21 +1120,22 @@ button.graphiql-tab-add>svg
11061120
}
11071121

11081122
.graphiql-container{
1109-
background-color: transparent;
1123+
background-color: transparent !important;
11101124
}
11111125

11121126
.graphiql-un-styled, .graphiql-toolbar-button{
11131127
color:white !important;
11141128
}
11151129

11161130
.graphiql-container .graphiql-editors {
1117-
background-color: transparent;
1131+
background-color: transparent !important;
11181132
}
11191133

11201134
.graphiql-editor >.CodeMirror{
11211135
height: 100%;
11221136
position: absolute;
11231137
width: 100%;
1138+
background-color: transparent !important;
11241139
}
11251140

11261141
.result-window >.CodeMirror{
@@ -1241,6 +1256,7 @@ button.graphiql-tab-add>svg
12411256
}
12421257

12431258

1259+
12441260
.table__columns__component > .form-check-label{
12451261
margin-left: 10px;
12461262
}
@@ -1427,15 +1443,10 @@ button.graphiql-tab-add>svg
14271443
}
14281444
}
14291445

1430-
.graphiql-query-editor{
1431-
width: 100%;
1432-
height: 100%;
1433-
}
1434-
.graphiql-editor{
1435-
width: 100%;
1436-
height: 100%;
1437-
}
1438-
.graphiql-query-editor-wrapper{
1439-
width: 100%;
1440-
height: 100%;
1446+
/** */
1447+
.openai_checkbox .form-check-input {
1448+
width: "1.5rem";
1449+
height: "1.5rem"
14411450
}
1451+
1452+

packages/tdb-dashboard/src/App.js

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,8 @@ export function App (props){
7373
</Routes>
7474
</div>
7575
}
76-
77-
function getRoutes(clientUser, isAdmin, woqlClient){
78-
//const client = createApolloClient()
79-
80-
if(localSettings.connection_type==="LOCAL"){
81-
return <React.Fragment>
76+
/*
77+
<React.Fragment>
8278
<Route index element={<Home/>} />
8379
{ clientUser.user === "admin" && <Route path="administrator" element={<UserManagement/>}/>}
8480
{ clientUser.user !== "admin" && <Route path="administrator" element={<div><PageNotFound/></div >}/>}
@@ -91,6 +87,52 @@ function getRoutes(clientUser, isAdmin, woqlClient){
9187
</Route>
9288
</Route>
9389
<Route path="*" element={<div><PageNotFound/></div >} />
90+
</React.Fragment>*/
91+
92+
function getRoutes(clientUser, isAdmin, woqlClient){
93+
//const client = createApolloClient()
94+
95+
if(localSettings.connection_type==="LOCAL"){
96+
return <React.Fragment>
97+
<Route index element={<Home/>} />
98+
{ clientUser.user === "admin" && <Route path="administrator" element={<UserManagement/>}/>}
99+
{ clientUser.user !== "admin" && <Route path="administrator" element={<div><PageNotFound/></div >}/>}
100+
<Route path=":organization" >
101+
<Route index element={<OrganizationHome/>}/>
102+
{/*<Route path = {PATH.PROFILE} element = {<PrivateRoute component={Profile}/>} /> */}
103+
{clientUser.user === "admin" && <Route path="administrator" element={<UserManagement/>}/>}
104+
{clientUser.user !== "admin" && <Route path="administrator" element={<div><PageNotFound/></div >}/>}
105+
106+
<Route path=":dataProduct" >
107+
<Route index element={<DataProductsHome/>}/>
108+
<Route path={PATH.GRAPHIQL} element={<GraphIqlEditor/>} />
109+
110+
<Route path={PATH.OPENAI_CONF} element={<GraphqlHandlerbarsPage/>} />
111+
<Route path={PATH.SEARCH} element={<FreeTextSearch/>} />
112+
<Route path={PATH.ACTIONS} element={<IndexingActionMonitor/>} />
113+
114+
115+
<Route path={PATH.CHANGE_REQUESTS} >
116+
<Route index element={<ChangeRequestsPage/>} />
117+
<Route path=":changeid" element={<ChangeDiff/>} />
118+
</Route>
119+
<Route path={PATH.DOCUMENT_EXPLORER} element={<DocumentTemplate/>}>
120+
<Route index element={<Documents/>} />
121+
<Route path=":type">
122+
{<Route index element={<DocumentsPageList/>} /> }
123+
<Route path={PATH.NEW_DOC} element={<DocumentNew/>}/>
124+
125+
<Route path=":docid" >
126+
<Route index element={<DocumentView/>} />
127+
<Route path={PATH.EDIT_DOC} element={<DocumentEdit/>} />
128+
</Route>
129+
</Route>
130+
</Route>
131+
<Route path={PATH.PRODUCT_EXPLORER} element={<ProductsExplorer/>} />
132+
<Route path={PATH.PRODUCT_MODELS} element={<ModelProductPage/>} />
133+
</Route>
134+
</Route>
135+
<Route path="*" element={<div><PageNotFound/></div >} />
94136
</React.Fragment>
95137
}
96138
return <React.Fragment>

packages/tdb-dashboard/src/Colors.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,8 @@ span.bg-primary.note__badge {
119119

120120
.bg-success {
121121
background-color: var(--color-pink) !important;
122+
}
123+
124+
thead>tr:first-child {
125+
display: none;
122126
}

packages/tdb-dashboard/src/assets/graphiql.min.css

Lines changed: 337 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.leaflet-control-fullscreen a {
2+
background:#fff url(fullscreen.png) no-repeat 0 0;
3+
background-size:26px 52px;
4+
}
5+
.leaflet-touch .leaflet-control-fullscreen a {
6+
background-position: 2px 2px;
7+
}
8+
.leaflet-fullscreen-on .leaflet-control-fullscreen a {
9+
background-position:0 -26px;
10+
}
11+
.leaflet-touch.leaflet-fullscreen-on .leaflet-control-fullscreen a {
12+
background-position: 2px -24px;
13+
}
14+
15+
/* Do not combine these two rules; IE will break. */
16+
.leaflet-container:-webkit-full-screen {
17+
width:100%!important;
18+
height:100%!important;
19+
}
20+
.leaflet-container.leaflet-fullscreen-on {
21+
width:100%!important;
22+
height:100%!important;
23+
}
24+
25+
.leaflet-pseudo-fullscreen {
26+
position:fixed!important;
27+
width:100%!important;
28+
height:100%!important;
29+
top:0!important;
30+
left:0!important;
31+
z-index:99999;
32+
}
33+
34+
@media
35+
(-webkit-min-device-pixel-ratio:2),
36+
(min-resolution:192dpi) {
37+
.leaflet-control-fullscreen a {
38+
background-image:url([email protected]);
39+
}
40+
}

packages/tdb-dashboard/src/assets/leaflet.fullscreenv1.0.1.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)