mirror of https://github.com/apache/nifi.git
NIFI-27:
- Upgrading jQuery and jQuery UI. - Replacing all instances of Deferred.then with Deferred.done/fail due to API change introduced in 1.8. - Restoring line returns between public methods. - Upgrading jquery.form and jquery.minicolors.
This commit is contained in:
parent
fc78752e61
commit
2965258e5d
|
@ -25,9 +25,8 @@
|
|||
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/codemirror/lib/codemirror-compressed.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.count.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
|
||||
|
|
|
@ -29,9 +29,8 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.form.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
|
||||
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
|
||||
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
|
||||
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -112,14 +112,14 @@ nf.BulletinBoard = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var bulletinBoardTitle = aboutDetails.title + ' Bulletin Board';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = bulletinBoardTitle;
|
||||
$('#bulletin-board-header-text').text(bulletinBoardTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// get the banners if we're not in the shell
|
||||
var loadBanners = $.Deferred(function (deferred) {
|
||||
|
@ -128,7 +128,7 @@ nf.BulletinBoard = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -160,7 +160,7 @@ nf.BulletinBoard = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -170,9 +170,9 @@ nf.BulletinBoard = (function () {
|
|||
});
|
||||
|
||||
return $.Deferred(function (deferred) {
|
||||
$.when(getTitle, loadBanners).then(function () {
|
||||
$.when(getTitle, loadBanners).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}).promise();
|
||||
|
@ -294,7 +294,7 @@ nf.BulletinBoard = (function () {
|
|||
url: config.urls.bulletinBoard,
|
||||
data: data,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the bulletin board was specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.bulletinBoard)) {
|
||||
var bulletinBoard = response.bulletinBoard;
|
||||
|
@ -369,7 +369,7 @@ nf.BulletinBoard = (function () {
|
|||
bulletinContainer.prepend('<div class="bulletin-action">…</div>');
|
||||
}
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// likely caused by a invalid regex
|
||||
if (xhr.status === 404) {
|
||||
$('#bulletin-error-message').text(xhr.responseText).show();
|
||||
|
|
|
@ -40,10 +40,10 @@ nf.Actions = (function () {
|
|||
url: uri,
|
||||
data: data,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
@ -86,12 +86,14 @@ nf.Actions = (function () {
|
|||
nf.CanvasUtils.enterGroup(selectionData.component.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Exits the current process group but entering the parent group.
|
||||
*/
|
||||
leaveGroup: function () {
|
||||
nf.CanvasUtils.enterGroup(nf.Canvas.getParentGroupId());
|
||||
},
|
||||
|
||||
/**
|
||||
* Refresh the flow of the remote process group in the specified selection.
|
||||
*
|
||||
|
@ -153,6 +155,7 @@ nf.Actions = (function () {
|
|||
poll(1);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens the remote process group in the specified selection.
|
||||
*
|
||||
|
@ -172,6 +175,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows and selects the source of the connection in the specified selection.
|
||||
*
|
||||
|
@ -190,6 +194,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows and selects the destination of the connection in the specified selection.
|
||||
*
|
||||
|
@ -208,6 +213,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the downstream components from the specified selection.
|
||||
*
|
||||
|
@ -230,6 +236,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the upstream components from the specified selection.
|
||||
*
|
||||
|
@ -252,6 +259,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows and selects the component in the specified selection.
|
||||
*
|
||||
|
@ -268,6 +276,7 @@ nf.Actions = (function () {
|
|||
nf.Actions.center(selection);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Selects all components in the specified selection.
|
||||
*
|
||||
|
@ -276,12 +285,14 @@ nf.Actions = (function () {
|
|||
select: function (selection) {
|
||||
selection.classed('selected', true);
|
||||
},
|
||||
|
||||
/**
|
||||
* Selects all components.
|
||||
*/
|
||||
selectAll: function () {
|
||||
nf.Actions.select(d3.selectAll('g.component, g.connection'));
|
||||
},
|
||||
|
||||
/**
|
||||
* Centers the component in the specified selection.
|
||||
*
|
||||
|
@ -331,6 +342,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Enables all eligible selected components.
|
||||
*/
|
||||
|
@ -360,6 +372,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables all eligible selected components.
|
||||
*/
|
||||
|
@ -389,6 +402,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Starts the components in the specified selection.
|
||||
*
|
||||
|
@ -443,6 +457,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Stops the components in the specified selection.
|
||||
*
|
||||
|
@ -496,6 +511,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Enables transmission for the components in the specified selection.
|
||||
*
|
||||
|
@ -513,6 +529,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables transmission for the components in the specified selection.
|
||||
*
|
||||
|
@ -530,6 +547,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the configuration dialog for the specified selection.
|
||||
*
|
||||
|
@ -557,6 +575,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Defines an action for showing component details (like configuration but read only).
|
||||
showDetails: function (selection) {
|
||||
if (selection.size() === 1) {
|
||||
|
@ -579,6 +598,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the usage documentation for the component in the specified selection.
|
||||
*
|
||||
|
@ -592,6 +612,7 @@ nf.Actions = (function () {
|
|||
}));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the stats for the specified selection.
|
||||
*
|
||||
|
@ -623,6 +644,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens the remote ports dialog for the remote process group in the specified selection.
|
||||
*
|
||||
|
@ -633,6 +655,7 @@ nf.Actions = (function () {
|
|||
nf.RemoteProcessGroupPorts.showPorts(selection);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Hides and open cancellable dialogs.
|
||||
*/
|
||||
|
@ -646,12 +669,14 @@ nf.Actions = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the status for the entire canvas (components and flow.)
|
||||
*/
|
||||
reloadStatus: function () {
|
||||
nf.Canvas.reloadStatus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes the component in the specified selection.
|
||||
*
|
||||
|
@ -675,7 +700,7 @@ nf.Actions = (function () {
|
|||
clientId: revision.clientId
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -723,15 +748,15 @@ nf.Actions = (function () {
|
|||
// refresh the birdseye/toolbar
|
||||
nf.Birdseye.refresh();
|
||||
nf.CanvasToolbar.refresh();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
} else {
|
||||
// create a snippet for the specified component and link to the data flow
|
||||
var snippetDetails = nf.Snippet.marshal(selection, true);
|
||||
nf.Snippet.create(snippetDetails).then(function (response) {
|
||||
nf.Snippet.create(snippetDetails).done(function (response) {
|
||||
var snippet = response.snippet;
|
||||
|
||||
// remove the snippet, effectively removing the components
|
||||
nf.Snippet.remove(snippet.id).then(function () {
|
||||
nf.Snippet.remove(snippet.id).done(function () {
|
||||
var components = d3.map();
|
||||
|
||||
// add the id to the type's array
|
||||
|
@ -797,7 +822,7 @@ nf.Actions = (function () {
|
|||
// refresh the birdseye/toolbar
|
||||
nf.Birdseye.refresh();
|
||||
nf.CanvasToolbar.refresh();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// unable to acutally remove the components so attempt to
|
||||
// unlink and remove just the snippet - if unlinking fails
|
||||
// just ignore
|
||||
|
@ -807,10 +832,11 @@ nf.Actions = (function () {
|
|||
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens the fill color dialog for the component in the specified selection.
|
||||
*
|
||||
|
@ -842,6 +868,7 @@ nf.Actions = (function () {
|
|||
$('#fill-color-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Groups the currently selected components into a new group.
|
||||
*/
|
||||
|
@ -865,6 +892,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new template based off the currently selected components. If no components
|
||||
* are selected, a template of the entire canvas is made.
|
||||
|
@ -914,7 +942,7 @@ nf.Actions = (function () {
|
|||
var snippetDetails = nf.Snippet.marshal(selection, false);
|
||||
|
||||
// create the snippet
|
||||
nf.Snippet.create(snippetDetails).then(function (response) {
|
||||
nf.Snippet.create(snippetDetails).done(function (response) {
|
||||
var snippet = response.snippet;
|
||||
|
||||
// create the template
|
||||
|
@ -927,21 +955,21 @@ nf.Actions = (function () {
|
|||
snippetId: snippet.id
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
// show the confirmation dialog
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: "Template '" + nf.Common.escapeHtml(templateName) + "' was successfully created.",
|
||||
overlayBackground: false
|
||||
});
|
||||
}, nf.Common.handleAjaxError).always(function () {
|
||||
}).always(function () {
|
||||
// remove the snippet
|
||||
nf.Snippet.remove(snippet.id);
|
||||
|
||||
// clear the template dialog fields
|
||||
$('#new-template-name').val('');
|
||||
$('#new-template-description').val('');
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -956,6 +984,7 @@ nf.Actions = (function () {
|
|||
// auto focus on the template name
|
||||
$('#new-template-name').focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Copies the component in the specified selection.
|
||||
*
|
||||
|
@ -975,6 +1004,7 @@ nf.Actions = (function () {
|
|||
origin: origin
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Pastes the currently copied selection.
|
||||
*
|
||||
|
@ -1009,7 +1039,7 @@ nf.Actions = (function () {
|
|||
};
|
||||
|
||||
// create a snippet from the details
|
||||
nf.Snippet.create(data['snippet']).then(function (createResponse) {
|
||||
nf.Snippet.create(data['snippet']).done(function (createResponse) {
|
||||
var snippet = createResponse.snippet;
|
||||
|
||||
// determine the origin of the bounding box of the copy
|
||||
|
@ -1024,7 +1054,7 @@ nf.Actions = (function () {
|
|||
}
|
||||
|
||||
// copy the snippet to the new location
|
||||
nf.Snippet.copy(snippet.id, nf.Canvas.getGroupId(), origin).then(function (copyResponse) {
|
||||
nf.Snippet.copy(snippet.id, nf.Canvas.getGroupId(), origin).done(function (copyResponse) {
|
||||
var snippetContents = copyResponse.contents;
|
||||
|
||||
// update the graph accordingly
|
||||
|
@ -1039,7 +1069,7 @@ nf.Actions = (function () {
|
|||
|
||||
// remove the original snippet
|
||||
nf.Snippet.remove(snippet.id).fail(reject);
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
// an error occured while performing the copy operation, reload the
|
||||
// graph in case it was a partial success
|
||||
nf.Canvas.reload().done(function () {
|
||||
|
@ -1054,7 +1084,7 @@ nf.Actions = (function () {
|
|||
// reject the deferred
|
||||
reject();
|
||||
});
|
||||
}, reject);
|
||||
}).fail(reject);
|
||||
}).promise();
|
||||
|
||||
// show the appropriate message is the copy fails
|
||||
|
@ -1067,6 +1097,7 @@ nf.Actions = (function () {
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Moves the connection in the specified selection to the front.
|
||||
*
|
||||
|
|
|
@ -335,6 +335,7 @@ nf.Birdseye = (function () {
|
|||
})
|
||||
.call(brush);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles rendering of the birdseye tool.
|
||||
*/
|
||||
|
|
|
@ -103,7 +103,7 @@ nf.CanvasHeader = (function () {
|
|||
|
||||
// setup the refresh link actions
|
||||
$('#refresh-required-link').click(function () {
|
||||
nf.Canvas.reload().then(function () {
|
||||
nf.Canvas.reload().done(function () {
|
||||
// update component visibility
|
||||
nf.Canvas.View.updateVisibility();
|
||||
|
||||
|
@ -113,7 +113,7 @@ nf.CanvasHeader = (function () {
|
|||
// hide the refresh link
|
||||
$('#stats-last-refreshed').removeClass('alert');
|
||||
$('#refresh-required-container').hide();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: 'Unable to refresh the current group.',
|
||||
overlayBackground: true
|
||||
|
@ -126,12 +126,12 @@ nf.CanvasHeader = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
// set the document title and the about title
|
||||
document.title = aboutDetails.title;
|
||||
$('#nf-version').text(aboutDetails.version);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// configure the about dialog
|
||||
$('#nf-about').modal({
|
||||
|
@ -192,7 +192,7 @@ nf.CanvasHeader = (function () {
|
|||
'style[background-color]': color
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -202,7 +202,7 @@ nf.CanvasHeader = (function () {
|
|||
} else {
|
||||
nf.Label.set(response.label);
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
|
|
@ -95,6 +95,7 @@ nf.CanvasToolbar = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the selection changes to update the toolbar appropriately.
|
||||
*/
|
||||
|
|
|
@ -394,7 +394,7 @@ nf.CanvasToolbox = (function () {
|
|||
y: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.processor)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -410,7 +410,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -481,7 +481,7 @@ nf.CanvasToolbox = (function () {
|
|||
y: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.inputPort)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -497,7 +497,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -568,7 +568,7 @@ nf.CanvasToolbox = (function () {
|
|||
y: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.outputPort)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -584,7 +584,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -608,7 +608,7 @@ nf.CanvasToolbox = (function () {
|
|||
y: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.processGroup)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -624,7 +624,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -692,7 +692,7 @@ nf.CanvasToolbox = (function () {
|
|||
y: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.remoteProcessGroup)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -708,7 +708,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -730,7 +730,7 @@ nf.CanvasToolbox = (function () {
|
|||
y: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.funnel)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -743,7 +743,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -756,7 +756,7 @@ nf.CanvasToolbox = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.templates,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var templates = response.templates;
|
||||
if (nf.Common.isDefinedAndNotNull(templates) && templates.length > 0) {
|
||||
var options = [];
|
||||
|
@ -809,7 +809,7 @@ nf.CanvasToolbox = (function () {
|
|||
});
|
||||
}
|
||||
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -833,7 +833,7 @@ nf.CanvasToolbox = (function () {
|
|||
originY: pt.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -845,7 +845,7 @@ nf.CanvasToolbox = (function () {
|
|||
|
||||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -869,7 +869,7 @@ nf.CanvasToolbox = (function () {
|
|||
height: nf.Label.config.height
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.label)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -880,7 +880,7 @@ nf.CanvasToolbox = (function () {
|
|||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -987,7 +987,7 @@ nf.CanvasToolbox = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.processorTypes,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var tagCloud = {};
|
||||
var tags = [];
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ nf.CanvasToolbox = (function () {
|
|||
processorTypesGrid.render();
|
||||
});
|
||||
processorTypesData.syncGridSelection(processorTypesGrid, false);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// define the function for filtering the list
|
||||
$('#processor-type-filter').keyup(function () {
|
||||
|
@ -1146,6 +1146,7 @@ nf.CanvasToolbox = (function () {
|
|||
$('<div/>').attr('title', nf.Common.config.type.label).addClass('label-icon-disable').addClass('toolbox-icon').appendTo(toolbox);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Prompts the user to enter the name for the group.
|
||||
*
|
||||
|
@ -1162,9 +1163,9 @@ nf.CanvasToolbox = (function () {
|
|||
$('#new-process-group-name').val('');
|
||||
|
||||
// create the group and resolve the deferred accordingly
|
||||
$.when(createGroup(groupName, pt)).then(function (response) {
|
||||
createGroup(groupName, pt).done(function (response) {
|
||||
deferred.resolve(response.processGroup);
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -91,6 +91,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Calculates the point on the specified bounding box that is closest to the
|
||||
* specified point.
|
||||
|
@ -151,6 +152,7 @@ nf.CanvasUtils = (function () {
|
|||
};
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the specified component in the specified group.
|
||||
*
|
||||
|
@ -165,9 +167,9 @@ nf.CanvasUtils = (function () {
|
|||
// load a different group if necessary
|
||||
if (groupId !== nf.Canvas.getGroupId()) {
|
||||
nf.Canvas.setGroupId(groupId);
|
||||
nf.Canvas.reload().then(function () {
|
||||
nf.Canvas.reload().done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: 'Unable to load the group for the specified component.',
|
||||
overlayBackground: false
|
||||
|
@ -194,6 +196,7 @@ nf.CanvasUtils = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the currently selected components and connections.
|
||||
*
|
||||
|
@ -221,6 +224,7 @@ nf.CanvasUtils = (function () {
|
|||
// calculate the difference between the center point and the position of this component and convert to screen space
|
||||
nf.Canvas.View.translate([(center[0] - boundingBox.x) * scale, (center[1] - boundingBox.y) * scale]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Position the component accordingly.
|
||||
*
|
||||
|
@ -236,6 +240,7 @@ nf.CanvasUtils = (function () {
|
|||
return 'translate(' + d.component.position.x + ', ' + d.component.position.y + ')';
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Applies single line ellipsis to the component in the specified selection if necessary.
|
||||
*
|
||||
|
@ -271,6 +276,7 @@ nf.CanvasUtils = (function () {
|
|||
selection.text(text.substring(0, i) + String.fromCharCode(8230));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Applies multiline ellipsis to the component in the specified seleciton. Text will
|
||||
* wrap for the specified number of lines. The last line will be ellipsis if necessary.
|
||||
|
@ -343,6 +349,7 @@ nf.CanvasUtils = (function () {
|
|||
word = words.pop();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the active thread count on the specified selection.
|
||||
*
|
||||
|
@ -388,6 +395,7 @@ nf.CanvasUtils = (function () {
|
|||
selection.selectAll('text.active-thread-count, rect.active-thread-count-background').style('display', 'none');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables the default browser behavior of following image href when control clicking.
|
||||
*
|
||||
|
@ -400,6 +408,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles component bulletins.
|
||||
*
|
||||
|
@ -456,6 +465,7 @@ nf.CanvasUtils = (function () {
|
|||
selection.selectAll('image.bulletin-icon').style('display', 'none');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds the specified tooltip to the specified target.
|
||||
*
|
||||
|
@ -473,6 +483,7 @@ nf.CanvasUtils = (function () {
|
|||
tip.style('display', 'none');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is a connection.
|
||||
*
|
||||
|
@ -481,6 +492,7 @@ nf.CanvasUtils = (function () {
|
|||
isConnection: function (selection) {
|
||||
return selection.classed('connection');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is a remote process group.
|
||||
*
|
||||
|
@ -489,6 +501,7 @@ nf.CanvasUtils = (function () {
|
|||
isRemoteProcessGroup: function (selection) {
|
||||
return selection.classed('remote-process-group');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is a processor.
|
||||
*
|
||||
|
@ -497,6 +510,7 @@ nf.CanvasUtils = (function () {
|
|||
isProcessor: function (selection) {
|
||||
return selection.classed('processor');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is a label.
|
||||
*
|
||||
|
@ -505,6 +519,7 @@ nf.CanvasUtils = (function () {
|
|||
isLabel: function (selection) {
|
||||
return selection.classed('label');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is an input port.
|
||||
*
|
||||
|
@ -513,6 +528,7 @@ nf.CanvasUtils = (function () {
|
|||
isInputPort: function (selection) {
|
||||
return selection.classed('input-port');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is an output port.
|
||||
*
|
||||
|
@ -521,6 +537,7 @@ nf.CanvasUtils = (function () {
|
|||
isOutputPort: function (selection) {
|
||||
return selection.classed('output-port');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is a process group.
|
||||
*
|
||||
|
@ -529,6 +546,7 @@ nf.CanvasUtils = (function () {
|
|||
isProcessGroup: function (selection) {
|
||||
return selection.classed('process-group');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is a funnel.
|
||||
*
|
||||
|
@ -537,6 +555,7 @@ nf.CanvasUtils = (function () {
|
|||
isFunnel: function (selection) {
|
||||
return selection.classed('funnel');
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the components in the specified selection are runnable.
|
||||
*
|
||||
|
@ -558,6 +577,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return runnable;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the component in the specified selection is runnable.
|
||||
*
|
||||
|
@ -578,6 +598,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return runnable;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the components in the specified selection are stoppable.
|
||||
*
|
||||
|
@ -599,6 +620,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return stoppable;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the component in the specified selection is runnable.
|
||||
*
|
||||
|
@ -617,6 +639,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return stoppable;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection can all start transmitting.
|
||||
*
|
||||
|
@ -637,6 +660,7 @@ nf.CanvasUtils = (function () {
|
|||
});
|
||||
return canStartTransmitting;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection supports starting transmission.
|
||||
*
|
||||
|
@ -645,6 +669,7 @@ nf.CanvasUtils = (function () {
|
|||
canStartTransmitting: function (selection) {
|
||||
return nf.CanvasUtils.isRemoteProcessGroup(selection);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection can all stop transmitting.
|
||||
*
|
||||
|
@ -665,6 +690,7 @@ nf.CanvasUtils = (function () {
|
|||
});
|
||||
return canStopTransmitting;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection can stop transmission.
|
||||
*
|
||||
|
@ -673,6 +699,7 @@ nf.CanvasUtils = (function () {
|
|||
canStopTransmitting: function (selection) {
|
||||
return nf.CanvasUtils.isRemoteProcessGroup(selection);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether the components in the specified selection are deletable.
|
||||
*
|
||||
|
@ -686,6 +713,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return nf.CanvasUtils.supportsModification(selection);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether the specified selection is in a state to support modification.
|
||||
*
|
||||
|
@ -741,6 +769,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
return supportsModification;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines the connectable type for the specified source selection.
|
||||
*
|
||||
|
@ -761,6 +790,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
return type;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines the connectable type for the specified destination selection.
|
||||
*
|
||||
|
@ -781,6 +811,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
return type;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the graph is currently in a state to copy.
|
||||
*
|
||||
|
@ -813,12 +844,14 @@ nf.CanvasUtils = (function () {
|
|||
// ensure everything selected is copyable
|
||||
return selection.size() === copyable.size();
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if something is currently pastable.
|
||||
*/
|
||||
isPastable: function () {
|
||||
return nf.Clipboard.isCopied();
|
||||
},
|
||||
|
||||
/**
|
||||
* Persists the current user view.
|
||||
*/
|
||||
|
@ -836,6 +869,7 @@ nf.CanvasUtils = (function () {
|
|||
// store the item
|
||||
nf.Storage.setItem(name, item);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the name for this connection.
|
||||
*
|
||||
|
@ -849,6 +883,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
return '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the component id of the source of this processor. If the connection is attached
|
||||
* to a port in a [sub|remote] group, the component id will be that of the group. Otherwise
|
||||
|
@ -863,6 +898,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
return sourceId;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the component id of the source of this processor. If the connection is attached
|
||||
* to a port in a [sub|remote] group, the component id will be that of the group. Otherwise
|
||||
|
@ -877,6 +913,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
return destinationId;
|
||||
},
|
||||
|
||||
/**
|
||||
* Attempts to restore a persisted view. Returns a flag that indicates if the
|
||||
* view was restored.
|
||||
|
@ -911,6 +948,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return viewRestored;
|
||||
},
|
||||
|
||||
/**
|
||||
* Enters the specified group.
|
||||
*
|
||||
|
@ -944,6 +982,7 @@ nf.CanvasUtils = (function () {
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the origin of the bounding box for the specified selection.
|
||||
*
|
||||
|
@ -966,6 +1005,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return origin;
|
||||
},
|
||||
|
||||
/**
|
||||
* Moves the specified components into the specified group.
|
||||
*
|
||||
|
@ -979,11 +1019,11 @@ nf.CanvasUtils = (function () {
|
|||
nf.CanvasUtils.eligibleForMove(components, group).done(function () {
|
||||
// create a snippet for the specified components and link to the data flow
|
||||
var snippetDetails = nf.Snippet.marshal(components, true);
|
||||
nf.Snippet.create(snippetDetails).then(function (response) {
|
||||
nf.Snippet.create(snippetDetails).done(function (response) {
|
||||
var snippet = response.snippet;
|
||||
|
||||
// move the snippet into the target
|
||||
nf.Snippet.move(snippet.id, groupData.component.id).then(function () {
|
||||
nf.Snippet.move(snippet.id, groupData.component.id).done(function () {
|
||||
var componentMap = d3.map();
|
||||
|
||||
// add the id to the type's array
|
||||
|
@ -1006,16 +1046,17 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
// reload the target group
|
||||
nf.ProcessGroup.reload(groupData.component);
|
||||
}, nf.Common.handleAjaxError).always(function () {
|
||||
}).fail(nf.Common.handleAjaxError).always(function () {
|
||||
// unable to acutally move the components so attempt to
|
||||
// unlink and remove just the snippet
|
||||
nf.Snippet.unlink(snippet.id).done(function () {
|
||||
nf.Snippet.remove(snippet.id);
|
||||
});
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes any dangling edges. All components are retained as well as any
|
||||
* edges whose source and destination are also retained.
|
||||
|
@ -1053,6 +1094,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified selection is disconnected from other nodes.
|
||||
*
|
||||
|
@ -1098,6 +1140,7 @@ nf.CanvasUtils = (function () {
|
|||
|
||||
return isDisconnected;
|
||||
},
|
||||
|
||||
/**
|
||||
* Ensures components are eligible to be moved. The new target can be optionally specified.
|
||||
*
|
||||
|
@ -1138,7 +1181,7 @@ nf.CanvasUtils = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
var conflictingPorts = [];
|
||||
|
||||
|
@ -1173,7 +1216,7 @@ nf.CanvasUtils = (function () {
|
|||
portConnectionDeferred.resolve();
|
||||
}
|
||||
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
portConnectionDeferred.reject();
|
||||
});
|
||||
}
|
||||
|
@ -1193,7 +1236,7 @@ nf.CanvasUtils = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processGroup = response.processGroup;
|
||||
var processGroupContents = processGroup.contents;
|
||||
|
||||
|
@ -1224,24 +1267,24 @@ nf.CanvasUtils = (function () {
|
|||
} else {
|
||||
portNameDeferred.resolve();
|
||||
}
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
portNameDeferred.reject();
|
||||
});
|
||||
}).promise();
|
||||
};
|
||||
|
||||
// execute the checks in order
|
||||
$.when(portConnectionCheck()).then(function () {
|
||||
portConnectionCheck().done(function () {
|
||||
if (nf.Common.isDefinedAndNotNull(group)) {
|
||||
$.when(portNameCheck()).then(function () {
|
||||
$.when(portNameCheck()).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
} else {
|
||||
deferred.resolve();
|
||||
}
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
} else {
|
||||
|
@ -1249,6 +1292,7 @@ nf.CanvasUtils = (function () {
|
|||
}
|
||||
}).promise();
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the component in the specified selection is a valid connection source.
|
||||
*
|
||||
|
@ -1264,6 +1308,7 @@ nf.CanvasUtils = (function () {
|
|||
nf.CanvasUtils.isRemoteProcessGroup(selection) || nf.CanvasUtils.isInputPort(selection) ||
|
||||
nf.CanvasUtils.isFunnel(selection);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the component in the specified selection is a valid connection destination.
|
||||
*
|
||||
|
|
|
@ -170,7 +170,7 @@ nf.Canvas = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.revision,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.revision)) {
|
||||
var revision = response.revision;
|
||||
var currentRevision = nf.Client.getRevision();
|
||||
|
@ -187,7 +187,7 @@ nf.Canvas = (function () {
|
|||
}
|
||||
}
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -534,7 +534,7 @@ nf.Canvas = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -558,7 +558,7 @@ nf.Canvas = (function () {
|
|||
|
||||
// update the graph dimensions
|
||||
updateGraphSize();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -614,7 +614,7 @@ nf.Canvas = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.status,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// report the updated status
|
||||
if (nf.Common.isDefinedAndNotNull(response.controllerStatus)) {
|
||||
var controllerStatus = response.controllerStatus;
|
||||
|
@ -712,7 +712,7 @@ nf.Canvas = (function () {
|
|||
$('#has-pending-accounts').hide();
|
||||
}
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -729,7 +729,7 @@ nf.Canvas = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (processGroupResponse) {
|
||||
}).done(function (processGroupResponse) {
|
||||
// set the revision
|
||||
nf.Client.setRevision(processGroupResponse.revision);
|
||||
|
||||
|
@ -759,7 +759,7 @@ nf.Canvas = (function () {
|
|||
|
||||
// update the toolbar
|
||||
nf.CanvasToolbar.refresh();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -777,7 +777,7 @@ nf.Canvas = (function () {
|
|||
recursive: false
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// report the updated stats
|
||||
if (nf.Common.isDefinedAndNotNull(response.processGroupStatus)) {
|
||||
var processGroupStatus = response.processGroupStatus;
|
||||
|
@ -789,7 +789,7 @@ nf.Canvas = (function () {
|
|||
$('#stats-last-refreshed').text(processGroupStatus.statsLastRefreshed);
|
||||
}
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// if clustered, a 404 likely means the flow status at the ncm is stale
|
||||
if (!nf.Canvas.isClustered() || xhr.status !== 404) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
|
@ -857,9 +857,9 @@ nf.Canvas = (function () {
|
|||
}
|
||||
|
||||
// don't load the status until the graph is loaded
|
||||
reloadStatus(nf.Canvas.getGroupId()).then(function () {
|
||||
reloadStatus(nf.Canvas.getGroupId()).done(function () {
|
||||
deferred.resolve(processGroupResult);
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
});
|
||||
|
@ -871,9 +871,9 @@ nf.Canvas = (function () {
|
|||
reloadStatus: function () {
|
||||
return $.Deferred(function (deferred) {
|
||||
// refresh the status and check any bulletins
|
||||
$.when(reloadStatus(nf.Canvas.getGroupId()), reloadFlowStatus()).then(function () {
|
||||
$.when(reloadStatus(nf.Canvas.getGroupId()), reloadFlowStatus()).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}).promise();
|
||||
|
@ -900,13 +900,13 @@ nf.Canvas = (function () {
|
|||
url: config.urls.cluster
|
||||
}).done(function (response, status, xhr) {
|
||||
clustered = true;
|
||||
deferred.resolveWith(xhr, [response, status, xhr]);
|
||||
deferred.resolve(response, status, xhr);
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 404) {
|
||||
clustered = false;
|
||||
deferred.resolveWith(xhr, ['', 'success', xhr]);
|
||||
deferred.resolve('', 'success', xhr);
|
||||
} else {
|
||||
deferred.rejectWith(xhr, [xhr, status, error]);
|
||||
deferred.reject(xhr, status, error);
|
||||
}
|
||||
});
|
||||
}).promise();
|
||||
|
@ -919,7 +919,7 @@ nf.Canvas = (function () {
|
|||
});
|
||||
|
||||
// ensure the authorities and config request is processed first
|
||||
$.when(authoritiesXhr, configXhr).then(function (authoritiesResult, configResult) {
|
||||
$.when(authoritiesXhr, configXhr).done(function (authoritiesResult, configResult) {
|
||||
var authoritiesResponse = authoritiesResult[0];
|
||||
var configResponse = configResult[0];
|
||||
|
||||
|
@ -934,7 +934,7 @@ nf.Canvas = (function () {
|
|||
var configDetails = configResponse.config;
|
||||
|
||||
// when both request complete, load the application
|
||||
isClusteredRequest.then(function () {
|
||||
isClusteredRequest.done(function () {
|
||||
// get the auto refresh interval
|
||||
var autoRefreshIntervalSeconds = parseInt(configDetails.autoRefreshIntervalSeconds, 10);
|
||||
|
||||
|
@ -942,7 +942,7 @@ nf.Canvas = (function () {
|
|||
secureSiteToSite = configDetails.siteToSiteSecure;
|
||||
|
||||
// load d3
|
||||
loadD3().then(function () {
|
||||
loadD3().done(function () {
|
||||
nf.Storage.init();
|
||||
|
||||
// initialize the application
|
||||
|
@ -982,7 +982,7 @@ nf.Canvas = (function () {
|
|||
nf.ConnectionDetails.init();
|
||||
nf.RemoteProcessGroupDetails.init();
|
||||
nf.GoTo.init();
|
||||
nf.Graph.init().then(function () {
|
||||
nf.Graph.init().done(function () {
|
||||
// determine the split between the polling
|
||||
var pollingSplit = autoRefreshIntervalSeconds / 2;
|
||||
|
||||
|
@ -994,10 +994,10 @@ nf.Canvas = (function () {
|
|||
|
||||
// hide the splash screen
|
||||
nf.Canvas.hideSplash();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
/**
|
||||
* Defines the gradient colors used to render processors.
|
||||
|
@ -1214,6 +1214,7 @@ nf.Canvas = (function () {
|
|||
// add the behavior to the canvas and disable dbl click zoom
|
||||
svg.call(behavior).on('dblclick.zoom', null);
|
||||
},
|
||||
|
||||
/**
|
||||
* Whether or not a component should be rendered based solely on the current scale.
|
||||
*
|
||||
|
@ -1222,6 +1223,7 @@ nf.Canvas = (function () {
|
|||
shouldRenderPerScale: function () {
|
||||
return nf.Canvas.View.scale() >= MIN_SCALE_TO_RENDER;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates component visibility based on the current translation/scale.
|
||||
*/
|
||||
|
@ -1229,6 +1231,7 @@ nf.Canvas = (function () {
|
|||
updateComponentVisibility();
|
||||
nf.Graph.pan();
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets/gets the current translation.
|
||||
*
|
||||
|
@ -1241,6 +1244,7 @@ nf.Canvas = (function () {
|
|||
behavior.translate(translate);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets/gets the current scale.
|
||||
*
|
||||
|
@ -1253,6 +1257,7 @@ nf.Canvas = (function () {
|
|||
behavior.scale(scale);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Zooms in a single zoom increment.
|
||||
*/
|
||||
|
@ -1277,6 +1282,7 @@ nf.Canvas = (function () {
|
|||
height: 1
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Zooms out a single zoom increment.
|
||||
*/
|
||||
|
@ -1301,6 +1307,7 @@ nf.Canvas = (function () {
|
|||
height: 1
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Zooms to fit the entire graph on the canvas.
|
||||
*/
|
||||
|
@ -1347,6 +1354,7 @@ nf.Canvas = (function () {
|
|||
height: canvasHeight / newScale
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Zooms to the actual size (1 to 1).
|
||||
*/
|
||||
|
@ -1395,6 +1403,7 @@ nf.Canvas = (function () {
|
|||
// center as appropriate
|
||||
nf.CanvasUtils.centerBoundingBox(box);
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the view based on the configured translation and scale.
|
||||
*
|
||||
|
|
|
@ -34,6 +34,7 @@ nf.Clipboard = (function () {
|
|||
addListener: function (listener, funct) {
|
||||
listeners[listener] = funct;
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove the specified listener.
|
||||
*
|
||||
|
@ -44,6 +45,7 @@ nf.Clipboard = (function () {
|
|||
delete listeners[listener];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Copy the specified data.
|
||||
*
|
||||
|
@ -57,12 +59,14 @@ nf.Clipboard = (function () {
|
|||
listeners[listener].call(listener, COPY, data);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks to see if any data has been copied.
|
||||
*/
|
||||
isCopied: function () {
|
||||
return nf.Common.isDefinedAndNotNull(data);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the most recent data thats copied. This operation
|
||||
* will remove the corresponding data from the clipboard.
|
||||
|
|
|
@ -157,6 +157,7 @@ nf.Connectable = (function () {
|
|||
d3.select(this).remove();
|
||||
});
|
||||
},
|
||||
|
||||
activate: function (components) {
|
||||
components
|
||||
.on('mouseenter.connectable', function (d) {
|
||||
|
|
|
@ -250,7 +250,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processGroup = response.processGroup;
|
||||
var processGroupContents = processGroup.contents;
|
||||
|
||||
|
@ -301,7 +301,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// handle the error
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
|
||||
|
@ -327,7 +327,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var remoteProcessGroup = response.remoteProcessGroup;
|
||||
var remoteProcessGroupContents = remoteProcessGroup.contents;
|
||||
|
||||
|
@ -379,7 +379,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// handle the error
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
|
||||
|
@ -475,7 +475,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processGroup = response.processGroup;
|
||||
var processGroupContents = processGroup.contents;
|
||||
|
||||
|
@ -526,7 +526,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// handle the error
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
|
||||
|
@ -551,7 +551,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var remoteProcessGroup = response.remoteProcessGroup;
|
||||
var remoteProcessGroupContents = remoteProcessGroup.contents;
|
||||
|
||||
|
@ -603,7 +603,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// handle the error
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
|
||||
|
@ -848,7 +848,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
destinationType: destinationType
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -876,7 +876,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
|
||||
// update the birdseye
|
||||
nf.Birdseye.refresh();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// handle the error
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
});
|
||||
|
@ -935,7 +935,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
destinationGroupId: destinationGroupId
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.connection)) {
|
||||
var connection = response.connection;
|
||||
|
||||
|
@ -959,7 +959,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
nf.RemoteProcessGroup.reload(destinationData.component);
|
||||
}
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
@ -1128,7 +1128,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.prioritizers,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// create an element for each available prioritizer
|
||||
$.each(response.prioritizerTypes, function (i, documentedType) {
|
||||
nf.ConnectionConfiguration.addAvailablePrioritizer('#prioritizer-available', documentedType);
|
||||
|
@ -1142,8 +1142,9 @@ nf.ConnectionConfiguration = (function () {
|
|||
opacity: 0.6
|
||||
});
|
||||
$('#prioritizer-available, #prioritizer-selected').disableSelection();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds the specified prioritizer to the specified container.
|
||||
*
|
||||
|
@ -1165,6 +1166,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
}));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the dialog for creating a new connection.
|
||||
*
|
||||
|
@ -1209,6 +1211,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
removeTempEdge();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the configuration for the specified connection. If a destination is
|
||||
* specified it will be considered a new destination.
|
||||
|
@ -1232,7 +1235,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
}
|
||||
|
||||
// initialize the connection dialog
|
||||
$.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination)).then(function () {
|
||||
$.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination)).done(function () {
|
||||
var availableRelationships = connection.availableRelationships;
|
||||
var selectedRelationships = connection.selectedRelationships;
|
||||
|
||||
|
@ -1311,9 +1314,9 @@ nf.ConnectionConfiguration = (function () {
|
|||
if (nf.CanvasUtils.isProcessor(source)) {
|
||||
if (selectedRelationships.length > 0) {
|
||||
// if there are relationships selected update
|
||||
updateConnection(selectedRelationships).then(function () {
|
||||
updateConnection(selectedRelationships).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
} else {
|
||||
|
@ -1328,9 +1331,9 @@ nf.ConnectionConfiguration = (function () {
|
|||
}
|
||||
} else {
|
||||
// there are no relationships, but the source wasn't a processor, so update anyway
|
||||
updateConnection(undefined).then(function () {
|
||||
updateConnection(undefined).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}
|
||||
|
@ -1366,7 +1369,7 @@ nf.ConnectionConfiguration = (function () {
|
|||
if (relationshipNames.is(':visible') && relationshipNames.get(0).scrollHeight > relationshipNames.innerHeight()) {
|
||||
relationshipNames.css('border-width', '1px');
|
||||
}
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}).promise();
|
||||
|
|
|
@ -945,13 +945,13 @@ nf.Connection = (function () {
|
|||
data: JSON.stringify(entity),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
// request was successful, update the entry
|
||||
nf.Connection.set(response.connection);
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
@ -973,6 +973,7 @@ nf.Connection = (function () {
|
|||
selfLoopXOffset: (dimensions.width / 2) + 5,
|
||||
selfLoopYOffset: 25
|
||||
},
|
||||
|
||||
init: function () {
|
||||
connectionMap = d3.map();
|
||||
|
||||
|
@ -1122,7 +1123,7 @@ nf.Connection = (function () {
|
|||
url: connectionData.component.uri,
|
||||
data: updatedConnectionData,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connectionData = response.connection;
|
||||
|
||||
// update the revision
|
||||
|
@ -1130,7 +1131,7 @@ nf.Connection = (function () {
|
|||
|
||||
// refresh to update the label
|
||||
nf.Connection.set(connectionData);
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
@ -1268,6 +1269,7 @@ nf.Connection = (function () {
|
|||
d3.event.sourceEvent.stopPropagation();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified connections.
|
||||
*
|
||||
|
@ -1304,12 +1306,14 @@ nf.Connection = (function () {
|
|||
// apply the selection and handle all new connection
|
||||
select().enter().call(renderConnections, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* Reorders the connections based on their current z index.
|
||||
*/
|
||||
reorder: function () {
|
||||
d3.selectAll('g.connection').call(sort);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of the specified connection.
|
||||
*
|
||||
|
@ -1343,6 +1347,7 @@ nf.Connection = (function () {
|
|||
set(connection);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the connection status using the specified status.
|
||||
*
|
||||
|
@ -1364,6 +1369,7 @@ nf.Connection = (function () {
|
|||
// update the visible connections
|
||||
d3.selectAll('g.connection.visible').call(updateConnectionStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the connection in the UI.
|
||||
*
|
||||
|
@ -1376,12 +1382,14 @@ nf.Connection = (function () {
|
|||
d3.selectAll('g.connection').call(updateConnections, true, true);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the components necessary after a pan event.
|
||||
*/
|
||||
pan: function () {
|
||||
d3.selectAll('g.connection.entering, g.connection.leaving').call(updateConnections, false, true);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified connection.
|
||||
*
|
||||
|
@ -1399,12 +1407,14 @@ nf.Connection = (function () {
|
|||
// apply the selection and handle all removed connections
|
||||
select().exit().call(removeConnections);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all processors.
|
||||
*/
|
||||
removeAll: function () {
|
||||
nf.Connection.remove(connectionMap.keys());
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the connection state from the server and refreshes the UI.
|
||||
*
|
||||
|
@ -1421,6 +1431,7 @@ nf.Connection = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the connection that have a source or destination component with the specified id.
|
||||
*
|
||||
|
@ -1439,6 +1450,7 @@ nf.Connection = (function () {
|
|||
});
|
||||
return connections;
|
||||
},
|
||||
|
||||
/**
|
||||
* If the connection id is specified it is returned. If no connection id
|
||||
* specified, all connections are returned.
|
||||
|
|
|
@ -417,12 +417,14 @@ nf.ContextMenu = (function () {
|
|||
'y': position[1]
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Hides the context menu.
|
||||
*/
|
||||
hide: function () {
|
||||
$('#context-menu').hide();
|
||||
},
|
||||
|
||||
/**
|
||||
* Activates the context menu for the components in the specified selection.
|
||||
*
|
||||
|
|
|
@ -57,7 +57,7 @@ nf.Draggable = (function () {
|
|||
y: newPosition.y
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -69,7 +69,7 @@ nf.Draggable = (function () {
|
|||
type: d.type,
|
||||
id: d.component.id
|
||||
});
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
@ -114,7 +114,7 @@ nf.Draggable = (function () {
|
|||
data: JSON.stringify(entity),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -132,7 +132,7 @@ nf.Draggable = (function () {
|
|||
type: d.type,
|
||||
id: d.component.id
|
||||
});
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
@ -300,6 +300,7 @@ nf.Draggable = (function () {
|
|||
dragSelection.remove();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Activates the drag behavior for the components in the specified selection.
|
||||
*
|
||||
|
|
|
@ -135,6 +135,7 @@ nf.Funnel = (function () {
|
|||
'class': 'funnels'
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified funnels.
|
||||
*
|
||||
|
@ -165,6 +166,7 @@ nf.Funnel = (function () {
|
|||
// apply the selection and handle all new processors
|
||||
select().enter().call(renderFunnels, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* If the funnel id is specified it is returned. If no funnel id
|
||||
* specified, all funnels are returned.
|
||||
|
@ -178,6 +180,7 @@ nf.Funnel = (function () {
|
|||
return funnelMap.get(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the funnel id is specified it is refresh according to the current
|
||||
* state. If not funnel id is specified, all funnels are refreshed.
|
||||
|
@ -191,6 +194,7 @@ nf.Funnel = (function () {
|
|||
d3.selectAll('g.funnel').call(updateFunnels);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the funnel state from the server and refreshes the UI.
|
||||
* If the funnel is currently unknown, this function just returns.
|
||||
|
@ -208,6 +212,7 @@ nf.Funnel = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the component.
|
||||
*
|
||||
|
@ -216,6 +221,7 @@ nf.Funnel = (function () {
|
|||
position: function (id) {
|
||||
d3.select('#id-' + id).call(nf.CanvasUtils.position);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the specified funnel(s). If the is an array, it
|
||||
* will set each funnel. If it is not an array, it will
|
||||
|
@ -244,6 +250,7 @@ nf.Funnel = (function () {
|
|||
set(funnels);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified funnel.
|
||||
*
|
||||
|
@ -261,6 +268,7 @@ nf.Funnel = (function () {
|
|||
// apply the selection and handle all removed funnels
|
||||
select().exit().call(removeFunnels);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all processors.
|
||||
*/
|
||||
|
|
|
@ -336,6 +336,7 @@ nf.GoTo = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components downstream from a processor.
|
||||
*
|
||||
|
@ -348,7 +349,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the downstream dialog
|
||||
|
@ -372,8 +373,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the downstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components upstream from a processor.
|
||||
*
|
||||
|
@ -386,7 +388,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the upstream dialog
|
||||
|
@ -410,8 +412,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the upstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components downstream from a process group or a remote process group.
|
||||
*
|
||||
|
@ -424,7 +427,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the downstream dialog
|
||||
|
@ -448,8 +451,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the downstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components upstream from a process group or a remote process group.
|
||||
*
|
||||
|
@ -462,7 +466,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the upstream dialog
|
||||
|
@ -486,8 +490,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components downstream from an input port.
|
||||
*
|
||||
|
@ -500,7 +505,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the downstream dialog
|
||||
|
@ -524,8 +529,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the downstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components upstream from an input port.
|
||||
*
|
||||
|
@ -538,7 +544,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the upstream dialog
|
||||
|
@ -565,8 +571,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the upstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components downstream from an output port.
|
||||
*
|
||||
|
@ -579,7 +586,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the downstream dialog
|
||||
|
@ -606,8 +613,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the downstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components upstream from an output port.
|
||||
*
|
||||
|
@ -620,7 +628,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the upstream dialog
|
||||
|
@ -644,8 +652,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the upstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components downstream from a funnel.
|
||||
*
|
||||
|
@ -658,7 +667,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the downstream dialog
|
||||
|
@ -679,8 +688,9 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the downstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows components upstream from a funnel.
|
||||
*
|
||||
|
@ -693,7 +703,7 @@ nf.GoTo = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var connections = response.connections;
|
||||
|
||||
// populate the upstream dialog
|
||||
|
@ -714,7 +724,7 @@ nf.GoTo = (function () {
|
|||
|
||||
// show the upstream dialog
|
||||
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -55,6 +55,7 @@ nf.Graph = (function () {
|
|||
// load the graph
|
||||
return nf.CanvasUtils.enterGroup(nf.Canvas.getGroupId());
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the resources defined in the response.
|
||||
*
|
||||
|
@ -96,6 +97,7 @@ nf.Graph = (function () {
|
|||
nf.Connection.add(processGroupContents.connections, selectAll);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the components currently on the canvas.
|
||||
*/
|
||||
|
@ -110,6 +112,7 @@ nf.Graph = (function () {
|
|||
connections: nf.Connection.get()
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the components contained within the specified process group.
|
||||
*
|
||||
|
@ -142,6 +145,7 @@ nf.Graph = (function () {
|
|||
nf.Connection.set(processGroupContents.connections);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the status for the components specified. This will update the content
|
||||
* of the existing components on the graph and will not cause them to be repainted.
|
||||
|
@ -160,6 +164,7 @@ nf.Graph = (function () {
|
|||
nf.Processor.setStatus(processGroupStatus.processorStatus);
|
||||
nf.Connection.setStatus(processGroupStatus.connectionStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears all the components currently on the canvas. This function does not automatically refresh.
|
||||
*/
|
||||
|
@ -173,6 +178,7 @@ nf.Graph = (function () {
|
|||
nf.Processor.removeAll();
|
||||
nf.Connection.removeAll();
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes all components currently on the canvas.
|
||||
*/
|
||||
|
|
|
@ -41,13 +41,13 @@ nf.LabelConfiguration = (function () {
|
|||
'style[font-size]': fontSize.value
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
// get the label out of the response
|
||||
nf.Label.set(response.label);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
|
||||
// reset and hide the dialog
|
||||
|
@ -92,6 +92,7 @@ nf.LabelConfiguration = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the configuration for the specified label.
|
||||
*
|
||||
|
|
|
@ -283,6 +283,7 @@ nf.Label = (function () {
|
|||
width: dimensions.width,
|
||||
height: dimensions.height
|
||||
},
|
||||
|
||||
/**
|
||||
* Initializes of the Processor handler.
|
||||
*/
|
||||
|
@ -342,13 +343,13 @@ nf.Label = (function () {
|
|||
'height': labelData.dimensions.height
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
// request was successful, update the entry
|
||||
nf.Label.set(response.label);
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
// determine the previous width
|
||||
var width = dimensions.width;
|
||||
if (nf.Common.isDefinedAndNotNull(labelData.component.width)) {
|
||||
|
@ -376,6 +377,7 @@ nf.Label = (function () {
|
|||
d3.event.sourceEvent.stopPropagation();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified labels.
|
||||
*
|
||||
|
@ -421,6 +423,7 @@ nf.Label = (function () {
|
|||
// apply the selection and handle all new labels
|
||||
select().enter().call(renderLabels, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* If the label id is specified it is returned. If no label id
|
||||
* specified, all labels are returned.
|
||||
|
@ -434,6 +437,7 @@ nf.Label = (function () {
|
|||
return labelMap.get(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the label id is specified it is refresh according to the current
|
||||
* state. If not label id is specified, all labels are refreshed.
|
||||
|
@ -447,6 +451,7 @@ nf.Label = (function () {
|
|||
d3.selectAll('g.label').call(updateLabels);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the label state from the server and refreshes the UI.
|
||||
* If the label is currently unknown, this function just returns.
|
||||
|
@ -464,6 +469,7 @@ nf.Label = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the component.
|
||||
*
|
||||
|
@ -472,6 +478,7 @@ nf.Label = (function () {
|
|||
position: function (id) {
|
||||
d3.select('#id-' + id).call(position);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the specified label(s). If the is an array, it
|
||||
* will set each label. If it is not an array, it will
|
||||
|
@ -516,6 +523,7 @@ nf.Label = (function () {
|
|||
set(labels);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified label.
|
||||
*
|
||||
|
@ -533,12 +541,14 @@ nf.Label = (function () {
|
|||
// apply the selection and handle all removed labels
|
||||
select().exit().call(removeLabels);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all label.
|
||||
*/
|
||||
removeAll: function () {
|
||||
nf.Label.remove(labelMap.keys());
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the default color that should be used when drawing a label.
|
||||
*/
|
||||
|
|
|
@ -58,7 +58,7 @@ nf.PortConfiguration = (function () {
|
|||
data: data,
|
||||
url: portData.component.uri,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -74,7 +74,7 @@ nf.PortConfiguration = (function () {
|
|||
|
||||
// close the details panel
|
||||
$('#port-configuration').modal('hide');
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// handle bad request locally to keep the dialog open, allowing the user
|
||||
// to make changes. if the request fails for another reason, the dialog
|
||||
// should be closed so the issue can be addressed (stale flow for instance)
|
||||
|
@ -128,6 +128,7 @@ nf.PortConfiguration = (function () {
|
|||
init: function () {
|
||||
initPortConfigurationDialog();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the specified selection.
|
||||
*
|
||||
|
|
|
@ -41,6 +41,7 @@ nf.PortDetails = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDetails: function (selection) {
|
||||
// if the specified component is a processor, load its properties
|
||||
if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
|
||||
|
|
|
@ -446,6 +446,7 @@ nf.Port = (function () {
|
|||
'class': 'ports'
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified ports.
|
||||
*
|
||||
|
@ -485,6 +486,7 @@ nf.Port = (function () {
|
|||
// apply the selection and handle all new ports
|
||||
select().enter().call(renderPorts, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* If the port id is specified it is returned. If no port id
|
||||
* specified, all ports are returned.
|
||||
|
@ -498,6 +500,7 @@ nf.Port = (function () {
|
|||
return portMap.get(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the port id is specified it is refresh according to the current
|
||||
* state. If not port id is specified, all ports are refreshed.
|
||||
|
@ -511,12 +514,14 @@ nf.Port = (function () {
|
|||
d3.selectAll('g.input-port, g.output-port').call(updatePorts);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the components necessary after a pan event.
|
||||
*/
|
||||
pan: function () {
|
||||
d3.selectAll('g.input-port.entering, g.output-port.entering, g.input-port.leaving, g.output-port.leaving').call(updatePorts);
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the port state from the server and refreshes the UI.
|
||||
* If the port is currently unknown, this function just returns.
|
||||
|
@ -538,6 +543,7 @@ nf.Port = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the component.
|
||||
*
|
||||
|
@ -546,6 +552,7 @@ nf.Port = (function () {
|
|||
position: function (id) {
|
||||
d3.select('#id-' + id).call(nf.CanvasUtils.position);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the specified port(s). If the is an array, it
|
||||
* will set each port. If it is not an array, it will
|
||||
|
@ -574,6 +581,7 @@ nf.Port = (function () {
|
|||
set(ports);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the port status using the specified status.
|
||||
*
|
||||
|
@ -595,6 +603,7 @@ nf.Port = (function () {
|
|||
// update the visible ports
|
||||
d3.selectAll('g.input-port.visible, g.output-port.visible').call(updatePortStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified port.
|
||||
*
|
||||
|
@ -612,6 +621,7 @@ nf.Port = (function () {
|
|||
// apply the selection and handle all removed ports
|
||||
select().exit().call(removePorts);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all ports..
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,7 @@ nf.ProcessGroupConfiguration = (function () {
|
|||
},
|
||||
url: processGroupData.component.uri,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.processGroup)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -53,7 +53,7 @@ nf.ProcessGroupConfiguration = (function () {
|
|||
// close the details panel
|
||||
$('#process-group-configuration').modal('hide');
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// close the details panel
|
||||
$('#process-group-configuration').modal('hide');
|
||||
|
||||
|
@ -80,6 +80,7 @@ nf.ProcessGroupConfiguration = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the specified selection.
|
||||
*
|
||||
|
|
|
@ -40,6 +40,7 @@ nf.ProcessGroupDetails = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDetails: function (selection) {
|
||||
// if the specified selection is a process group
|
||||
if (nf.CanvasUtils.isProcessGroup(selection)) {
|
||||
|
|
|
@ -888,6 +888,7 @@ nf.ProcessGroup = (function () {
|
|||
'class': 'process-groups'
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified process groups.
|
||||
*
|
||||
|
@ -918,6 +919,7 @@ nf.ProcessGroup = (function () {
|
|||
// apply the selection and handle all new process group
|
||||
select().enter().call(renderProcessGroups, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* If the process group id is specified it is returned. If no process group id
|
||||
* specified, all process groups are returned.
|
||||
|
@ -931,6 +933,7 @@ nf.ProcessGroup = (function () {
|
|||
return processGroupMap.get(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the process group id is specified it is refresh according to the current
|
||||
* state. If no process group id is specified, all process groups are refreshed.
|
||||
|
@ -944,12 +947,14 @@ nf.ProcessGroup = (function () {
|
|||
d3.selectAll('g.process-group').call(updateProcessGroups);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the components necessary after a pan event.
|
||||
*/
|
||||
pan: function () {
|
||||
d3.selectAll('g.process-group.entering, g.process-group.leaving').call(updateProcessGroups);
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the process group state from the server and refreshes the UI.
|
||||
* If the process group is currently unknown, this function just returns.
|
||||
|
@ -967,6 +972,7 @@ nf.ProcessGroup = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the component.
|
||||
*
|
||||
|
@ -975,6 +981,7 @@ nf.ProcessGroup = (function () {
|
|||
position: function (id) {
|
||||
d3.select('#id-' + id).call(nf.CanvasUtils.position);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the specified process group(s). If the is an array, it
|
||||
* will set each process group. If it is not an array, it will
|
||||
|
@ -1003,6 +1010,7 @@ nf.ProcessGroup = (function () {
|
|||
set(processGroups);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the process group status using the specified status.
|
||||
*
|
||||
|
@ -1024,6 +1032,7 @@ nf.ProcessGroup = (function () {
|
|||
// update the visible process groups
|
||||
d3.selectAll('g.process-group.visible').call(updateProcessGroupStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified process group.
|
||||
*
|
||||
|
@ -1041,6 +1050,7 @@ nf.ProcessGroup = (function () {
|
|||
// apply the selection and handle all removed process groups
|
||||
select().exit().call(removeProcessGroups);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all process groups.
|
||||
*/
|
||||
|
|
|
@ -454,6 +454,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
// initialize the property table
|
||||
nf.ProcessorPropertyTable.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the configuration dialog for the specified processor.
|
||||
*
|
||||
|
@ -586,7 +587,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.processor)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -597,7 +598,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
// close the details panel
|
||||
$('#processor-configuration').modal('hide');
|
||||
}
|
||||
}, handleProcessorConfigurationError);
|
||||
}).fail(handleProcessorConfigurationError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -650,7 +651,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.processor)) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
@ -658,7 +659,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
// open the custom ui
|
||||
openCustomUi();
|
||||
}
|
||||
}, handleProcessorConfigurationError);
|
||||
}).fail(handleProcessorConfigurationError);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -679,7 +680,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
type: 'GET',
|
||||
url: '../nifi-api/controller/history/processors/' + encodeURIComponent(processor.id),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processorHistory = response.processorHistory;
|
||||
|
||||
// record the processor history
|
||||
|
@ -696,7 +697,7 @@ nf.ProcessorConfiguration = (function () {
|
|||
if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
|
||||
processorRelationships.css('border-width', '1px');
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -325,6 +325,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
config: {
|
||||
sensitiveText: 'Sensitive value set'
|
||||
},
|
||||
|
||||
/**
|
||||
* Initializes the property table.
|
||||
*/
|
||||
|
@ -332,6 +333,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
initNewPropertyDialog();
|
||||
initProcessorPropertiesTable();
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified property is sensitive.
|
||||
*
|
||||
|
@ -344,6 +346,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified property is required.
|
||||
*
|
||||
|
@ -356,6 +359,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified property is required.
|
||||
*
|
||||
|
@ -368,6 +372,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the allowable values for the specified property.
|
||||
*
|
||||
|
@ -380,6 +385,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether the specified property supports EL.
|
||||
*
|
||||
|
@ -392,6 +398,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Saves the last edited row in the specified grid.
|
||||
*/
|
||||
|
@ -403,6 +410,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
editController.commitCurrentEdit();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancels the edit in the specified row.
|
||||
*/
|
||||
|
@ -414,6 +422,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
editController.cancelCurrentEdit();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes the property in the specified row.
|
||||
*
|
||||
|
@ -432,6 +441,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
propertyData.updateItem(property.id, property);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -441,6 +451,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
propertyGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads the specified properties.
|
||||
*
|
||||
|
@ -497,6 +508,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
propertyData.endUpdate();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if a save is required.
|
||||
*/
|
||||
|
@ -515,6 +527,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
});
|
||||
return isSaveRequired;
|
||||
},
|
||||
|
||||
/**
|
||||
* Marshal's the properties to send to the server.
|
||||
*/
|
||||
|
@ -535,6 +548,7 @@ nf.ProcessorPropertyTable = (function () {
|
|||
|
||||
return properties;
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears the property table.
|
||||
*/
|
||||
|
|
|
@ -651,6 +651,7 @@ nf.Processor = (function () {
|
|||
'class': 'processors'
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified processors.
|
||||
*
|
||||
|
@ -681,6 +682,7 @@ nf.Processor = (function () {
|
|||
// apply the selection and handle all new processors
|
||||
select().enter().call(renderProcessors, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* If the processor id is specified it is returned. If no processor id
|
||||
* specified, all processors are returned.
|
||||
|
@ -694,6 +696,7 @@ nf.Processor = (function () {
|
|||
return processorMap.get(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the processor id is specified it is refresh according to the current
|
||||
* state. If not processor id is specified, all processors are refreshed.
|
||||
|
@ -707,6 +710,7 @@ nf.Processor = (function () {
|
|||
d3.selectAll('g.processor').call(updateProcessors);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the component.
|
||||
*
|
||||
|
@ -715,12 +719,14 @@ nf.Processor = (function () {
|
|||
position: function (id) {
|
||||
d3.select('#id-' + id).call(nf.CanvasUtils.position);
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the components necessary after a pan event.
|
||||
*/
|
||||
pan: function () {
|
||||
d3.selectAll('g.processor.entering, g.processor.leaving').call(updateProcessors);
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the processor state from the server and refreshes the UI.
|
||||
* If the processor is currently unknown, this function just returns.
|
||||
|
@ -738,6 +744,7 @@ nf.Processor = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the specified processor(s). If the is an array, it
|
||||
* will set each processor. If it is not an array, it will
|
||||
|
@ -766,6 +773,7 @@ nf.Processor = (function () {
|
|||
set(processors);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified processor.
|
||||
*
|
||||
|
@ -783,12 +791,14 @@ nf.Processor = (function () {
|
|||
// apply the selection and handle all removed processors
|
||||
select().exit().call(removeProcessors);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all processors.
|
||||
*/
|
||||
removeAll: function () {
|
||||
nf.Processor.remove(processorMap.keys());
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the processor status using the specified status.
|
||||
*
|
||||
|
@ -810,6 +820,7 @@ nf.Processor = (function () {
|
|||
// update the visible processor status
|
||||
d3.selectAll('g.processor.visible').call(updateProcessorStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the default color that should be used when drawing a processor.
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ nf.Registration = (function () {
|
|||
data: {
|
||||
'justification': justification
|
||||
}
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// hide the registration pane
|
||||
$('#registration-pane').hide();
|
||||
|
||||
|
@ -61,7 +61,7 @@ nf.Registration = (function () {
|
|||
$('#message-pane').show();
|
||||
$('#message-title').text('Thanks');
|
||||
$('#message-content').text('Your request will be processed shortly.');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -45,13 +45,13 @@ nf.RemoteProcessGroupConfiguration = (function () {
|
|||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
// close the details panel
|
||||
$('#remote-process-group-configuration').modal('hide');
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400) {
|
||||
var errors = xhr.responseText.split('\n');
|
||||
|
||||
|
@ -93,6 +93,7 @@ nf.RemoteProcessGroupConfiguration = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the remote process group in the specified selection.
|
||||
*
|
||||
|
|
|
@ -39,6 +39,7 @@ nf.RemoteProcessGroupDetails = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the remote process group in the specified selection.
|
||||
*
|
||||
|
|
|
@ -59,7 +59,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -75,7 +75,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
// set the new values
|
||||
$('#' + remotePortId + '-concurrent-tasks').text(remotePort.concurrentlySchedulableTaskCount);
|
||||
$('#' + remotePortId + '-compression').text(compressionLabel);
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400) {
|
||||
var errors = xhr.responseText.split('\n');
|
||||
|
||||
|
@ -270,7 +270,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: 'application/json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -306,7 +306,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
}
|
||||
}
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400) {
|
||||
var errors = xhr.responseText.split('\n');
|
||||
|
||||
|
@ -428,6 +428,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
initRemotePortConfigurationDialog();
|
||||
initRemoteProcessGroupConfigurationDialog();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the remote process group in the specified selection.
|
||||
*
|
||||
|
@ -446,7 +447,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var remoteProcessGroup = response.remoteProcessGroup;
|
||||
|
||||
// set the model locally
|
||||
|
@ -509,7 +510,7 @@ nf.RemoteProcessGroupPorts = (function () {
|
|||
|
||||
// show the details
|
||||
$('#remote-process-group-ports').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -881,6 +881,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
'class': 'remote-process-groups'
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the graph with the specified remote process groups.
|
||||
*
|
||||
|
@ -911,6 +912,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
// apply the selection and handle all new remote process groups
|
||||
select().enter().call(renderRemoteProcessGroups, selectAll);
|
||||
},
|
||||
|
||||
/**
|
||||
* If the remote process group id is specified it is returned. If no remote process
|
||||
* group id specified, all remote process groups are returned.
|
||||
|
@ -924,6 +926,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
return remoteProcessGroupMap.get(id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the remote process group id is specified it is refresh according to the current
|
||||
* state. If no remote process group id is specified, all remote process groups are refreshed.
|
||||
|
@ -937,12 +940,14 @@ nf.RemoteProcessGroup = (function () {
|
|||
d3.selectAll('g.remote-process-group').call(updateRemoteProcessGroups);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the components necessary after a pan event.
|
||||
*/
|
||||
pan: function () {
|
||||
d3.selectAll('g.remote-process-group.entering, g.remote-process-group.leaving').call(updateRemoteProcessGroups);
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the remote process group state from the server and refreshes the UI.
|
||||
* If the remote process group is currently unknown, this function just returns.
|
||||
|
@ -966,6 +971,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the component.
|
||||
*
|
||||
|
@ -974,6 +980,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
position: function (id) {
|
||||
d3.select('#id-' + id).call(nf.CanvasUtils.position);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the specified remote process group(s). If the is an array, it
|
||||
* will set each remote process group. If it is not an array, it will
|
||||
|
@ -1002,6 +1009,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
set(remoteProcessGroups);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the remote process group status using the specified status.
|
||||
*
|
||||
|
@ -1023,6 +1031,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
// only update the visible components
|
||||
d3.selectAll('g.remote-process-group.visible').call(updateProcessGroupStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified process group.
|
||||
*
|
||||
|
@ -1040,6 +1049,7 @@ nf.RemoteProcessGroup = (function () {
|
|||
// apply the selection and handle all removed remote process groups
|
||||
select().exit().call(removeRemoteProcessGroups);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all remote process groups.
|
||||
*/
|
||||
|
|
|
@ -80,7 +80,7 @@ nf.SecurePortConfiguration = (function () {
|
|||
contentType: 'application/json',
|
||||
url: portUri,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -96,7 +96,7 @@ nf.SecurePortConfiguration = (function () {
|
|||
|
||||
// close the details panel
|
||||
$('#secure-port-configuration').modal('hide');
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// close the details panel
|
||||
$('#secure-port-configuration').modal('hide');
|
||||
|
||||
|
@ -322,6 +322,7 @@ nf.SecurePortConfiguration = (function () {
|
|||
init: function () {
|
||||
initPortConfigurationDialog();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the port specified selection.
|
||||
*
|
||||
|
|
|
@ -85,6 +85,7 @@ nf.SecurePortDetails = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDetails: function (selection) {
|
||||
// if the specified component is a port, load its properties
|
||||
if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
|
||||
|
|
|
@ -20,6 +20,7 @@ nf.Selectable = (function () {
|
|||
init: function () {
|
||||
|
||||
},
|
||||
|
||||
select: function (g) {
|
||||
// hide any context menus as necessary
|
||||
nf.ContextMenu.hide();
|
||||
|
@ -46,6 +47,7 @@ nf.Selectable = (function () {
|
|||
// stop propagation
|
||||
d3.event.stopPropagation();
|
||||
},
|
||||
|
||||
activate: function (components) {
|
||||
components.on('mousedown.selection', function () {
|
||||
// get the clicked component to update selection
|
||||
|
|
|
@ -54,7 +54,7 @@ nf.Settings = (function () {
|
|||
clientId: revision.clientId
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -63,7 +63,7 @@ nf.Settings = (function () {
|
|||
dialogContent: 'A new flow archive was successfully created.',
|
||||
overlayBackground: false
|
||||
});
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// close the details panel
|
||||
$('#settings-cancel').click();
|
||||
|
||||
|
@ -87,7 +87,7 @@ nf.Settings = (function () {
|
|||
url: config.urls.controllerConfig,
|
||||
data: configuration,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
|
@ -99,7 +99,7 @@ nf.Settings = (function () {
|
|||
|
||||
// close the settings dialog
|
||||
$('#shell-close-button').click();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
// close the details panel
|
||||
$('#settings-cancel').click();
|
||||
|
||||
|
@ -113,6 +113,7 @@ nf.Settings = (function () {
|
|||
$('#shell-close-button').click();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the settings dialog.
|
||||
*/
|
||||
|
@ -121,7 +122,7 @@ nf.Settings = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerConfig,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the config is present
|
||||
if (nf.Common.isDefinedAndNotNull(response.config)) {
|
||||
// set the header
|
||||
|
@ -139,7 +140,7 @@ nf.Settings = (function () {
|
|||
// reset button state
|
||||
$('#settings-save, #settings-cancel').mouseout();
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -69,6 +69,7 @@ nf.Snippet = (function () {
|
|||
|
||||
return snippet;
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a snippet.
|
||||
*
|
||||
|
@ -90,6 +91,7 @@ nf.Snippet = (function () {
|
|||
nf.Client.setRevision(response.revision);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Copies the snippet to the specified group and origin.
|
||||
*
|
||||
|
@ -116,6 +118,7 @@ nf.Snippet = (function () {
|
|||
nf.Client.setRevision(response.revision);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the specified snippet.
|
||||
*
|
||||
|
@ -135,6 +138,7 @@ nf.Snippet = (function () {
|
|||
nf.Client.setRevision(response.revision);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Moves the snippet into the specified group.
|
||||
*
|
||||
|
@ -158,6 +162,7 @@ nf.Snippet = (function () {
|
|||
nf.Client.setRevision(response.revision);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Unlinks the snippet from the actual data flow.
|
||||
*
|
||||
|
@ -180,6 +185,7 @@ nf.Snippet = (function () {
|
|||
nf.Client.setRevision(response.revision);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Links the snippet from the actual data flow.
|
||||
*
|
||||
|
|
|
@ -67,6 +67,7 @@ nf.Storage = (function () {
|
|||
alternativeStorage = d3.map();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Stores the specified item. If supported, will be persisted
|
||||
* in localStorage.
|
||||
|
@ -91,6 +92,7 @@ nf.Storage = (function () {
|
|||
alternativeStorage.set(key, item);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the item with the specified key. If an item with this key does
|
||||
* not exist, null is returned. If an item exists but cannot be parsed
|
||||
|
@ -117,6 +119,7 @@ nf.Storage = (function () {
|
|||
return alternativeStorage.get(key);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the item with the specified key.
|
||||
*
|
||||
|
|
|
@ -95,14 +95,14 @@ nf.ClusterTable = (function () {
|
|||
status: 'CONNECTING'
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var node = response.node;
|
||||
|
||||
// update the node in the table
|
||||
var clusterGrid = $('#cluster-table').data('gridInstance');
|
||||
var clusterData = clusterGrid.getData();
|
||||
clusterData.updateItem(node.nodeId, node);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -118,14 +118,14 @@ nf.ClusterTable = (function () {
|
|||
status: 'DISCONNECTING'
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var node = response.node;
|
||||
|
||||
// update the node in the table
|
||||
var clusterGrid = $('#cluster-table').data('gridInstance');
|
||||
var clusterData = clusterGrid.getData();
|
||||
clusterData.updateItem(node.nodeId, node);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -138,12 +138,12 @@ nf.ClusterTable = (function () {
|
|||
type: 'DELETE',
|
||||
url: config.urls.nodes + '/' + encodeURIComponent(nodeId),
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
// get the table and update the row accordingly
|
||||
var clusterGrid = $('#cluster-table').data('gridInstance');
|
||||
var clusterData = clusterGrid.getData();
|
||||
clusterData.deleteItem(nodeId);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -391,6 +391,7 @@ nf.ClusterTable = (function () {
|
|||
// initialize the number of displayed items
|
||||
$('#displayed-nodes').text('0');
|
||||
},
|
||||
|
||||
/**
|
||||
* Prompts to verify node connection.
|
||||
*
|
||||
|
@ -413,6 +414,7 @@ nf.ClusterTable = (function () {
|
|||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Prompts to verify node disconnection.
|
||||
*
|
||||
|
@ -434,6 +436,7 @@ nf.ClusterTable = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Makes the specified node the primary node of the cluster.
|
||||
*
|
||||
|
@ -452,7 +455,7 @@ nf.ClusterTable = (function () {
|
|||
primary: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var node = response.node;
|
||||
|
||||
var clusterGrid = $('#cluster-table').data('gridInstance');
|
||||
|
@ -482,9 +485,10 @@ nf.ClusterTable = (function () {
|
|||
|
||||
// end the update
|
||||
clusterData.endUpdate();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Prompts to verify node disconnection.
|
||||
*
|
||||
|
@ -506,6 +510,7 @@ nf.ClusterTable = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -515,6 +520,7 @@ nf.ClusterTable = (function () {
|
|||
clusterGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load the processor cluster table.
|
||||
*/
|
||||
|
@ -523,7 +529,7 @@ nf.ClusterTable = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.cluster,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var cluster = response.cluster;
|
||||
|
||||
// ensure there are groups specified
|
||||
|
@ -544,8 +550,9 @@ nf.ClusterTable = (function () {
|
|||
} else {
|
||||
$('#total-nodes').text('0');
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Populate the expanded row.
|
||||
*
|
||||
|
@ -561,7 +568,7 @@ nf.ClusterTable = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.nodes + '/' + encodeURIComponent(item.nodeId),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var node = response.node;
|
||||
|
||||
// update the dialog fields
|
||||
|
@ -582,7 +589,7 @@ nf.ClusterTable = (function () {
|
|||
|
||||
// show the dialog
|
||||
$('#node-details-dialog').modal('show');
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ nf.Cluster = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.authorities,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
|
||||
// record the users authorities
|
||||
nf.Common.setAuthorities(response.authorities);
|
||||
|
@ -49,7 +49,7 @@ nf.Cluster = (function () {
|
|||
} else {
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ nf.Cluster = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (bannerResponse) {
|
||||
}).done(function (bannerResponse) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners.headerText) && bannerResponse.banners.headerText !== '') {
|
||||
|
@ -105,7 +105,7 @@ nf.Cluster = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -137,14 +137,14 @@ nf.Cluster = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var countersTitle = aboutDetails.title + ' Cluster';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = countersTitle;
|
||||
$('#counters-header-text').text(countersTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -222,6 +222,7 @@ nf.CountersTable = (function () {
|
|||
// initialize the number of display items
|
||||
$('#displayed-counters').text('0');
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the specified counter.
|
||||
*
|
||||
|
@ -237,16 +238,17 @@ nf.CountersTable = (function () {
|
|||
type: 'PUT',
|
||||
url: config.urls.counters + '/' + encodeURIComponent(item.id),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var counter = response.counter;
|
||||
|
||||
// get the table and update the row accordingly
|
||||
var countersGrid = $('#counters-table').data('gridInstance');
|
||||
var countersData = countersGrid.getData();
|
||||
countersData.updateItem(counter.id, counter);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -256,6 +258,7 @@ nf.CountersTable = (function () {
|
|||
countersGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load the processor counters table.
|
||||
*/
|
||||
|
@ -264,7 +267,7 @@ nf.CountersTable = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.counters,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var report = response.counters;
|
||||
|
||||
// ensure there are groups specified
|
||||
|
@ -285,7 +288,7 @@ nf.CountersTable = (function () {
|
|||
} else {
|
||||
$('#total-counters').text('0');
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -41,7 +41,7 @@ nf.Counters = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.authorities,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
|
||||
// record the users authorities
|
||||
nf.Common.setAuthorities(response.authorities);
|
||||
|
@ -49,7 +49,7 @@ nf.Counters = (function () {
|
|||
} else {
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ nf.Counters = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -105,7 +105,7 @@ nf.Counters = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -137,14 +137,14 @@ nf.Counters = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var countersTitle = aboutDetails.title + ' Counters';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = countersTitle;
|
||||
$('#counters-header-text').text(countersTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
url: '../nifi-api/controller/history',
|
||||
data: query,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var history = response.history;
|
||||
|
||||
// calculate the indices
|
||||
|
@ -160,7 +160,7 @@
|
|||
from: from,
|
||||
to: to
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
xhr.fromPage = fromPage;
|
||||
xhr.toPage = toPage;
|
||||
|
||||
|
|
|
@ -321,9 +321,9 @@ nf.HistoryTable = (function () {
|
|||
endDate: endDateTime
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
nf.HistoryTable.loadHistoryTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -333,6 +333,7 @@ nf.HistoryTable = (function () {
|
|||
initPurgeDialog();
|
||||
initHistoryTable();
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -342,6 +343,7 @@ nf.HistoryTable = (function () {
|
|||
historyGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load the processor status table.
|
||||
*/
|
||||
|
@ -355,6 +357,7 @@ nf.HistoryTable = (function () {
|
|||
// request refresh of the current 'page'
|
||||
historyGrid.onViewportChanged.notify();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the specified action.
|
||||
*
|
||||
|
|
|
@ -42,7 +42,7 @@ nf.History = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.authorities,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
|
||||
// record the users authorities
|
||||
nf.Common.setAuthorities(response.authorities);
|
||||
|
@ -50,7 +50,7 @@ nf.History = (function () {
|
|||
} else {
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -74,7 +74,7 @@ nf.History = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -106,7 +106,7 @@ nf.History = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -139,14 +139,14 @@ nf.History = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var historyTitle = aboutDetails.title + ' History';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = historyTitle;
|
||||
$('#history-header-text').text(historyTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -72,14 +72,17 @@ nf.Common = {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the current broswer supports SVG.
|
||||
*/
|
||||
SUPPORTS_SVG: !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect,
|
||||
|
||||
/**
|
||||
* The authorities for the current user.
|
||||
*/
|
||||
authorities: undefined,
|
||||
|
||||
/**
|
||||
* Sets the authorities for the current user.
|
||||
*
|
||||
|
@ -88,6 +91,7 @@ nf.Common = {
|
|||
setAuthorities: function (roles) {
|
||||
nf.Common.authorities = roles;
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads a script at the specified URL. Supports caching the script on the browser.
|
||||
*
|
||||
|
@ -100,6 +104,7 @@ nf.Common = {
|
|||
url: url
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether the current user can access provenance.
|
||||
*
|
||||
|
@ -117,6 +122,7 @@ nf.Common = {
|
|||
}
|
||||
return canAccessProvenance;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether or not the current user is a DFM.
|
||||
*/
|
||||
|
@ -132,6 +138,7 @@ nf.Common = {
|
|||
}
|
||||
return dfm;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether or not the current user is a DFM.
|
||||
*/
|
||||
|
@ -147,6 +154,7 @@ nf.Common = {
|
|||
}
|
||||
return admin;
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a mouse over effect for the specified selector using
|
||||
* the specified styles.
|
||||
|
@ -163,6 +171,7 @@ nf.Common = {
|
|||
});
|
||||
return $(selector).addClass(normalStyle);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method for handling ajax errors.
|
||||
*
|
||||
|
@ -237,6 +246,7 @@ nf.Common = {
|
|||
nf.Common.closeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Closes the canvas by removing the splash screen and stats poller.
|
||||
*/
|
||||
|
@ -256,6 +266,7 @@ nf.Common = {
|
|||
nf.Canvas.stopStatusPolling();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Populates the specified field with the specified value. If the value is
|
||||
* undefined, the field will read 'No value set.' If the value is an empty
|
||||
|
@ -273,6 +284,7 @@ nf.Common = {
|
|||
return $('#' + target).text(value);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears the specified field. Removes any style that may have been applied
|
||||
* by a preceeding call to populateField.
|
||||
|
@ -282,6 +294,7 @@ nf.Common = {
|
|||
clearField: function (target) {
|
||||
return $('#' + target).removeClass('unset blank').text('');
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the tooltip for the specified property.
|
||||
*
|
||||
|
@ -321,6 +334,7 @@ nf.Common = {
|
|||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified property (name and value) accordingly.
|
||||
*
|
||||
|
@ -330,6 +344,7 @@ nf.Common = {
|
|||
formatProperty: function (name, value) {
|
||||
return '<div><span class="label">' + nf.Common.formatValue(name) + ': </span>' + nf.Common.formatValue(value) + '</div>';
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified value accordingly.
|
||||
*
|
||||
|
@ -346,6 +361,7 @@ nf.Common = {
|
|||
return '<span class="unset">No value set</span>';
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* HTML escapes the specified string. If the string is null
|
||||
* or undefined, an empty string is returned.
|
||||
|
@ -372,6 +388,7 @@ nf.Common = {
|
|||
}
|
||||
};
|
||||
}()),
|
||||
|
||||
/**
|
||||
* Creates a form inline in order to submit the specified params to the specified URL
|
||||
* using the specified method.
|
||||
|
@ -407,6 +424,7 @@ nf.Common = {
|
|||
window.onbeforeunload = previousBeforeUnload;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified array as an unordered list. If the array is not an
|
||||
* array, null is returned.
|
||||
|
@ -429,6 +447,7 @@ nf.Common = {
|
|||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Extracts the contents of the specified str after the strToFind. If the
|
||||
* strToFind is not found or the last part of the str, an empty string is
|
||||
|
@ -448,6 +467,7 @@ nf.Common = {
|
|||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the mouse pointer.
|
||||
*
|
||||
|
@ -461,6 +481,7 @@ nf.Common = {
|
|||
$('#' + domId).removeClass('pointer');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Constants for time duration formatting.
|
||||
*/
|
||||
|
@ -468,6 +489,7 @@ nf.Common = {
|
|||
MILLIS_PER_HOUR: 3600000,
|
||||
MILLIS_PER_MINUTE: 60000,
|
||||
MILLIS_PER_SECOND: 1000,
|
||||
|
||||
/**
|
||||
* Formats the specified duration.
|
||||
*
|
||||
|
@ -515,6 +537,7 @@ nf.Common = {
|
|||
return time;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Constants for formatting data size.
|
||||
*/
|
||||
|
@ -522,6 +545,7 @@ nf.Common = {
|
|||
BYTES_IN_MEGABYTE: 1048576,
|
||||
BYTES_IN_GIGABYTE: 1073741824,
|
||||
BYTES_IN_TERABYTE: 1099511627776,
|
||||
|
||||
/**
|
||||
* Formats the specified number of bytes into a human readable string.
|
||||
*
|
||||
|
@ -556,6 +580,7 @@ nf.Common = {
|
|||
// default to bytes
|
||||
return parseFloat(dataSize).toFixed(2) + " bytes";
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified integer as a string (adding commas). At this
|
||||
* point this does not take into account any locales.
|
||||
|
@ -570,6 +595,7 @@ nf.Common = {
|
|||
}
|
||||
return string;
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified float using two demical places.
|
||||
*
|
||||
|
@ -581,6 +607,7 @@ nf.Common = {
|
|||
}
|
||||
return f.toFixed(2) + '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Pads the specified value to the specified width with the specified character.
|
||||
* If the specified value is already wider than the specified width, the original
|
||||
|
@ -601,6 +628,7 @@ nf.Common = {
|
|||
|
||||
return s;
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified DateTime.
|
||||
*
|
||||
|
@ -622,6 +650,7 @@ nf.Common = {
|
|||
'.' +
|
||||
nf.Common.pad(date.getMilliseconds(), 3, '0');
|
||||
},
|
||||
|
||||
/**
|
||||
* Parses the specified date time into a Date object. The resulting
|
||||
* object does not account for timezone and should only be used for
|
||||
|
@ -667,6 +696,7 @@ nf.Common = {
|
|||
return new Date(parseInt(date[2], 10), parseInt(date[0], 10), parseInt(date[1], 10), parseInt(time[0], 10), parseInt(time[1], 10), parseInt(time[2], 10), 0);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Parses the specified duration and returns the total number of millis.
|
||||
*
|
||||
|
@ -689,6 +719,7 @@ nf.Common = {
|
|||
return new Date(1970, 0, 1, parseInt(duration[0], 10), parseInt(duration[1], 10), parseInt(duration[2], 10), 0).getTime();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Parses the specified size.
|
||||
*
|
||||
|
@ -712,6 +743,7 @@ nf.Common = {
|
|||
return size;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Parses the specified count.
|
||||
*
|
||||
|
@ -736,6 +768,7 @@ nf.Common = {
|
|||
}
|
||||
return intCount;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified object is defined and not null.
|
||||
*
|
||||
|
@ -744,6 +777,7 @@ nf.Common = {
|
|||
isDefinedAndNotNull: function (obj) {
|
||||
return !nf.Common.isUndefined(obj) && !nf.Common.isNull(obj);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified object is undefined or null.
|
||||
*
|
||||
|
@ -752,6 +786,7 @@ nf.Common = {
|
|||
isUndefinedOrNull: function (obj) {
|
||||
return nf.Common.isUndefined(obj) || nf.Common.isNull(obj);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified object is undefined.
|
||||
*
|
||||
|
@ -760,6 +795,7 @@ nf.Common = {
|
|||
isUndefined: function (obj) {
|
||||
return typeof obj === 'undefined';
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether the specified string is blank (or null or undefined).
|
||||
*
|
||||
|
@ -768,6 +804,7 @@ nf.Common = {
|
|||
isBlank: function (str) {
|
||||
return nf.Common.isUndefined(str) || nf.Common.isNull(str) || $.trim(str) === '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified object is null.
|
||||
*
|
||||
|
@ -776,6 +813,7 @@ nf.Common = {
|
|||
isNull: function (obj) {
|
||||
return obj === null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if the specified array is empty. If the specified arg is not an
|
||||
* array, then true is returned.
|
||||
|
@ -785,6 +823,7 @@ nf.Common = {
|
|||
isEmpty: function (arr) {
|
||||
return $.isArray(arr) ? arr.length === 0 : true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if these are the same bulletins. If both arguments are not
|
||||
* arrays, false is returned.
|
||||
|
@ -809,6 +848,7 @@ nf.Common = {
|
|||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Formats the specified bulletin list.
|
||||
*
|
||||
|
|
|
@ -47,7 +47,7 @@ nf.ConnectionDetails = (function () {
|
|||
type: 'GET',
|
||||
url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(source.id),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processor = response.processor;
|
||||
var processorName = $('<div class="label"></div>').text(processor.name);
|
||||
var processorType = $('<div></div>').text(nf.Common.substringAfterLast(processor.type, '.'));
|
||||
|
@ -124,7 +124,7 @@ nf.ConnectionDetails = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processGroup = response.processGroup;
|
||||
|
||||
// populate source port details
|
||||
|
@ -133,7 +133,7 @@ nf.ConnectionDetails = (function () {
|
|||
$('#read-only-connection-source-group-name').text(processGroup.name);
|
||||
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ nf.ConnectionDetails = (function () {
|
|||
type: 'GET',
|
||||
url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(destination.id),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processor = response.processor;
|
||||
var processorName = $('<div class="label"></div>').text(processor.name);
|
||||
var processorType = $('<div></div>').text(nf.Common.substringAfterLast(processor.type, '.'));
|
||||
|
@ -183,7 +183,7 @@ nf.ConnectionDetails = (function () {
|
|||
$('#read-only-connection-target-group-name').text(groupName);
|
||||
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}).promise();
|
||||
|
@ -254,7 +254,7 @@ nf.ConnectionDetails = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processGroup = response.processGroup;
|
||||
|
||||
// populate destination port details
|
||||
|
@ -263,7 +263,7 @@ nf.ConnectionDetails = (function () {
|
|||
$('#read-only-connection-target-group-name').text(processGroup.name);
|
||||
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}
|
||||
|
@ -346,6 +346,7 @@ nf.ConnectionDetails = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the specified edge.
|
||||
*
|
||||
|
@ -368,7 +369,7 @@ nf.ConnectionDetails = (function () {
|
|||
});
|
||||
|
||||
// populate the dialog once get have all necessary details
|
||||
$.when(groupXhr, connectionXhr).then(function (groupResult, connectionResult) {
|
||||
$.when(groupXhr, connectionXhr).done(function (groupResult, connectionResult) {
|
||||
var groupResponse = groupResult[0];
|
||||
var connectionResponse = connectionResult[0];
|
||||
|
||||
|
@ -453,7 +454,7 @@ nf.ConnectionDetails = (function () {
|
|||
}
|
||||
});
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -78,6 +78,7 @@ nf.Dialog = (function () {
|
|||
// show the dialog
|
||||
$('#nf-ok-dialog').modal('setHeaderText', options.headerText).modal('setOverlayBackground', options.overlayBackground).modal('show');
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows an general dialog with Yes and No buttons populated with the
|
||||
* specified dialog content.
|
||||
|
|
|
@ -381,6 +381,7 @@ nf.ProcessorDetails = (function () {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the specified processor.
|
||||
*
|
||||
|
@ -508,7 +509,7 @@ nf.ProcessorDetails = (function () {
|
|||
});
|
||||
|
||||
// show the dialog once we have the processor and its history
|
||||
$.when(getProcessor, getProcessorHistory).then(function (response) {
|
||||
$.when(getProcessor, getProcessorHistory).done(function (response) {
|
||||
var processorResponse = response[0];
|
||||
var processor = processorResponse.processor;
|
||||
|
||||
|
@ -549,7 +550,7 @@ nf.ProcessorDetails = (function () {
|
|||
if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
|
||||
processorRelationships.css('border-width', '1px');
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: nf.Common.escapeHtml(xhr.responseText),
|
||||
|
|
|
@ -100,6 +100,7 @@ nf.Shell = (function () {
|
|||
});
|
||||
}).promise();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the specified content in the shell. When the shell is closed, the content
|
||||
* will be hidden and returned to its previous location in the dom.
|
||||
|
|
|
@ -1175,6 +1175,7 @@ nf.StatusHistory = (function () {
|
|||
instances = null;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified connection across the cluster.
|
||||
*
|
||||
|
@ -1187,10 +1188,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.clusterConnection + encodeURIComponent(connectionId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleClusteredStatusHistoryResponse(groupId, connectionId, response.clusterStatusHistory, config.type.connection, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified processor across the cluster.
|
||||
*
|
||||
|
@ -1203,10 +1205,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.clusterProcessor + encodeURIComponent(processorId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleClusteredStatusHistoryResponse(groupId, processorId, response.clusterStatusHistory, config.type.processor, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified process group across the cluster.
|
||||
*
|
||||
|
@ -1219,10 +1222,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.clusterProcessGroup + encodeURIComponent(processGroupId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleClusteredStatusHistoryResponse(groupId, processGroupId, response.clusterStatusHistory, config.type.processGroup, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified remote process group across the cluster.
|
||||
*
|
||||
|
@ -1235,10 +1239,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.clusterRemoteProcessGroup + encodeURIComponent(remoteProcessGroupId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleClusteredStatusHistoryResponse(groupId, remoteProcessGroupId, response.clusterStatusHistory, config.type.remoteProcessGroup, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified connection in this instance.
|
||||
*
|
||||
|
@ -1251,10 +1256,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.processGroups + encodeURIComponent(groupId) + '/connections/' + encodeURIComponent(connectionId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleStandaloneStatusHistoryResponse(groupId, connectionId, response.statusHistory, config.type.connection, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified processor in this instance.
|
||||
*
|
||||
|
@ -1267,10 +1273,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.processGroups + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(processorId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleStandaloneStatusHistoryResponse(groupId, processorId, response.statusHistory, config.type.processor, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified process group in this instance.
|
||||
*
|
||||
|
@ -1283,10 +1290,11 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.processGroups + encodeURIComponent(processGroupId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleStandaloneStatusHistoryResponse(groupId, processGroupId, response.statusHistory, config.type.processGroup, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the status history for the specified remote process group in this instance.
|
||||
*
|
||||
|
@ -1299,9 +1307,9 @@ nf.StatusHistory = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.processGroups + encodeURIComponent(groupId) + '/remote-process-groups/' + encodeURIComponent(remoteProcessGroupId) + '/status/history',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
handleStandaloneStatusHistoryResponse(groupId, remoteProcessGroupId, response.statusHistory, config.type.remoteProcessGroup, selectedDescriptor);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -864,12 +864,12 @@ nf.ProvenanceLineage = (function () {
|
|||
|
||||
// polls for the event lineage
|
||||
var pollLineage = function (nextDelay) {
|
||||
getLineage(lineage).then(function (response) {
|
||||
getLineage(lineage).done(function (response) {
|
||||
lineage = response.lineage;
|
||||
|
||||
// process the lineage, if its not done computing wait delay seconds before checking again
|
||||
processLineage(nextDelay);
|
||||
}, closeDialog);
|
||||
}).fail(closeDialog);
|
||||
};
|
||||
|
||||
// processes the event lineage
|
||||
|
@ -929,12 +929,12 @@ nf.ProvenanceLineage = (function () {
|
|||
};
|
||||
|
||||
// once the query is submitted wait until its finished
|
||||
submitLineage(lineageRequest).then(function (response) {
|
||||
submitLineage(lineageRequest).done(function (response) {
|
||||
lineage = response.lineage;
|
||||
|
||||
// process the lineage, if its not done computing wait 1 second before checking again
|
||||
processLineage(1);
|
||||
}, closeDialog);
|
||||
}).fail(closeDialog);
|
||||
};
|
||||
|
||||
// handles updating the lineage graph
|
||||
|
@ -1284,6 +1284,7 @@ nf.ProvenanceLineage = (function () {
|
|||
|
||||
initLineageQueryDialog();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the lineage for the specified flowfile uuid.
|
||||
*
|
||||
|
@ -1347,12 +1348,12 @@ nf.ProvenanceLineage = (function () {
|
|||
// polls the server for the status of the lineage, if the lineage is not
|
||||
// done wait nextDelay seconds before trying again
|
||||
var pollLineage = function (nextDelay) {
|
||||
getLineage(lineage).then(function (response) {
|
||||
getLineage(lineage).done(function (response) {
|
||||
lineage = response.lineage;
|
||||
|
||||
// process the lineage, if its not done computing wait delay seconds before checking again
|
||||
processLineage(nextDelay);
|
||||
}, closeDialog);
|
||||
}).fail(closeDialog);
|
||||
};
|
||||
|
||||
var processLineage = function (delay) {
|
||||
|
@ -1401,12 +1402,12 @@ nf.ProvenanceLineage = (function () {
|
|||
};
|
||||
|
||||
// once the query is submitted wait until its finished
|
||||
submitLineage(lineageRequest).then(function (response) {
|
||||
submitLineage(lineageRequest).done(function (response) {
|
||||
lineage = response.lineage;
|
||||
|
||||
// process the results, if they are not done wait 1 second before trying again
|
||||
processLineage(1);
|
||||
}, closeDialog);
|
||||
}).fail(closeDialog);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -49,15 +49,15 @@ nf.ProvenanceTable = (function () {
|
|||
var loadLineageCapabilities = function () {
|
||||
return $.Deferred(function (deferred) {
|
||||
if (nf.Common.SUPPORTS_SVG) {
|
||||
nf.Common.cachedScript(config.urls.d3Script).then(function () {
|
||||
nf.Common.cachedScript(config.urls.lineageScript).then(function () {
|
||||
nf.Common.cachedScript(config.urls.d3Script).done(function () {
|
||||
nf.Common.cachedScript(config.urls.lineageScript).done(function () {
|
||||
// initialize the lineage graph
|
||||
nf.ProvenanceLineage.init();
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
} else {
|
||||
|
@ -210,12 +210,12 @@ nf.ProvenanceTable = (function () {
|
|||
url: config.urls.replays,
|
||||
data: parameters,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
nf.Dialog.showOkDialog({
|
||||
dialogContent: 'Successfully submitted replay request.',
|
||||
overlayBackground: false
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
$('#event-details-dialog').modal('hide');
|
||||
});
|
||||
|
@ -294,7 +294,7 @@ nf.ProvenanceTable = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.cluster,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var cluster = response.cluster;
|
||||
var nodes = cluster.nodes;
|
||||
|
||||
|
@ -323,7 +323,7 @@ nf.ProvenanceTable = (function () {
|
|||
$('#provenance-search-location').combo({
|
||||
options: searchableOptions
|
||||
});
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// show the node search combo
|
||||
$('#provenance-search-location-container').show();
|
||||
|
@ -888,23 +888,26 @@ nf.ProvenanceTable = (function () {
|
|||
* The max delay between requests.
|
||||
*/
|
||||
MAX_DELAY: 4,
|
||||
|
||||
/**
|
||||
* The server time offset
|
||||
*/
|
||||
serverTimeOffset: null,
|
||||
|
||||
/**
|
||||
* Initializes the provenance table. Returns a deferred that will indicate when/if the table has initialized successfully.
|
||||
*
|
||||
* @param {boolean} isClustered Whether or not this instance is clustered
|
||||
*/
|
||||
init: function (isClustered) {
|
||||
return loadLineageCapabilities().then(function () {
|
||||
return loadLineageCapabilities().done(function () {
|
||||
initDetailsDialog();
|
||||
initProvenanceQueryDialog();
|
||||
initSearchDialog(isClustered);
|
||||
initProvenanceTable(isClustered);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Goes to the specified component if possible.
|
||||
*
|
||||
|
@ -929,6 +932,7 @@ nf.ProvenanceTable = (function () {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -938,6 +942,7 @@ nf.ProvenanceTable = (function () {
|
|||
provenanceGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the value of the specified progress bar.
|
||||
*
|
||||
|
@ -953,6 +958,7 @@ nf.ProvenanceTable = (function () {
|
|||
var label = $('<div class="progress-label"></div>').text(value + '%');
|
||||
progressBar.progressbar('value', value).append(label);
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads the provenance table with events according to the specified optional
|
||||
* query. If not query is specified or it is empty, the most recent entries will
|
||||
|
@ -1025,13 +1031,13 @@ nf.ProvenanceTable = (function () {
|
|||
// polls the server for the status of the provenance, if the provenance is not
|
||||
// done wait nextDelay seconds before trying again
|
||||
var pollProvenance = function (nextDelay) {
|
||||
getProvenance(provenance).then(function (response) {
|
||||
getProvenance(provenance).done(function (response) {
|
||||
// update the provenance
|
||||
provenance = response.provenance;
|
||||
|
||||
// process the provenance
|
||||
processProvenanceResponse(nextDelay);
|
||||
}, closeDialog);
|
||||
}).fail(closeDialog);
|
||||
};
|
||||
|
||||
// processes the provenance, if the provenance is not done wait delay
|
||||
|
@ -1079,14 +1085,15 @@ nf.ProvenanceTable = (function () {
|
|||
};
|
||||
|
||||
// once the query is submitted wait until its finished
|
||||
submitProvenance(query).then(function (response) {
|
||||
submitProvenance(query).done(function (response) {
|
||||
// update the provenance
|
||||
provenance = response.provenance;
|
||||
|
||||
// process the results, if they are not done wait 1 second before trying again
|
||||
processProvenanceResponse(1);
|
||||
}, closeDialog);
|
||||
}).fail(closeDialog);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the lineage for the event in the specified row.
|
||||
*
|
||||
|
@ -1100,6 +1107,7 @@ nf.ProvenanceTable = (function () {
|
|||
nf.ProvenanceLineage.showLineage(item.flowFileUuid, item.eventId.toString(), item.clusterNodeId);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the event details and shows the details dialog.
|
||||
*
|
||||
|
@ -1115,6 +1123,7 @@ nf.ProvenanceTable = (function () {
|
|||
nf.ProvenanceTable.showEventDetails(event);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the details for the specified action.
|
||||
*
|
||||
|
|
|
@ -47,10 +47,10 @@ nf.Provenance = (function () {
|
|||
$.ajax({
|
||||
type: 'HEAD',
|
||||
url: config.urls.cluster
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
isClustered = true;
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 404) {
|
||||
isClustered = false;
|
||||
deferred.resolve();
|
||||
|
@ -70,7 +70,7 @@ nf.Provenance = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.config,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var config = response.config;
|
||||
|
||||
// store the controller name
|
||||
|
@ -80,7 +80,7 @@ nf.Provenance = (function () {
|
|||
if (!nf.Common.isBlank(config.contentViewerUrl)) {
|
||||
$('#nifi-content-viewer-url').text(config.contentViewerUrl);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -92,7 +92,7 @@ nf.Provenance = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.authorities,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
|
||||
// record the users authorities
|
||||
nf.Common.setAuthorities(response.authorities);
|
||||
|
@ -100,7 +100,7 @@ nf.Provenance = (function () {
|
|||
} else {
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -124,7 +124,7 @@ nf.Provenance = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -156,7 +156,7 @@ nf.Provenance = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -188,14 +188,14 @@ nf.Provenance = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var provenanceTitle = aboutDetails.title + ' Data Provenance';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = provenanceTitle;
|
||||
$('#provenance-header-text').text(provenanceTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -45,7 +45,7 @@ nf.SummaryTable = (function () {
|
|||
var loadChartCapabilities = function () {
|
||||
return $.Deferred(function (deferred) {
|
||||
if (nf.Common.SUPPORTS_SVG) {
|
||||
nf.Common.cachedScript(config.urls.d3Script).then(function () {
|
||||
nf.Common.cachedScript(config.urls.d3Script).done(function () {
|
||||
// get the controller config to get the server offset
|
||||
var configRequest = $.ajax({
|
||||
type: 'GET',
|
||||
|
@ -54,17 +54,17 @@ nf.SummaryTable = (function () {
|
|||
});
|
||||
|
||||
// get the config details and load the chart script
|
||||
$.when(configRequest, nf.Common.cachedScript(config.urls.statusHistory)).then(function (response) {
|
||||
$.when(configRequest, nf.Common.cachedScript(config.urls.statusHistory)).done(function (response) {
|
||||
var configResponse = response[0];
|
||||
var configDetails = configResponse.config;
|
||||
|
||||
// initialize the chart
|
||||
nf.StatusHistory.init(configDetails.timeOffset);
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
} else {
|
||||
|
@ -1549,7 +1549,7 @@ nf.SummaryTable = (function () {
|
|||
type: 'GET',
|
||||
url: nf.SummaryTable.systemDiagnosticsUrl,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var systemDiagnostics = response.systemDiagnostics;
|
||||
|
||||
// heap
|
||||
|
@ -1588,7 +1588,7 @@ nf.SummaryTable = (function () {
|
|||
|
||||
// update the stats last refreshed timestamp
|
||||
$('#system-diagnostics-last-refreshed').text(systemDiagnostics.statsLastRefreshed);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1717,7 +1717,7 @@ nf.SummaryTable = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.clusterProcessorStatus)) {
|
||||
var clusterProcessorStatus = response.clusterProcessorStatus;
|
||||
|
||||
|
@ -1755,7 +1755,7 @@ nf.SummaryTable = (function () {
|
|||
// update the stats last refreshed timestamp
|
||||
$('#cluster-processor-summary-last-refreshed').text(clusterProcessorStatus.statsLastRefreshed);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1772,7 +1772,7 @@ nf.SummaryTable = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.clusterConnectionStatus)) {
|
||||
var clusterConnectionStatus = response.clusterConnectionStatus;
|
||||
|
||||
|
@ -1807,7 +1807,7 @@ nf.SummaryTable = (function () {
|
|||
// update the stats last refreshed timestamp
|
||||
$('#cluster-connection-summary-last-refreshed').text(clusterConnectionStatus.statsLastRefreshed);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1824,7 +1824,7 @@ nf.SummaryTable = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.clusterPortStatus)) {
|
||||
var clusterInputPortStatus = response.clusterPortStatus;
|
||||
|
||||
|
@ -1856,7 +1856,7 @@ nf.SummaryTable = (function () {
|
|||
// update the stats last refreshed timestamp
|
||||
$('#cluster-input-port-summary-last-refreshed').text(clusterInputPortStatus.statsLastRefreshed);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1873,7 +1873,7 @@ nf.SummaryTable = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.clusterPortStatus)) {
|
||||
var clusterOutputPortStatus = response.clusterPortStatus;
|
||||
|
||||
|
@ -1905,7 +1905,7 @@ nf.SummaryTable = (function () {
|
|||
// update the stats last refreshed timestamp
|
||||
$('#cluster-output-port-summary-last-refreshed').text(clusterOutputPortStatus.statsLastRefreshed);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1922,7 +1922,7 @@ nf.SummaryTable = (function () {
|
|||
verbose: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.clusterRemoteProcessGroupStatus)) {
|
||||
var clusterRemoteProcessGroupStatus = response.clusterRemoteProcessGroupStatus;
|
||||
|
||||
|
@ -1957,7 +1957,7 @@ nf.SummaryTable = (function () {
|
|||
// update the stats last refreshed timestamp
|
||||
$('#cluster-remote-process-group-summary-last-refreshed').text(clusterRemoteProcessGroupStatus.statsLastRefreshed);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -1965,10 +1965,12 @@ nf.SummaryTable = (function () {
|
|||
* URL for loading system diagnostics.
|
||||
*/
|
||||
systemDiagnosticsUrl: null,
|
||||
|
||||
/**
|
||||
* URL for loading the summary.
|
||||
*/
|
||||
url: null,
|
||||
|
||||
/**
|
||||
* Initializes the status table.
|
||||
*
|
||||
|
@ -1980,18 +1982,19 @@ nf.SummaryTable = (function () {
|
|||
nf.SummaryTable.systemDiagnosticsUrl = config.urls.systemDiagnostics;
|
||||
|
||||
return $.Deferred(function (deferred) {
|
||||
loadChartCapabilities().then(function () {
|
||||
loadChartCapabilities().done(function () {
|
||||
// initialize the processor/connection details dialog
|
||||
nf.ProcessorDetails.init(false);
|
||||
nf.ConnectionDetails.init(false);
|
||||
initSummaryTable(isClustered);
|
||||
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}).promise();
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -2021,6 +2024,7 @@ nf.SummaryTable = (function () {
|
|||
remoteProcessGroupGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load the processor status table.
|
||||
*/
|
||||
|
@ -2032,7 +2036,7 @@ nf.SummaryTable = (function () {
|
|||
recursive: true
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var processGroupStatus = response.processGroupStatus;
|
||||
|
||||
if (nf.Common.isDefinedAndNotNull(processGroupStatus)) {
|
||||
|
@ -2103,8 +2107,9 @@ nf.SummaryTable = (function () {
|
|||
} else {
|
||||
$('#total-items').text('0');
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
// processor actions
|
||||
|
||||
/**
|
||||
|
@ -2120,6 +2125,7 @@ nf.SummaryTable = (function () {
|
|||
nf.ProcessorDetails.showDetails(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Goes to the specified processor.
|
||||
*
|
||||
|
@ -2133,6 +2139,7 @@ nf.SummaryTable = (function () {
|
|||
goTo(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the processor status history for a cluster.
|
||||
*
|
||||
|
@ -2146,6 +2153,7 @@ nf.SummaryTable = (function () {
|
|||
nf.StatusHistory.showClusterProcessorChart(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the processor status history.
|
||||
*
|
||||
|
@ -2159,6 +2167,7 @@ nf.SummaryTable = (function () {
|
|||
nf.StatusHistory.showStandaloneProcessorChart(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the cluster processor details dialog for the specified processor.
|
||||
*
|
||||
|
@ -2180,6 +2189,7 @@ nf.SummaryTable = (function () {
|
|||
$('#cluster-processor-summary-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
// connection actions
|
||||
|
||||
/**
|
||||
|
@ -2195,6 +2205,7 @@ nf.SummaryTable = (function () {
|
|||
nf.ConnectionDetails.showDetails(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Goes to the specified connection.
|
||||
*
|
||||
|
@ -2208,6 +2219,7 @@ nf.SummaryTable = (function () {
|
|||
goTo(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the connection status history for a cluster.
|
||||
*
|
||||
|
@ -2221,6 +2233,7 @@ nf.SummaryTable = (function () {
|
|||
nf.StatusHistory.showClusterConnectionChart(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the connection status history.
|
||||
*
|
||||
|
@ -2234,6 +2247,7 @@ nf.SummaryTable = (function () {
|
|||
nf.StatusHistory.showStandaloneConnectionChart(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the cluster connection details dialog for the specified connection.
|
||||
*
|
||||
|
@ -2255,6 +2269,7 @@ nf.SummaryTable = (function () {
|
|||
$('#cluster-connection-summary-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
// input actions
|
||||
|
||||
/**
|
||||
|
@ -2270,6 +2285,7 @@ nf.SummaryTable = (function () {
|
|||
goTo(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the cluster input port details dialog for the specified connection.
|
||||
*
|
||||
|
@ -2291,6 +2307,7 @@ nf.SummaryTable = (function () {
|
|||
$('#cluster-input-port-summary-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
// output actions
|
||||
|
||||
/**
|
||||
|
@ -2306,6 +2323,7 @@ nf.SummaryTable = (function () {
|
|||
goTo(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the cluster output port details dialog for the specified connection.
|
||||
*
|
||||
|
@ -2327,6 +2345,7 @@ nf.SummaryTable = (function () {
|
|||
$('#cluster-output-port-summary-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
// remote process group actions
|
||||
|
||||
/**
|
||||
|
@ -2342,6 +2361,7 @@ nf.SummaryTable = (function () {
|
|||
goTo(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the remote process group status history for a cluster.
|
||||
*
|
||||
|
@ -2355,6 +2375,7 @@ nf.SummaryTable = (function () {
|
|||
nf.StatusHistory.showClusterRemoteProcessGroupChart(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the remote process group status history.
|
||||
*
|
||||
|
@ -2368,6 +2389,7 @@ nf.SummaryTable = (function () {
|
|||
nf.StatusHistory.showStandaloneRemoteProcessGroupChart(item.groupId, item.id);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the cluster remote process group details dialog for the specified connection.
|
||||
*
|
||||
|
|
|
@ -40,17 +40,17 @@ nf.Summary = (function () {
|
|||
$.ajax({
|
||||
type: 'HEAD',
|
||||
url: config.urls.cluster
|
||||
}).then(function () {
|
||||
nf.SummaryTable.init(true).then(function () {
|
||||
}).done(function () {
|
||||
nf.SummaryTable.init(true).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
if (xhr.status === 404) {
|
||||
nf.SummaryTable.init(false).then(function () {
|
||||
nf.SummaryTable.init(false).done(function () {
|
||||
deferred.resolve();
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
} else {
|
||||
|
@ -84,7 +84,7 @@ nf.Summary = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -116,7 +116,7 @@ nf.Summary = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -145,14 +145,14 @@ nf.Summary = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var statusTitle = aboutDetails.title + ' Summary';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = statusTitle;
|
||||
$('#status-header-text').text(statusTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
var setBodySize = function () {
|
||||
$('body').css({
|
||||
|
|
|
@ -63,11 +63,11 @@ nf.TemplatesTable = (function () {
|
|||
type: 'DELETE',
|
||||
url: config.urls.templates + '/' + encodeURIComponent(templateId),
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
var templatesGrid = $('#templates-table').data('gridInstance');
|
||||
var templatesData = templatesGrid.getData();
|
||||
templatesData.deleteItem(templateId);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -249,6 +249,7 @@ nf.TemplatesTable = (function () {
|
|||
// initialize the number of displayed items
|
||||
$('#displayed-templates').text('0');
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -258,6 +259,7 @@ nf.TemplatesTable = (function () {
|
|||
templateGrid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Exports the specified template.
|
||||
*
|
||||
|
@ -271,6 +273,7 @@ nf.TemplatesTable = (function () {
|
|||
nf.Common.submit('GET', config.urls.templates + '/' + encodeURIComponent(item.id));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Prompts the user before attempting to delete the specified template.
|
||||
*
|
||||
|
@ -292,6 +295,7 @@ nf.TemplatesTable = (function () {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load the processor templates table.
|
||||
*/
|
||||
|
@ -303,7 +307,7 @@ nf.TemplatesTable = (function () {
|
|||
verbose: false
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure there are groups specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.templates)) {
|
||||
var templatesGrid = $('#templates-table').data('gridInstance');
|
||||
|
@ -322,7 +326,7 @@ nf.TemplatesTable = (function () {
|
|||
} else {
|
||||
$('#total-templates').text('0');
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
};
|
||||
}());
|
|
@ -41,7 +41,7 @@ nf.Templates = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.authorities,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
|
||||
// record the users authorities
|
||||
nf.Common.setAuthorities(response.authorities);
|
||||
|
@ -49,7 +49,7 @@ nf.Templates = (function () {
|
|||
} else {
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -154,7 +154,7 @@ nf.Templates = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
|
||||
|
@ -186,7 +186,7 @@ nf.Templates = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -219,14 +219,14 @@ nf.Templates = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var templatesTitle = aboutDetails.title + ' Templates';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = templatesTitle;
|
||||
$('#templates-header-text').text(templatesTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -114,7 +114,7 @@ nf.UsersTable = (function () {
|
|||
data: JSON.stringify(userEntity),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.user)) {
|
||||
var user = response.user;
|
||||
|
||||
|
@ -123,7 +123,7 @@ nf.UsersTable = (function () {
|
|||
var usersData = usersGrid.getData();
|
||||
usersData.updateItem(user.id, user);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// hide the dialog
|
||||
$('#user-roles-dialog').modal('hide');
|
||||
|
@ -203,9 +203,9 @@ nf.UsersTable = (function () {
|
|||
data: JSON.stringify(userGroupEntity),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
nf.UsersTable.loadUsersTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// hide the dialog
|
||||
$('#group-roles-dialog').modal('hide');
|
||||
|
@ -244,9 +244,9 @@ nf.UsersTable = (function () {
|
|||
type: 'DELETE',
|
||||
url: config.urls.users + '/' + encodeURIComponent(userId),
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
nf.UsersTable.loadUsersTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// hide the dialog
|
||||
$('#user-delete-dialog').modal('hide');
|
||||
|
@ -291,7 +291,7 @@ nf.UsersTable = (function () {
|
|||
'status': 'DISABLED'
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.user)) {
|
||||
var user = response.user;
|
||||
|
||||
|
@ -300,7 +300,7 @@ nf.UsersTable = (function () {
|
|||
var usersData = usersGrid.getData();
|
||||
usersData.updateItem(user.id, user);
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// hide the dialog
|
||||
$('#user-revoke-dialog').modal('hide');
|
||||
|
@ -345,9 +345,9 @@ nf.UsersTable = (function () {
|
|||
'status': 'DISABLED'
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
nf.UsersTable.loadUsersTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
|
||||
// hide the dialog
|
||||
$('#group-revoke-dialog').modal('hide');
|
||||
|
@ -407,9 +407,9 @@ nf.UsersTable = (function () {
|
|||
data: JSON.stringify(userGroupEntity),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json'
|
||||
}).then(function () {
|
||||
}).done(function () {
|
||||
nf.UsersTable.loadUsersTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
|
||||
// hide the dialog
|
||||
|
@ -815,6 +815,7 @@ nf.UsersTable = (function () {
|
|||
initGroupRevokeDialog();
|
||||
initUsersTable();
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables the specified user's account.
|
||||
*
|
||||
|
@ -834,6 +835,7 @@ nf.UsersTable = (function () {
|
|||
$('#user-revoke-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete's the specified user's account.
|
||||
*
|
||||
|
@ -853,6 +855,7 @@ nf.UsersTable = (function () {
|
|||
$('#user-delete-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables the specified group's account.
|
||||
*
|
||||
|
@ -871,6 +874,7 @@ nf.UsersTable = (function () {
|
|||
$('#group-revoke-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the specified users's level of access.
|
||||
*
|
||||
|
@ -913,6 +917,7 @@ nf.UsersTable = (function () {
|
|||
$('#user-roles-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the specified groups level of access.
|
||||
*
|
||||
|
@ -931,6 +936,7 @@ nf.UsersTable = (function () {
|
|||
$('#group-roles-dialog').modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Prompts to verify group removal.
|
||||
*
|
||||
|
@ -951,13 +957,14 @@ nf.UsersTable = (function () {
|
|||
type: 'DELETE',
|
||||
url: config.urls.userGroups + '/' + encodeURIComponent(item.userGroup) + '/users/' + encodeURIComponent(item.id),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
nf.UsersTable.loadUsersTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Ungroups the specified group.
|
||||
*
|
||||
|
@ -978,13 +985,14 @@ nf.UsersTable = (function () {
|
|||
type: 'DELETE',
|
||||
url: config.urls.userGroups + '/' + encodeURIComponent(item.userGroup),
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
nf.UsersTable.loadUsersTable();
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the size of the grid based on its container's current size.
|
||||
*/
|
||||
|
@ -994,6 +1002,7 @@ nf.UsersTable = (function () {
|
|||
grid.resizeCanvas();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load the processor status table.
|
||||
*/
|
||||
|
@ -1005,7 +1014,7 @@ nf.UsersTable = (function () {
|
|||
'grouped': $('#group-collaspe-checkbox').hasClass('checkbox-checked')
|
||||
},
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
// ensure there are users
|
||||
if (nf.Common.isDefinedAndNotNull(response.users)) {
|
||||
var usersGrid = $('#users-table').data('gridInstance');
|
||||
|
@ -1027,8 +1036,9 @@ nf.UsersTable = (function () {
|
|||
} else {
|
||||
$('#total-users').text('0');
|
||||
}
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows details for the specified user.
|
||||
*
|
||||
|
|
|
@ -41,7 +41,7 @@ nf.Users = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.authorities,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
|
||||
// record the users authorities
|
||||
nf.Common.setAuthorities(response.authorities);
|
||||
|
@ -49,7 +49,7 @@ nf.Users = (function () {
|
|||
} else {
|
||||
deferred.reject();
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -69,7 +69,7 @@ nf.Users = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.banners,
|
||||
dataType: 'json'
|
||||
}).then(function (bannerResponse) {
|
||||
}).done(function (bannerResponse) {
|
||||
// ensure the banners response is specified
|
||||
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners)) {
|
||||
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners.headerText) && bannerResponse.banners.headerText !== '') {
|
||||
|
@ -101,7 +101,7 @@ nf.Users = (function () {
|
|||
}
|
||||
|
||||
deferred.resolve();
|
||||
}, function (xhr, status, error) {
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
deferred.reject();
|
||||
});
|
||||
|
@ -133,14 +133,14 @@ nf.Users = (function () {
|
|||
type: 'GET',
|
||||
url: config.urls.controllerAbout,
|
||||
dataType: 'json'
|
||||
}).then(function (response) {
|
||||
}).done(function (response) {
|
||||
var aboutDetails = response.about;
|
||||
var countersTitle = aboutDetails.title + ' Users';
|
||||
|
||||
// set the document title and the about title
|
||||
document.title = countersTitle;
|
||||
$('#users-header-text').text(countersTitle);
|
||||
}, nf.Common.handleAjaxError);
|
||||
}).fail(nf.Common.handleAjaxError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue