@@ -525,7 +525,7 @@ blobsProfiler.Menu.RCFunctions["Timers"] = {
525
525
}
526
526
}
527
527
}
528
- blobsProfiler .Menu .RCFunctions [" SQL_Schema " ] = {
528
+ blobsProfiler .Menu .RCFunctions [" SQLite.Schema " ] = { -- TODO: make submodules work with this
529
529
[" table" ] = {
530
530
{
531
531
name = " SQL Create statement" ,
@@ -549,9 +549,9 @@ blobsProfiler.Menu.RCFunctions["SQL_Schema"] = {
549
549
},
550
550
icon = " icon16/table_lightning.png" ,
551
551
condition = function (ref , node , realm )
552
- if not blobsProfiler [realm ].SQLite .SchemaTables then return false end
552
+ if not blobsProfiler [realm ].SQLite .Schema . Tables then return false end
553
553
554
- return blobsProfiler [realm ].SQLite .SchemaTables [ref .key ]
554
+ return blobsProfiler [realm ].SQLite .Schema . Tables [ref .key ]
555
555
end
556
556
}
557
557
--[[ {
@@ -599,6 +599,7 @@ for k,v in ipairs(blobsProfiler.Menu.GlobalTypesToCondense) do
599
599
blobsProfiler .Menu .TypeFolders .Client [v .type ] = true
600
600
blobsProfiler .Menu .TypeFolders .Server [v .type ] = true
601
601
end
602
+
602
603
local function nodeEntriesTableKeySort (a , b )
603
604
local aIsTable = type (a .value ) == ' table'
604
605
local bIsTable = type (b .value ) == ' table'
@@ -1130,26 +1131,6 @@ concommand.Add("blobsprofiler", function(ply, cmd, args, argStr)
1130
1131
local tabSettings = vgui .Create (" DPropertySheet" , tabMenu )
1131
1132
tabMenu :AddSheet (" Settings" , tabSettings , " icon16/cog.png" )
1132
1133
1133
- tabClient .OnActiveTabChanged = function (s , pnlOld , pnlNew )
1134
- blobsProfiler .Menu .MenuFrame :SetTitle (" blobsProfiler - " .. blobsProfiler .Menu .selectedRealm .. " - " .. pnlNew :GetText ())
1135
- if not blobsProfiler .Client [pnlNew :GetText ()] then
1136
- if blobsProfiler .Modules [pnlNew :GetText ()].UpdateRealmData then
1137
- blobsProfiler .Modules [pnlNew :GetText ()]:UpdateRealmData (" Client" )
1138
- end
1139
- end
1140
- end
1141
-
1142
- tabServer .OnActiveTabChanged = function (s , pnlOld , pnlNew )
1143
- blobsProfiler .Menu .MenuFrame :SetTitle (" blobsProfiler - " .. blobsProfiler .Menu .selectedRealm .. " - " .. pnlNew :GetText ())
1144
- if not blobsProfiler .Server [pnlNew :GetText ()] then
1145
- if blobsProfiler .Modules [pnlNew :GetText ()].UpdateRealmData then
1146
- blobsProfiler .Modules [pnlNew :GetText ()].retrievingData = true
1147
- blobsProfiler .Modules [pnlNew :GetText ()]:UpdateRealmData (" Server" )
1148
- end
1149
- end
1150
- end
1151
-
1152
-
1153
1134
local luaStates = {
1154
1135
Client = tabClient ,
1155
1136
Server = tabServer
@@ -1338,6 +1319,31 @@ concommand.Add("blobsprofiler", function(ply, cmd, args, argStr)
1338
1319
end
1339
1320
end
1340
1321
1322
+ tabClient .OnActiveTabChanged = function (s , pnlOld , pnlNew )
1323
+ blobsProfiler .Menu .MenuFrame :SetTitle (" blobsProfiler - " .. blobsProfiler .Menu .selectedRealm .. " - " .. pnlNew :GetText ())
1324
+ if not blobsProfiler .Client [pnlNew :GetText ()] then
1325
+ if blobsProfiler .Modules [pnlNew :GetText ()].UpdateRealmData then
1326
+ blobsProfiler .Modules [pnlNew :GetText ()]:UpdateRealmData (" Client" )
1327
+ end
1328
+ end
1329
+ end
1330
+
1331
+ tabServer .OnActiveTabChanged = function (s , pnlOld , pnlNew )
1332
+ blobsProfiler .Menu .MenuFrame :SetTitle (" blobsProfiler - " .. blobsProfiler .Menu .selectedRealm .. " - " .. pnlNew :GetText ())
1333
+ if not blobsProfiler .Server [pnlNew :GetText ()] then
1334
+ if blobsProfiler .Modules [pnlNew :GetText ()].UpdateRealmData then
1335
+ blobsProfiler .Modules [pnlNew :GetText ()].retrievingData = true
1336
+ blobsProfiler .Modules [pnlNew :GetText ()]:UpdateRealmData (" Server" )
1337
+ end
1338
+ end
1339
+
1340
+ if blobsProfiler .Modules [pnlNew :GetText ()] and firstSubModule [pnlNew :GetText ()] and firstSubModule [pnlNew :GetText ()].data .UpdateRealmData then
1341
+ if blobsProfiler .Server [pnlNew :GetText ()][firstSubModule [pnlNew :GetText ()].name ] then return end
1342
+ firstSubModule [pnlNew :GetText ()].data .retrievingData = true
1343
+ firstSubModule [pnlNew :GetText ()].data :UpdateRealmData (" Server" )
1344
+ end
1345
+ end
1346
+
1341
1347
tabMenu :OnActiveTabChanged (nil , tabMenu :GetActiveTab ()) -- lol
1342
1348
end )
1343
1349
0 commit comments