Merge pull request #10707 from birarda/feat/replication-to-broadcast

nomenclature changes from replication to broadcast
This commit is contained in:
Ryan Huffman 2017-06-15 14:27:31 -07:00 committed by GitHub
commit 36381aa584
4 changed files with 17 additions and 16 deletions

View file

@ -1320,15 +1320,15 @@
] ]
}, },
{ {
"name": "replication", "name": "broadcasting",
"label": "Replication", "label": "Broadcasting",
"settings": [ "settings": [
{ {
"name": "users", "name": "users",
"label": "Replicated Users", "label": "Broadcasted Users",
"type": "table", "type": "table",
"can_add_new_rows": true, "can_add_new_rows": true,
"help": "Users that are replicated to downstream servers", "help": "Users that are broadcasted to downstream servers",
"numbered": false, "numbered": false,
"columns": [ "columns": [
{ {
@ -1340,11 +1340,11 @@
}, },
{ {
"name": "downstream_servers", "name": "downstream_servers",
"label": "Downstream Servers", "label": "Receiving Servers",
"assignment-types": [0,1], "assignment-types": [0,1],
"type": "table", "type": "table",
"can_add_new_rows": true, "can_add_new_rows": true,
"help": "Downstream servers that are relayed data for replicated users", "help": "Servers that receive data for broadcasted users",
"numbered": false, "numbered": false,
"columns": [ "columns": [
{ {
@ -1364,7 +1364,7 @@
"placeholder": "Audio Mixer", "placeholder": "Audio Mixer",
"default": "Audio Mixer", "default": "Audio Mixer",
"can_set": true, "can_set": true,
"options": [ "options": [
{ {
"value": "Audio Mixer", "value": "Audio Mixer",
"label": "Audio Mixer" "label": "Audio Mixer"

View file

@ -2220,11 +2220,11 @@ void DomainServer::refreshStaticAssignmentAndAddToQueue(SharedAssignmentPointer&
} }
void DomainServer::updateReplicatedNodes() { void DomainServer::updateReplicatedNodes() {
static const QString REPLICATION_SETTINGS_KEY = "replication"; static const QString BROADCASTING_SETTINGS_KEY = "broadcasting";
_replicatedUsernames.clear(); _replicatedUsernames.clear();
auto settings = _settingsManager.getSettingsMap(); auto settings = _settingsManager.getSettingsMap();
if (settings.contains(REPLICATION_SETTINGS_KEY)) { if (settings.contains(BROADCASTING_SETTINGS_KEY)) {
auto replicationSettings = settings.value(REPLICATION_SETTINGS_KEY).toMap(); auto replicationSettings = settings.value(BROADCASTING_SETTINGS_KEY).toMap();
if (replicationSettings.contains("users")) { if (replicationSettings.contains("users")) {
auto usersSettings = replicationSettings.value("users").toList(); auto usersSettings = replicationSettings.value("users").toList();
for (auto& username : usersSettings) { for (auto& username : usersSettings) {

View file

@ -1197,7 +1197,7 @@ QJsonObject DomainServerSettingsManager::settingDescriptionFromGroup(const QJson
bool DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJsonObject& postedObject) { bool DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJsonObject& postedObject) {
static const QString SECURITY_ROOT_KEY = "security"; static const QString SECURITY_ROOT_KEY = "security";
static const QString AC_SUBNET_WHITELIST_KEY = "ac_subnet_whitelist"; static const QString AC_SUBNET_WHITELIST_KEY = "ac_subnet_whitelist";
static const QString REPLICATION_KEY = "replication"; static const QString BROADCASTING_KEY = "broadcasting";
auto& settingsVariant = _configMap.getConfig(); auto& settingsVariant = _configMap.getConfig();
bool needRestart = false; bool needRestart = false;
@ -1249,7 +1249,7 @@ bool DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJ
if (!matchingDescriptionObject.isEmpty()) { if (!matchingDescriptionObject.isEmpty()) {
updateSetting(rootKey, rootValue, *thisMap, matchingDescriptionObject); updateSetting(rootKey, rootValue, *thisMap, matchingDescriptionObject);
if (rootKey != SECURITY_ROOT_KEY && rootKey != REPLICATION_KEY) { if (rootKey != SECURITY_ROOT_KEY && rootKey != BROADCASTING_KEY) {
needRestart = true; needRestart = true;
} }
} else { } else {
@ -1265,7 +1265,8 @@ bool DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJ
if (!matchingDescriptionObject.isEmpty()) { if (!matchingDescriptionObject.isEmpty()) {
const QJsonValue& settingValue = rootValue.toObject()[settingKey]; const QJsonValue& settingValue = rootValue.toObject()[settingKey];
updateSetting(settingKey, settingValue, *thisMap, matchingDescriptionObject); updateSetting(settingKey, settingValue, *thisMap, matchingDescriptionObject);
if ((rootKey != SECURITY_ROOT_KEY && rootKey != REPLICATION_KEY) || settingKey == AC_SUBNET_WHITELIST_KEY) { if ((rootKey != SECURITY_ROOT_KEY && rootKey != BROADCASTING_KEY)
|| settingKey == AC_SUBNET_WHITELIST_KEY) {
needRestart = true; needRestart = true;
} }
} else { } else {

View file

@ -135,10 +135,10 @@ void ThreadedAssignment::domainSettingsRequestFailed() {
} }
void ThreadedAssignment::parseDownstreamServers(const QJsonObject& settingsObject, NodeType_t nodeType, DownstreamNodeFoundCallback callback) { void ThreadedAssignment::parseDownstreamServers(const QJsonObject& settingsObject, NodeType_t nodeType, DownstreamNodeFoundCallback callback) {
static const QString REPLICATION_GROUP_KEY = "replication"; static const QString BROADCASTING_GROUP_KEY = "broadcasting";
static const QString DOWNSTREAM_SERVERS_SETTING_KEY = "downstream_servers"; static const QString DOWNSTREAM_SERVERS_SETTING_KEY = "downstream_servers";
if (settingsObject.contains(REPLICATION_GROUP_KEY)) { if (settingsObject.contains(BROADCASTING_GROUP_KEY)) {
const QJsonObject replicationObject = settingsObject[REPLICATION_GROUP_KEY].toObject(); const QJsonObject replicationObject = settingsObject[BROADCASTING_GROUP_KEY].toObject();
const QJsonArray downstreamServers = replicationObject[DOWNSTREAM_SERVERS_SETTING_KEY].toArray(); const QJsonArray downstreamServers = replicationObject[DOWNSTREAM_SERVERS_SETTING_KEY].toArray();