BlueCat Address Manager Direct Actions (Deploy)

Add direct buttons for Deploy Actions in BlueCat Address Manager

Versione datata 05/06/2018. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name        BlueCat Address Manager Direct Actions (Deploy)
// @namespace   *
// @description Add direct buttons for Deploy Actions in BlueCat Address Manager
// @include     */app*
// @license		MIT
// @version     3
// @grant       none
// @copyright   2018, Marius Galm
// @license		MIT
// @icon        https://www.bluecatnetworks.com/wp-content/uploads/2018/03/cropped-bluecat-favicon-300x300.png
// ==/UserScript==

if (document.readyState === "interactive" ) {
    var page = document.childNodes[2].nodeValue;
    if (/ Page: ConfigurationPage /.test(page)) {
        var subtab = document.getElementsByClassName("TabPanelLabelActive")[0];
        if (/Servers/.test(subtab.innerHTML.trim())) {
            var topBar = document.getElementsByClassName('value-table-topToolBar')[0];
            var tBody = topBar.getElementsByTagName('tbody')[2];
            var tR = tBody.getElementsByTagName('tr')[0];
            var w = tR.insertCell(-1);
            w.innerHTML='<div class="separator"></div>';
            var x = tR.insertCell(-1);
            x.innerHTML='<span id="deployButton" class="title"><a style="color:inherit; text-decoration: none;" href="javascript:remoteSubmitLink( document.getElementById( \'form\' ), \'SDeploy\' );"><img src="/images/icons/small/flash.gif" border="0">&nbsp;<b style="vertical-align: super;">Deploy</b></a></span>';
            var y = tR.insertCell(-1);
            y.innerHTML='<div class="separator"></div>';
            var z = tR.insertCell(-1);
            z.innerHTML='<span id="deployStatusButton" class="title"><a style="color:inherit; text-decoration: none;" href="/app?component=%24ValueObjectFormTable_14.%24ComboButtonBar.%24ComboButton.direct&page=ConfigurationPage&service=direct&session=T&sp=Spage%3DDeploymentStatus&sp=Spage%3DDeploymentStatus"><img src="/images/icons/small/flash_question.gif" border="0">&nbsp;<span class="title-center"><b style="vertical-align: super;">Deployment Status</b></a></span>';
        }
    }
	if (/ Page: ServerPage /.test(page)) {
        var subtab = document.getElementsByClassName("TabPanelLabelActive")[0];
        if (! /Details/.test(subtab.innerHTML.trim())) {
            var actions = document.getElementsByClassName('action-items')[0];
            var tBody = actions.getElementsByTagName('tbody')[0];
            var w = tBody.insertRow(-1);
            w.innerHTML='<tr id="For_Deploy"><td class="action-item"><div id="action-item" class="with-description-with-icon"><a href="javascript:remoteSubmitLink( document.getElementById( \'form\' ), \'SDeploy\' );"><div class="selection " onmouseover="onActionItemOver(this, event);" onmouseout="onActionItemOut(this, event);" onclick="onActionItemClick(this, event);"><table class="action-item-selection" cellspacing="0" cellpadding="0"><tbody><tr><td class="icon"><div class="active"><img src="/images/icons/small/flash.gif" border="0"></div></td><td class="action"><div class="active"><div class="action-title">Deploy</div><div class="action-description">Deploy this server</div></div></td></tr></tbody></table></div></a></div></td></tr>';
        }
    }
    if (/ Page: IP4NetworkPage /.test(page)) {
        var topBar = document.getElementsByClassName('value-table-topToolBar')[0];
        var tBody = topBar.getElementsByTagName('tbody')[2];
        var tR = tBody.getElementsByTagName('tr')[0];
        var w = tR.insertCell(-1);
        w.innerHTML='<div class="separator"></div>';
        var x = tR.insertCell(-1);
        x.innerHTML='<span id="deployButton" class="title"><a style="color:inherit; text-decoration: none;" href="javascript:remoteSubmitLink( document.getElementById( \'form\' ), \'SQuickDeploy\' );"><img src="/images/icons/small/flash.gif" border="0">&nbsp;<b style="vertical-align: super;">Quick Deploy</b></a></span>';
        var y = tR.insertCell(-1);
    }
    if (/ Page: ZoneDetails /.test(page)) {
        var topBar = document.getElementsByClassName('value-table-topToolBar')[0];
        var tBody = topBar.getElementsByTagName('tbody')[2];
        var tR = tBody.getElementsByTagName('tr')[0];
        var w = tR.insertCell(-1);
        w.innerHTML='<div class="separator"></div>';
        var x = tR.insertCell(-1);
        x.innerHTML='<span id="deployButton" class="title"><a style="color:inherit; text-decoration: none;" href="javascript:remoteSubmitLink( document.getElementById( \'form\' ), \'SQuickDeploy\' );"><img src="/images/icons/small/flash.gif" border="0">&nbsp;<b style="vertical-align: super;">Quick Deploy</b></a></span>';
        var y = tR.insertCell(-1);
    }
}