Skip to content

Commit

Permalink
For ticket #666, dynamic RF name based on strategy
Browse files Browse the repository at this point in the history
When altering/creating a keyspace, the `Replication Factor` name would be changed to be `Data Center Replication Factor` in case the set strategy is `NetworkTopology`
  • Loading branch information
mhmdkrmabd committed Feb 18, 2025
1 parent 2b515df commit 9a6732a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions renderer/js/events/clusters.js
Original file line number Diff line number Diff line change
Expand Up @@ -12005,6 +12005,10 @@
if (minifyText(replicationStrategy) == minifyText('simplestrategy'))
throw 0

$('span.dynamic-rf').attr('mulang', 'data center replication factor')

Modules.Localization.applyLanguageSpecific($('span.dynamic-rf'))

$(this).removeClass('is-invalid')

$('input#keyspaceReplicationFactorSimpleStrategy').val(1).trigger('input')
Expand Down Expand Up @@ -12084,6 +12088,10 @@
return
} catch (e) {}

$('span.dynamic-rf').attr('mulang', 'replication factor')

Modules.Localization.applyLanguageSpecific($('span.dynamic-rf'))

setTimeout(() => $(this).addClass('is-invalid'), 250)

try {
Expand Down
4 changes: 2 additions & 2 deletions renderer/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ <h5 class="modal-title">
<div class="form-outline form-white margin-bottom replication-factor">
<input type="number" class="form-control form-control-lg" min="1" value="1" id="keyspaceReplicationFactorSimpleStrategy">
<label class="form-label">
<span mulang="replication factor" capitalize></span>
<span class="dynamic-rf" mulang="replication factor" capitalize></span>
</label>
<div class="valid-feedback"></div>
<div class="invalid-feedback"><span mulang="replication factor must be a positive number greater than 0" capitalize-first></span>.</div>
Expand All @@ -1824,7 +1824,7 @@ <h5 class="modal-title">
<div class="row">
<div class="col-md-12">
<span class="badge badge-secondary" style="opacity: 0.85;">
<span mulang="replication factor" capitalize></span>
<span class="dynamic-rf" mulang="replication factor" capitalize></span>
</span>
</div>
</div>
Expand Down

0 comments on commit 9a6732a

Please sign in to comment.