community: trim premium wizard surface
This commit is contained in:
@@ -83,7 +83,7 @@ function renderWorkspaceProtocolOptions(capabilities, selectedProtocol) {
|
||||
|
||||
var supportedProtocols = capabilities && Array.isArray(capabilities.supported_protocols) && capabilities.supported_protocols.length
|
||||
? capabilities.supported_protocols
|
||||
: ['rest', 'graphql', 'grpc'];
|
||||
: ['rest'];
|
||||
var fallbackProtocol = supportedProtocols.indexOf('rest') !== -1 ? 'rest' : supportedProtocols[0];
|
||||
var effectiveSelection = supportedProtocols.indexOf(selectedProtocol) !== -1
|
||||
? selectedProtocol
|
||||
|
||||
@@ -10,15 +10,11 @@
|
||||
}
|
||||
|
||||
function step3PanelId() {
|
||||
if (window.wizardProtocol === 'graphql') return 'step-panel-3-graphql';
|
||||
if (window.wizardProtocol === 'grpc') return 'step-panel-3-grpc';
|
||||
if (window.wizardProtocol === 'websocket') return 'step-panel-3-websocket';
|
||||
if (window.wizardProtocol === 'soap') return 'step-panel-3-soap';
|
||||
return 'step-panel-3-rest';
|
||||
}
|
||||
|
||||
function stepFile(step) {
|
||||
return step === 3 ? 'step3-' + window.wizardProtocol + '.html' : 'step' + step + '.html';
|
||||
return step === 3 ? 'step3-rest.html' : 'step' + step + '.html';
|
||||
}
|
||||
|
||||
function buildIconSvg(href, width, height) {
|
||||
@@ -186,27 +182,13 @@
|
||||
card.setAttribute('aria-checked', 'true');
|
||||
|
||||
var protocol = card.dataset.protocol
|
||||
|| (card.classList.contains('rest')
|
||||
? 'rest'
|
||||
: card.classList.contains('graphql')
|
||||
? 'graphql'
|
||||
: card.classList.contains('grpc')
|
||||
? 'grpc'
|
||||
: card.classList.contains('websocket')
|
||||
? 'websocket'
|
||||
: card.classList.contains('soap')
|
||||
? 'soap'
|
||||
: 'rest');
|
||||
|| 'rest';
|
||||
|
||||
window.wizardProtocol = protocol;
|
||||
var step3Name = document.getElementById('sidebar-step-3-name');
|
||||
var labels = window.CrankWizardState.step3Labels();
|
||||
if (step3Name) step3Name.textContent = labels[protocol] || tKey('wizard.step3.rest.label');
|
||||
|
||||
if (protocol === 'graphql') {
|
||||
var pathInput = document.getElementById('endpoint-path');
|
||||
if (pathInput && pathInput.value === '/v1/leads') pathInput.value = '/graphql';
|
||||
}
|
||||
});
|
||||
card.addEventListener('keydown', function(event) {
|
||||
if (event.key === 'Enter' || event.key === ' ') {
|
||||
@@ -220,7 +202,7 @@
|
||||
function applyEditionProtocolVisibility(capabilities) {
|
||||
var supported = capabilities && Array.isArray(capabilities.supported_protocols)
|
||||
? capabilities.supported_protocols.slice()
|
||||
: ['rest', 'graphql', 'grpc'];
|
||||
: ['rest'];
|
||||
var hiddenProtocols = [];
|
||||
|
||||
document.querySelectorAll('.protocol-card').forEach(function(card) {
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
wizardWorkspaceId: null,
|
||||
wizardCurrentOperation: null,
|
||||
wizardCurrentVersion: null,
|
||||
wizardProtoUpload: null,
|
||||
wizardDescriptorSetUpload: null,
|
||||
wizardSoapWsdlUpload: null,
|
||||
wizardSoapXsdUpload: null,
|
||||
wizardTestResponsePreview: null,
|
||||
grpcDescriptorServices: [],
|
||||
soapServiceCatalog: [],
|
||||
wizardProtocolCapabilities: null,
|
||||
wizardEditionCapabilities: null,
|
||||
wizardSecrets: [],
|
||||
@@ -50,29 +44,13 @@
|
||||
supports_execution_modes: ['unary'],
|
||||
supports_transport_behaviors: ['request_response'],
|
||||
},
|
||||
graphql: {
|
||||
supports_execution_modes: ['unary'],
|
||||
supports_transport_behaviors: ['request_response'],
|
||||
},
|
||||
grpc: {
|
||||
supports_execution_modes: ['unary'],
|
||||
supports_transport_behaviors: ['request_response'],
|
||||
},
|
||||
websocket: {
|
||||
supports_execution_modes: ['unary'],
|
||||
supports_transport_behaviors: ['request_response'],
|
||||
},
|
||||
soap: {
|
||||
supports_execution_modes: ['unary'],
|
||||
supports_transport_behaviors: ['request_response'],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function defaultEditionCapabilities() {
|
||||
return {
|
||||
edition: 'community',
|
||||
supported_protocols: ['rest', 'graphql', 'grpc'],
|
||||
supported_protocols: ['rest'],
|
||||
supported_security_levels: ['standard'],
|
||||
machine_access_modes: ['static_agent_key'],
|
||||
limits: {
|
||||
@@ -130,10 +108,6 @@
|
||||
function step3Labels() {
|
||||
return {
|
||||
rest: tKey('wizard.step3.rest.label'),
|
||||
graphql: tKey('wizard.step3.graphql.label'),
|
||||
grpc: tKey('wizard.step3.grpc.label'),
|
||||
websocket: tKey('wizard.step3.websocket.label'),
|
||||
soap: tKey('wizard.step3.soap.label'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user