Skip to content

Commit 773bb0c

Browse files
authored
add GraphShardExists setting to capabilities handler (#16895)
1 parent 85e362e commit 773bb0c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ydb/core/viewer/viewer_capabilities.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,21 @@ class TViewerCapabilities : public TViewerPipeClient {
2323

2424
NJson::TJsonValue GetSettings() {
2525
NJson::TJsonValue json;
26+
2627
NJson::TJsonValue& security(json["Security"]);
2728
security["IsTokenRequired"] = AppData()->EnforceUserTokenRequirement;
2829
security["UseLoginProvider"] = AppData()->AuthConfig.GetUseLoginProvider();
2930
security["DomainLoginOnly"] = AppData()->AuthConfig.GetDomainLoginOnly();
31+
32+
if (DatabaseNavigateResponse && DatabaseNavigateResponse->IsOk()) {
33+
if (DatabaseNavigateResponse->Get()->Request && !DatabaseNavigateResponse->Get()->Request->ResultSet.empty()) {
34+
NJson::TJsonValue& database(json["Database"]);
35+
TSchemeCacheNavigate::TEntry& entry = DatabaseNavigateResponse->Get()->Request->ResultSet.front();
36+
if (entry.DomainInfo) {
37+
database["GraphShardExists"] = entry.DomainInfo->Params.GetGraphShard() != 0;
38+
}
39+
}
40+
}
3041
return json;
3142
}
3243

0 commit comments

Comments
 (0)