Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

GTID visual indications #493

Merged
merged 2 commits into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions resources/public/css/orchestrator.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ body {
color: #606060;
}

.instance h3 .pull-right > .glyphicon.text-muted {
color: #999999;
}


.instance h3 .glyphicon {
position: inherit;
cursor: default;
Expand Down
33 changes: 20 additions & 13 deletions resources/public/js/orchestrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,19 @@ function openNodeModal(node) {
$('#node_modal button[data-btn=take-siblings]').appendTo(td.find("div"))
}

var td = addNodeModalDataAttribute("GTID based replication", booleanString(node.usingGTID));
$('#node_modal button[data-btn=enable-gtid]').appendTo(td.find("div"))
$('#node_modal button[data-btn=disable-gtid]').appendTo(td.find("div"))
if (node.GTIDMode) {
addNodeModalDataAttribute("GTID mode", node.GTIDMode);
}
if (node.usingGTID) {
addNodeModalDataAttribute("Executed GTID set", node.ExecutedGtidSet);
addNodeModalDataAttribute("GTID purged", node.GtidPurged);
addNodeModalDataAttribute("GTID supported", booleanString(node.supportsGTID));
if (node.supportsGTID) {
var td = addNodeModalDataAttribute("GTID based replication", booleanString(node.usingGTID));
$('#node_modal button[data-btn=enable-gtid]').appendTo(td.find("div"))
$('#node_modal button[data-btn=disable-gtid]').appendTo(td.find("div"))
if (node.GTIDMode) {
addNodeModalDataAttribute("GTID mode", node.GTIDMode);
}
if (node.UsingOracleGTID) {
addNodeModalDataAttribute("Executed GTID set", node.ExecutedGtidSet);
addNodeModalDataAttribute("GTID purged", node.GtidPurged);
}
}

addNodeModalDataAttribute("Semi-sync enforced", booleanString(node.SemiSyncEnforced));

addNodeModalDataAttribute("Uptime", node.Uptime);
Expand Down Expand Up @@ -592,7 +594,8 @@ function normalizeInstance(instance) {
instance.replicationAttemptingToRun = instance.Slave_SQL_Running || instance.Slave_IO_Running;
instance.replicationLagReasonable = Math.abs(instance.SlaveLagSeconds.Int64 - instance.SQLDelay) <= 10;
instance.isSeenRecently = instance.SecondsSinceLastSeen.Valid && instance.SecondsSinceLastSeen.Int64 <= 3600;
instance.usingGTID = instance.UsingOracleGTID || instance.SupportsOracleGTID || instance.UsingMariaDBGTID;
instance.supportsGTID = instance.SupportsOracleGTID || instance.UsingMariaDBGTID;
instance.usingGTID = instance.UsingOracleGTID || instance.UsingMariaDBGTID;
instance.isMaxScale = (instance.Version.indexOf("maxscale") >= 0);

// used by cluster-tree
Expand Down Expand Up @@ -812,8 +815,12 @@ function renderInstanceElement(popoverElement, instance, renderType) {
popoverElement.addClass("first-child-in-display");
popoverElement.attr("data-first-child-in-display", "true");
}
if (instance.usingGTID) {
popoverElement.find("h3 div.pull-right").prepend('<span class="glyphicon glyphicon-globe" title="Using GTID"></span> ');
if (instance.supportsGTID) {
if (instance.hasMaster && !instance.usingGTID) {
popoverElement.find("h3 div.pull-right").prepend('<span class="glyphicon text-muted glyphicon-globe" title="Support GTID but not using it in replication"></span> ');
} else {
popoverElement.find("h3 div.pull-right").prepend('<span class="glyphicon glyphicon-globe" title="Using GTID"></span> ');
}
}
if (instance.UsingPseudoGTID) {
popoverElement.find("h3 div.pull-right").prepend('<span class="glyphicon glyphicon-globe" title="Using Pseudo GTID"></span> ');
Expand Down