ui: finalize wizard modularization
This commit is contained in:
@@ -318,6 +318,8 @@
|
||||
updateStreamingConfigVisibility();
|
||||
},
|
||||
serializeStreamingConfig: serializeStreamingConfig,
|
||||
updateStreamingModeOptions: updateStreamingModeOptions,
|
||||
updateStreamingConfigVisibility: updateStreamingConfigVisibility,
|
||||
deserializeStreamingConfig: function(streaming) {
|
||||
if (typeof window.applyStreamingConfig === 'function') {
|
||||
window.applyStreamingConfig(streaming);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
var updateStreamingModeOptions = window.CrankStreamingForm.updateStreamingModeOptions;
|
||||
var updateStreamingConfigVisibility = window.CrankStreamingForm.updateStreamingConfigVisibility;
|
||||
|
||||
function buildToolDescription() {
|
||||
return {
|
||||
title: textValue('tool-title') || textValue('tool-display-name') || textValue('tool-name'),
|
||||
|
||||
@@ -53,10 +53,11 @@ function mappingRootForProtocol(protocol) {
|
||||
}
|
||||
|
||||
function normalizeInputSource(path) {
|
||||
if (!path) return '$.input';
|
||||
if (path === '$') return '$.input';
|
||||
if (path.indexOf('$.input') === 0) return path;
|
||||
return '$.input.' + path.replace(/^\$\./, '');
|
||||
if (!path) return '$.mcp';
|
||||
if (path === '$') return '$.mcp';
|
||||
if (path.indexOf('$.mcp') === 0) return path;
|
||||
if (path.indexOf('$.input') === 0) return '$.mcp' + path.slice('$.input'.length);
|
||||
return '$.mcp.' + path.replace(/^\$\./, '');
|
||||
}
|
||||
|
||||
function normalizeOutputSource(path) {
|
||||
|
||||
@@ -84,6 +84,7 @@ async function initWizardPage() {
|
||||
await (window.whenWorkspacesReady ? window.whenWorkspacesReady() : Promise.resolve());
|
||||
var workspace = window.getCurrentWorkspace ? window.getCurrentWorkspace() : null;
|
||||
wizardWorkspaceId = workspace ? workspace.id : null;
|
||||
window.wizardWorkspaceId = wizardWorkspaceId;
|
||||
await loadProtocolCapabilities();
|
||||
|
||||
await loadWizardPanels([1, 2, 3, 4, 5]);
|
||||
@@ -130,6 +131,8 @@ async function initWizardPage() {
|
||||
if (params.get('mode') === 'edit' && params.get('operationId')) {
|
||||
wizardMode = 'edit';
|
||||
wizardEditId = params.get('operationId');
|
||||
window.wizardMode = wizardMode;
|
||||
window.wizardEditId = wizardEditId;
|
||||
document.title = 'Crank — ' + tKey('wizard.progress.edit');
|
||||
await loadOperationForEdit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user