-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix: Expose units for Zookeeper latency metrics in Overview and entity view - feature: Introducing the smart component enablement, which allows enabling / disabling a Kafka component to be visible from the Overview, to be managed via the configuration user interface - feature: Expose Zookeeper leader and Broker active controller in Overview dashboard when mono tenancy (environment) detected or selected - feature: Configuration checker, detect incomplete installation (Kafka inventory not updated) when loading Overview, and provide modal update user interaction - fix: Prevents multiple endpoint calls in Alerting User Interface management in Ajax
- Loading branch information
1 parent
890ef1b
commit 7ed4f48
Showing
18 changed files
with
1,767 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,76 @@ | ||
require(['splunkjs/mvc/simplexml/ready!'], function(){ | ||
require(['splunkjs/ready!', 'splunkjs/mvc'], function(mvc){ | ||
require(['splunkjs/mvc/simplexml/ready!'], function() { | ||
require(['splunkjs/ready!', 'splunkjs/mvc'], function(mvc) { | ||
|
||
/* | ||
-------------------------------------------------------------- | ||
Multi depends buttons - Written by François Toulouse, thanks ! | ||
-------------------------------------------------------------- | ||
/* | ||
-------------------------------------------------------------- | ||
Multi depends buttons - Written by François Toulouse, thanks ! | ||
-------------------------------------------------------------- | ||
Usage: Add an html bootstrap button | ||
Usage: Add an html bootstrap button | ||
<button class="btn" data-token-name="foo" data-token-value="1">Activate foo token</button> | ||
<button class="btn" data-token-name="bar" data-token-value="1">Activate bar token</button> | ||
<button class="btn" data-token-name="foo" data-token-value="1">Activate foo token</button> | ||
<button class="btn" data-token-name="bar" data-token-value="1">Activate bar token</button> | ||
*/ | ||
*/ | ||
|
||
var defaultTokenModel = mvc.Components.getInstance('default', {create: true}); | ||
var submittedTokenModel = mvc.Components.getInstance('submitted', {create: true}); | ||
var defaultTokenModel = mvc.Components.getInstance('default', { | ||
create: true | ||
}); | ||
var submittedTokenModel = mvc.Components.getInstance('submitted', { | ||
create: true | ||
}); | ||
|
||
function setToken(name, value) { | ||
defaultTokenModel.set(name, value); | ||
submittedTokenModel.set(name, value); | ||
} | ||
|
||
function getToken(name) { | ||
var ret = null; | ||
function getToken(name) { | ||
var ret = null; | ||
|
||
if(defaultTokenModel.get(name) != undefined){ | ||
ret = defaultTokenModel.get(name); | ||
} | ||
else if(submittedTokenModel.get(name) != undefined){ | ||
ret = submittedTokenModel.get(name); | ||
} | ||
if (defaultTokenModel.get(name) != undefined) { | ||
ret = defaultTokenModel.get(name); | ||
} else if (submittedTokenModel.get(name) != undefined) { | ||
ret = submittedTokenModel.get(name); | ||
} | ||
|
||
return ret; | ||
return ret; | ||
} | ||
|
||
function unsetToken(name) { | ||
defaultTokenModel.unset(name); | ||
submittedTokenModel.unset(name); | ||
} | ||
|
||
// For each button with the class "custom-sub-nav" | ||
$('.custom-sub-nav').each(function(){ | ||
var $btn_group = $(this); | ||
|
||
/* for each button in this nav: | ||
- Cliking on the button: create the token "data-token-name" with attribute value "data-token-value" | ||
- Button has been clicked already and the user click on it again: removes the token "data-token-name" | ||
*/ | ||
$btn_group.find('button').on('click', function(){ | ||
var $btn = $(this); | ||
var btn_current_label = $btn.html(); | ||
var btn_alt_label = $btn.attr('data-alt-label'); | ||
var tk_name = $btn.attr('data-token-name'); | ||
var tk_value = $btn.attr('data-token-value'); | ||
|
||
if( getToken(tk_name) == null){ | ||
setToken(tk_name, tk_value); | ||
$btn.addClass('active'); | ||
} | ||
else{ | ||
unsetToken(tk_name); | ||
$btn.removeClass('active'); | ||
} | ||
|
||
// Manage button label | ||
$btn.html(btn_alt_label); | ||
$btn.attr('data-alt-label', btn_current_label); | ||
|
||
}); | ||
}); | ||
// For each button with the class "custom-sub-nav" | ||
$('.custom-sub-nav').each(function() { | ||
var $btn_group = $(this); | ||
|
||
/* for each button in this nav: | ||
- Cliking on the button: create the token "data-token-name" with attribute value "data-token-value" | ||
- Button has been clicked already and the user click on it again: removes the token "data-token-name" | ||
*/ | ||
$btn_group.find('button').on('click', function() { | ||
var $btn = $(this); | ||
var btn_current_label = $btn.html(); | ||
var btn_alt_label = $btn.attr('data-alt-label'); | ||
var tk_name = $btn.attr('data-token-name'); | ||
var tk_value = $btn.attr('data-token-value'); | ||
|
||
if (getToken(tk_name) == null) { | ||
setToken(tk_name, tk_value); | ||
$btn.addClass('active'); | ||
} else { | ||
unsetToken(tk_name); | ||
$btn.removeClass('active'); | ||
} | ||
|
||
// Manage button label | ||
$btn.html(btn_alt_label); | ||
$btn.attr('data-alt-label', btn_current_label); | ||
|
||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.