Remove enterprise leftovers from community
CI / Rust Checks (push) Failing after 2m6s
CI / UI Checks (push) Has been skipped
CI / Frontend E2E (push) Has been skipped
CI / Deployment Manifests (push) Has been skipped
Deploy / deploy (push) Successful in 2m26s

This commit is contained in:
github-ops
2026-06-20 12:04:46 +00:00
parent 5f8c208409
commit 0af60b1693
46 changed files with 46 additions and 7096 deletions
-3
View File
@@ -319,9 +319,6 @@
getUsageOverview: function(workspaceId, params) {
return get('/workspaces/' + encodeURIComponent(workspaceId) + '/usage' + query(params));
},
getProtocolCapabilities: function(workspaceId) {
return get('/workspaces/' + encodeURIComponent(workspaceId) + '/protocol-capabilities');
},
getOperationUsage: function(workspaceId, operationId, params) {
return get(
'/workspaces/' + encodeURIComponent(workspaceId) + '/usage/operations/' + encodeURIComponent(operationId) + query(params)
-134
View File
@@ -371,16 +371,10 @@ var TRANSLATIONS = {
'settings.security.saved': 'Password updated.',
'settings.security.save_error': 'Failed to change password',
'settings.capability.rest': 'REST / HTTP',
'settings.capability.graphql': 'GraphQL',
'settings.capability.grpc': 'gRPC unary',
'settings.capability.websocket': 'WebSocket',
'settings.capability.soap': 'SOAP',
'settings.capability.standard': 'standard',
'settings.capability.elevated': 'elevated',
'settings.capability.strict': 'strict',
'settings.capability.static_agent_key': 'static agent keys',
'settings.capability.short_lived_token': 'short-lived tokens',
'settings.capability.one_time_token': 'one-time tokens',
'settings.capability.unlimited': 'unlimited',
'settings.capability.none': 'none',
'settings.session.title': 'Current session',
@@ -431,10 +425,6 @@ var TRANSLATIONS = {
'workspace.switch_error': 'Failed to switch workspace',
'workspace.switch_error_title': 'Workspace switch failed',
'workspace_setup.custom_protocol.rest': 'REST',
'workspace_setup.custom_protocol.graphql': 'GraphQL',
'workspace_setup.custom_protocol.grpc': 'gRPC',
'workspace_setup.custom_protocol.websocket': 'WebSocket',
'workspace_setup.custom_protocol.soap': 'SOAP',
// Wizard
'wizard.back_catalog': 'Operations',
@@ -465,23 +455,13 @@ var TRANSLATIONS = {
'wizard.step1.subtitle': 'Select the transport protocol your upstream service uses. This determines how Crank will communicate with your API and which configuration options are available in subsequent steps.',
'wizard.step1.rest_name': 'REST / HTTP',
'wizard.step1.rest_tagline': 'Standard HTTP verbs over a RESTful endpoint. The most broadly supported option.',
'wizard.step1.graphql_name': 'GraphQL',
'wizard.step1.graphql_tagline': 'Query and mutate a GraphQL schema. Supports queries and mutations over one fixed operation.',
'wizard.step1.grpc_name': 'gRPC',
'wizard.step1.grpc_tagline': 'High-performance binary RPC over HTTP/2 for unary calls to low-latency internal services.',
'wizard.step1.websocket_name': 'WebSocket',
'wizard.step1.websocket_tagline': 'Stateful event streams and push-oriented integrations normalized into bounded MCP streaming tools.',
'wizard.step1.soap_name': 'SOAP',
'wizard.step1.soap_tagline': 'Enterprise WSDL/XSD service contracts normalized into MCP tools with structured XML mapping.',
'wizard.step1.query': 'Query',
'wizard.step1.mutation': 'Mutation',
'wizard.step1.unary': 'Unary',
'wizard.step1.tip_title': 'You can change this later',
'wizard.step1.tip_body': 'Switching protocol after configuring subsequent steps will clear schema and mapping data. Save your operation as a draft before experimenting. See protocol migration guide for details.',
'wizard.step1.community_protocol_title': 'Community protocol scope',
'wizard.step1.community_protocol_note': 'This Community build hides {protocols}. Commercial editions unlock those protocol surfaces.',
'wizard.step5.streaming_title': 'Streaming execution in Community',
'wizard.step5.community_streaming_note': 'This Community build keeps operations in unary mode. Window, session and async job tool families require a commercial edition.',
'wizard.step2.title': 'Select upstream & endpoint',
'wizard.step2.subtitle': 'Choose an existing upstream or register a new one. Then define the specific endpoint path this operation will call.',
'wizard.required': 'Required',
@@ -537,7 +517,6 @@ var TRANSLATIONS = {
'wizard.step2.path_template': 'Path template',
'wizard.step2.path_hint': 'Appended to the API host Base URL. Use {param} for path parameters.',
'wizard.step3.rest.label': 'Request config',
'wizard.step3.graphql.label': 'GQL operation',
'wizard.step3.rest.title': 'HTTP method & format',
'wizard.step3.rest.subtitle': 'Choose the HTTP method and request format. Crank converts MCP tool parameters into the API request body.',
'wizard.step3.rest.method_title': 'HTTP method',
@@ -553,16 +532,6 @@ var TRANSLATIONS = {
'wizard.step3.rest.content_type_hint': 'How the request body is encoded before sending it to the API.',
'wizard.step3.rest.accept': 'Accept',
'wizard.step3.rest.accept_hint': 'Response types accepted from the API server.',
'wizard.step3.graphql.title': 'GraphQL operation',
'wizard.step3.graphql.subtitle': 'Define the GraphQL operation this tool will execute. All requests are sent as HTTP POST to the endpoint configured in the previous step. Variables are populated from MCP tool arguments at runtime.',
'wizard.step3.graphql.type_title': 'Operation type',
'wizard.step3.graphql.type_subtitle': 'GraphQL operation kind — subscriptions are not supported',
'wizard.step3.graphql.query_desc': 'Fetch data without side-effects',
'wizard.step3.graphql.mutation_desc': 'Create, update or delete data',
'wizard.step3.graphql.doc_title': 'Query document',
'wizard.step3.graphql.doc_subtitle': 'GraphQL document with typed variable declarations',
'wizard.step3.graphql.variables_title': 'Variables are mapped in step 5',
'wizard.step3.graphql.variables_body': 'Declare all variables in the query document using the $variable: Type syntax. In step 5 you will map MCP input fields to these variables. Crank serializes the final {"query","variables"} payload automatically.',
'wizard.step4.title': 'Tool config',
'wizard.step4.subtitle': 'Name your tool, write the LLM-facing description, and define the input/output schemas. The description is the primary signal the model uses when deciding whether to call this tool.',
'wizard.step4.identity_title': 'Tool parameters',
@@ -679,23 +648,6 @@ var TRANSLATIONS = {
'wizard.test.window_truncated_note': 'Results were truncated.',
'wizard.test.window_more_note': 'More data is available if you continue from the streaming views.',
'wizard.test.window_incomplete_note': 'The upstream stream ended before the configured window was fully collected.',
'wizard.test.websocket_window_completed': 'WebSocket window test completed',
'wizard.test.websocket_window_completed_body': 'Collected {items} WebSocket event(s) inside the bounded test window.',
'wizard.test.websocket_window_truncated_note': 'The bounded window stopped after reaching the configured item or byte limit.',
'wizard.test.websocket_window_more_note': 'The socket produced more events than this test window retained. Increase limits or switch to session mode if you need a longer stream.',
'wizard.test.websocket_window_incomplete_note': 'The upstream socket closed before the bounded window finished collecting all configured events.',
'wizard.test.websocket_session_started': 'WebSocket session test started',
'wizard.test.websocket_session_started_body': 'WebSocket session {session_id} was created. Continue from Stream sessions after a short delay.',
'wizard.test.websocket_async_job_started': 'WebSocket async job test started',
'wizard.test.websocket_async_job_started_body': 'WebSocket async job {job_id} was created. Continue from the async jobs view for status and result.',
'wizard.test.websocket_failed': 'WebSocket test returned errors',
'wizard.test.websocket_failed_body': 'The socket test failed before Crank could collect a bounded result window.',
'wizard.test.websocket_failed_reconnect_body': 'The upstream socket closed before enough events were collected, and the configured reconnect policy was exhausted.',
'wizard.test.websocket_failed_closed_body': 'The upstream socket closed before the bounded test window completed.',
'wizard.test.session_started': 'Session test started',
'wizard.test.session_started_body': 'Session {session_id} was created. Check Stream sessions in a few seconds.',
'wizard.test.async_job_started': 'Async job test started',
'wizard.test.async_job_started_body': 'Async job {job_id} was created. Track status and result from the async jobs view.',
'wizard.test.no_response': 'No test response yet',
'wizard.test.no_response_body': 'Run a test first, then copy the response into the output example.',
'wizard.test.response_copied': 'Response copied',
@@ -712,18 +664,6 @@ var TRANSLATIONS = {
'wizard.yaml.loaded_body': 'The YAML configuration was loaded.',
'wizard.publish.done': 'Operation published',
'wizard.publish.done_body': 'Version {version} is now published and can be bound into agents.',
'wizard.grpc.discovery_title': 'gRPC discovery moved to live descriptor flow',
'wizard.grpc.discovery_body': 'Server reflection is not wired in this deployment. Save the draft, then use the descriptor-set tools in Step 5 to upload a real descriptor set and discover unary methods from the backend.',
'wizard.grpc.no_methods': 'No unary RPC methods found.',
'wizard.grpc.fields_unresolved': 'Fields not resolved.',
'wizard.grpc.fields_unresolved_body': 'Import or external types are not expanded client-side.',
'wizard.grpc.services_found': 'Found {services_label} and {methods_label}.',
'wizard.grpc.services_label.one': '{count} service',
'wizard.grpc.services_label.other': '{count} services',
'wizard.grpc.methods_label.one': '{count} unary method',
'wizard.grpc.methods_label.other': '{count} unary methods',
'wizard.grpc.services_discovered': '{services} services · {methods} unary methods discovered',
'wizard.grpc.services_none': 'No unary methods discovered yet',
// Common buttons
'btn.save': 'Save changes',
@@ -827,15 +767,10 @@ var TRANSLATIONS = {
// Demo content
'demo.agent.revops-copilot.display_name': 'RevOps Copilot',
'demo.agent.revops-copilot.description': 'Revenue operations assistant with CRM and billing tools.',
'demo.agent.support-triage.display_name': 'Support Triage',
'demo.agent.support-triage.description': 'Draft support agent focused on unary gRPC workflows.',
'demo.operation.crm_create_lead.display_name': 'Create CRM Lead',
'demo.operation.crm_create_lead.description': 'Create a lead record in the CRM system.',
'demo.operation.billing_get_invoice.display_name': 'Get Invoice Status',
'demo.operation.billing_get_invoice.description': 'Fetch invoice state and amount from billing.',
'demo.operation.support_lookup_ticket.display_name': 'Lookup Support Ticket',
'demo.operation.support_lookup_ticket.description': 'Draft unary gRPC support lookup using a descriptor set.',
'demo.operation.marketing_archive_contact.display_name': 'Archive Marketing Contact',
'demo.operation.marketing_archive_contact.description': 'Legacy archived flow kept for audit only.',
@@ -1222,16 +1157,10 @@ var TRANSLATIONS = {
'settings.security.saved': 'Пароль обновлен.',
'settings.security.save_error': 'Не удалось изменить пароль',
'settings.capability.rest': 'REST / HTTP',
'settings.capability.graphql': 'GraphQL',
'settings.capability.grpc': 'gRPC unary',
'settings.capability.websocket': 'WebSocket',
'settings.capability.soap': 'SOAP',
'settings.capability.standard': 'standard',
'settings.capability.elevated': 'elevated',
'settings.capability.strict': 'strict',
'settings.capability.static_agent_key': 'статические ключи агентов',
'settings.capability.short_lived_token': 'короткоживущие токены',
'settings.capability.one_time_token': 'одноразовые токены',
'settings.capability.unlimited': 'без лимита',
'settings.capability.none': 'нет',
'settings.session.title': 'Текущая сессия',
@@ -1282,10 +1211,6 @@ var TRANSLATIONS = {
'workspace.switch_error': 'Не удалось переключить воркспейс',
'workspace.switch_error_title': 'Не удалось переключить воркспейс',
'workspace_setup.custom_protocol.rest': 'REST',
'workspace_setup.custom_protocol.graphql': 'GraphQL',
'workspace_setup.custom_protocol.grpc': 'gRPC',
'workspace_setup.custom_protocol.websocket': 'WebSocket',
'workspace_setup.custom_protocol.soap': 'SOAP',
// Wizard
'wizard.back_catalog': 'Операции',
@@ -1316,23 +1241,13 @@ var TRANSLATIONS = {
'wizard.step1.subtitle': 'Выберите протокол вашего API. От этого зависит, как Crank будет выполнять запросы и какие настройки будут доступны на следующих шагах.',
'wizard.step1.rest_name': 'REST / HTTP',
'wizard.step1.rest_tagline': 'Стандартные HTTP-методы для REST API. Самый универсальный вариант.',
'wizard.step1.graphql_name': 'GraphQL',
'wizard.step1.graphql_tagline': 'Операции по GraphQL-схеме. Поддерживаются Query и Mutation для одной фиксированной операции.',
'wizard.step1.grpc_name': 'gRPC',
'wizard.step1.grpc_tagline': 'Бинарный RPC поверх HTTP/2 для быстрых внутренних сервисов.',
'wizard.step1.websocket_name': 'WebSocket',
'wizard.step1.websocket_tagline': 'Долгие соединения и потоковые события, оформленные как MCP инструменты.',
'wizard.step1.soap_name': 'SOAP',
'wizard.step1.soap_tagline': 'SOAP-сервисы по WSDL/XSD, оформленные как MCP инструменты.',
'wizard.step1.query': 'Query',
'wizard.step1.mutation': 'Mutation',
'wizard.step1.unary': 'Unary',
'wizard.step1.tip_title': 'Это можно изменить позже',
'wizard.step1.tip_body': 'Если сменить протокол после настройки следующих шагов, схемы и связи полей будут очищены. Перед экспериментами сохраните операцию.',
'wizard.step1.community_protocol_title': 'Граница протоколов Community',
'wizard.step1.community_protocol_note': 'Ограничение Community версии. В редакции Community протоколы {protocols} недоступны. Если вы заинтересованы в работе с данными протоколами, обратитесь к разработчикам для приобретения коммерческой версии или воспользуйтесь облачным решением.',
'wizard.step5.streaming_title': 'Потоковое выполнение',
'wizard.step5.community_streaming_note': 'В Community операции выполняются в обычном режиме запрос-ответ. Потоковые сценарии, сессии и фоновые задания требуют коммерческую редакцию.',
'wizard.step2.title': 'Выберите API-хост и путь',
'wizard.step2.subtitle': 'Выберите существующий API-хост или добавьте новый. Затем задайте путь, который будет вызывать эта операция.',
'wizard.required': 'Обязательно',
@@ -1388,7 +1303,6 @@ var TRANSLATIONS = {
'wizard.step2.path_template': 'Шаблон пути',
'wizard.step2.path_hint': 'Добавляется к базовому URL API-хоста. Используйте {param} для параметров пути.',
'wizard.step3.rest.label': 'Настройки запроса',
'wizard.step3.graphql.label': 'GQL операция',
'wizard.step3.rest.title': 'HTTP метод и формат',
'wizard.step3.rest.subtitle': 'Выберите HTTP-метод и формат запроса. Crank подставит параметры MCP инструмента в запрос к API.',
'wizard.step3.rest.method_title': 'HTTP метод',
@@ -1404,16 +1318,6 @@ var TRANSLATIONS = {
'wizard.step3.rest.content_type_hint': 'В каком формате отправлять данные в API.',
'wizard.step3.rest.accept': 'Accept',
'wizard.step3.rest.accept_hint': 'Какой формат ответа ожидать от API.',
'wizard.step3.graphql.title': 'GraphQL операция',
'wizard.step3.graphql.subtitle': 'Определите GraphQL-операцию, которую будет выполнять этот инструмент. Все запросы отправляются как HTTP POST на путь, настроенный на предыдущем шаге. Переменные заполняются из аргументов MCP инструмента во время выполнения.',
'wizard.step3.graphql.type_title': 'Тип операции',
'wizard.step3.graphql.type_subtitle': 'Вид GraphQL-операции. Подписки не поддерживаются.',
'wizard.step3.graphql.query_desc': 'Получение данных без побочных эффектов',
'wizard.step3.graphql.mutation_desc': 'Создание, изменение или удаление данных',
'wizard.step3.graphql.doc_title': 'Документ запроса',
'wizard.step3.graphql.doc_subtitle': 'GraphQL-документ с типизированными объявлениями переменных',
'wizard.step3.graphql.variables_title': 'Переменные связываются на шаге 5',
'wizard.step3.graphql.variables_body': 'Объявите все переменные в документе запроса в формате $variable: Type. На шаге 5 вы свяжете поля MCP инструмента с этими переменными.',
'wizard.step4.title': 'Настройки инструмента',
'wizard.step4.subtitle': 'Задайте имя инструмента, описание для LLM и определите входную/выходную схему. Описание — главный сигнал, по которому модель решает, вызывать ли этот инструмент.',
'wizard.step4.identity_title': 'Параметры инструмента',
@@ -1530,23 +1434,6 @@ var TRANSLATIONS = {
'wizard.test.window_truncated_note': 'Результат был усечен.',
'wizard.test.window_more_note': 'Доступно продолжение, если перейти к streaming-представлениям.',
'wizard.test.window_incomplete_note': 'Upstream-поток завершился раньше, чем удалось собрать всё окно.',
'wizard.test.websocket_window_completed': 'WebSocket оконный тест завершен',
'wizard.test.websocket_window_completed_body': 'В пределах ограниченного тестового окна собрано {items} WebSocket event(s).',
'wizard.test.websocket_window_truncated_note': 'Ограниченное окно остановилось после достижения лимита по элементам или байтам.',
'wizard.test.websocket_window_more_note': 'Сокет выдал больше событий, чем сохранило это тестовое окно. Увеличьте лимиты или переключитесь в session mode, если нужен более длинный поток.',
'wizard.test.websocket_window_incomplete_note': 'Upstream WebSocket закрылся до того, как bounded окно успело собрать все настроенные события.',
'wizard.test.websocket_session_started': 'WebSocket session-тест запущен',
'wizard.test.websocket_session_started_body': 'WebSocket session {session_id} создана. Продолжайте в разделе Stream sessions через короткую паузу.',
'wizard.test.websocket_async_job_started': 'WebSocket async job тест запущен',
'wizard.test.websocket_async_job_started_body': 'Создан WebSocket async job {job_id}. Дальше отслеживайте статус и результат в представлении async jobs.',
'wizard.test.websocket_failed': 'WebSocket тест завершился с ошибками',
'wizard.test.websocket_failed_body': 'Тест сокета завершился до того, как Crank успел собрать bounded result window.',
'wizard.test.websocket_failed_reconnect_body': 'Upstream WebSocket закрылся раньше, чем удалось собрать достаточно событий, и настроенная reconnect policy была исчерпана.',
'wizard.test.websocket_failed_closed_body': 'Upstream WebSocket закрылся до завершения bounded test window.',
'wizard.test.session_started': 'Session-тест запущен',
'wizard.test.session_started_body': 'Сессия {session_id} создана. Проверьте статус в разделе Stream sessions через несколько секунд.',
'wizard.test.async_job_started': 'Async job тест запущен',
'wizard.test.async_job_started_body': 'Создан async job {job_id}. Отслеживайте статус и результат через представление async jobs.',
'wizard.test.no_response': 'Тестового ответа пока нет',
'wizard.test.no_response_body': 'Сначала выполните тест, затем скопируйте ответ в выходной пример.',
'wizard.test.response_copied': 'Ответ скопирован',
@@ -1563,22 +1450,6 @@ var TRANSLATIONS = {
'wizard.yaml.loaded_body': 'YAML-конфигурация загружена.',
'wizard.publish.done': 'Операция опубликована',
'wizard.publish.done_body': 'Версия {version} опубликована и теперь может быть привязана к агентам.',
'wizard.grpc.discovery_title': 'gRPC discovery переведен в live descriptor flow',
'wizard.grpc.discovery_body': 'Server reflection в этом развертывании не подключен. Сохраните операцию и используйте descriptor set на шаге 5, чтобы загрузить описание сервиса и открыть unary methods.',
'wizard.grpc.no_methods': 'Unary RPC methods не найдены.',
'wizard.grpc.fields_unresolved': 'Поля не разрешены.',
'wizard.grpc.fields_unresolved_body': 'Import-ы или внешние типы не разворачиваются на стороне клиента.',
'wizard.grpc.services_found': 'Найдено {services_label} и {methods_label}.',
'wizard.grpc.services_label.one': '{count} сервис',
'wizard.grpc.services_label.few': '{count} сервиса',
'wizard.grpc.services_label.many': '{count} сервисов',
'wizard.grpc.services_label.other': '{count} сервиса',
'wizard.grpc.methods_label.one': '{count} unary-метод',
'wizard.grpc.methods_label.few': '{count} unary-метода',
'wizard.grpc.methods_label.many': '{count} unary-методов',
'wizard.grpc.methods_label.other': '{count} unary-метода',
'wizard.grpc.services_discovered': 'Сервисов открыто: {services} · unary методов: {methods}',
'wizard.grpc.services_none': 'Unary methods пока не открыты',
// Common buttons
'btn.save': 'Сохранить',
@@ -1682,15 +1553,10 @@ var TRANSLATIONS = {
// Demo content
'demo.agent.revops-copilot.display_name': 'Помощник RevOps',
'demo.agent.revops-copilot.description': 'Ассистент Revenue Operations с CRM- и billing-инструментами.',
'demo.agent.support-triage.display_name': 'Триаж поддержки',
'demo.agent.support-triage.description': 'Черновой агент поддержки, сфокусированный на unary gRPC-сценариях.',
'demo.operation.crm_create_lead.display_name': 'Создать CRM-лид',
'demo.operation.crm_create_lead.description': 'Создает запись лида в CRM-системе.',
'demo.operation.billing_get_invoice.display_name': 'Статус инвойса',
'demo.operation.billing_get_invoice.description': 'Получает состояние и сумму инвойса из billing-системы.',
'demo.operation.support_lookup_ticket.display_name': 'Найти тикет поддержки',
'demo.operation.support_lookup_ticket.description': 'Черновой unary gRPC lookup поддержки через descriptor set.',
'demo.operation.marketing_archive_contact.display_name': 'Архивировать маркетинговый контакт',
'demo.operation.marketing_archive_contact.description': 'Устаревший архивный сценарий, оставленный только для аудита.',
+1 -11
View File
@@ -1,15 +1,5 @@
(function() {
var allowedSlots = {
'settings.sso_panel': true,
'settings.totp_panel': true,
'settings.audit_panel': true,
'settings.billing_panel': true,
'wizard.protocol_cards.graphql': true,
'wizard.protocol_cards.grpc': true,
'wizard.protocol_cards.soap': true,
'wizard.protocol_cards.websocket': true,
};
var allowedSlots = {};
var handlers = Object.create(null);
function noop() {}
-2
View File
@@ -53,8 +53,6 @@ var REQUEST_MAPPING_TARGET_PREFIXES = [
'query',
'headers',
'body',
'variables',
'grpc',
];
function normalizeInputSource(path) {
+8 -45
View File
@@ -208,56 +208,19 @@
});
}
function applyEditionProtocolVisibility(capabilities) {
var supported = capabilities && Array.isArray(capabilities.supported_protocols)
? capabilities.supported_protocols.slice()
: ['rest'];
var knownProtocols = ['rest', 'graphql', 'grpc', 'websocket', 'soap'];
function applyEditionProtocolVisibility(_capabilities) {
window.wizardProtocol = 'rest';
document.querySelectorAll('.protocol-card').forEach(function(card) {
var protocol = card.dataset.protocol || 'rest';
var isSupported = supported.indexOf(protocol) >= 0;
card.hidden = !isSupported;
card.setAttribute('aria-disabled', isSupported ? 'false' : 'true');
if (!isSupported) {
card.classList.remove('selected');
card.setAttribute('aria-checked', 'false');
}
var isRest = (card.dataset.protocol || 'rest') === 'rest';
card.hidden = !isRest;
card.setAttribute('aria-disabled', isRest ? 'false' : 'true');
card.classList.toggle('selected', isRest);
card.setAttribute('aria-checked', isRest ? 'true' : 'false');
});
var hiddenProtocols = knownProtocols.filter(function(protocol) {
return supported.indexOf(protocol) === -1;
});
if (supported.indexOf(window.wizardProtocol) === -1) {
window.wizardProtocol = supported[0] || 'rest';
}
var selectedCard = document.querySelector('.protocol-card[data-protocol="' + window.wizardProtocol + '"]');
if (selectedCard) {
selectedCard.classList.add('selected');
selectedCard.setAttribute('aria-checked', 'true');
}
var step3Name = document.getElementById('sidebar-step-3-name');
var labels = window.CrankWizardState.step3Labels();
if (step3Name) {
step3Name.textContent = labels[window.wizardProtocol] || tKey('wizard.step3.rest.label');
}
var note = document.getElementById('wizard-edition-protocol-note');
var noteText = document.getElementById('wizard-edition-protocol-note-text');
if (note && noteText) {
if (hiddenProtocols.length) {
note.hidden = false;
noteText.textContent = tfKey('wizard.step1.community_protocol_note', {
protocols: hiddenProtocols.map(function(protocol) {
return tKey('settings.capability.' + protocol);
}).join(', ')
});
} else {
note.hidden = true;
}
step3Name.textContent = tKey('wizard.step3.rest.label');
}
}
+1 -18
View File
@@ -18,8 +18,6 @@
wizardAuthProfiles: [],
selectedUpstreamId: null,
editingUpstreamId: null,
protoParsed: null,
selectedRpcMethod: null,
};
Object.keys(defaults).forEach(function(key) {
@@ -71,22 +69,7 @@
}
async function loadProtocolCapabilities() {
if (!window.wizardWorkspaceId || !window.CrankApi || typeof window.CrankApi.getProtocolCapabilities !== 'function') {
window.wizardProtocolCapabilities = defaultProtocolCapabilities();
return window.wizardProtocolCapabilities;
}
try {
var response = await window.CrankApi.getProtocolCapabilities(window.wizardWorkspaceId);
var mapped = {};
(response.items || []).forEach(function(item) {
mapped[item.protocol] = item;
});
window.wizardProtocolCapabilities = mapped;
} catch (_error) {
window.wizardProtocolCapabilities = defaultProtocolCapabilities();
}
window.wizardProtocolCapabilities = defaultProtocolCapabilities();
return window.wizardProtocolCapabilities;
}
-22
View File
@@ -26,18 +26,12 @@ var wizardEditId = window.wizardEditId;
var wizardWorkspaceId = window.wizardWorkspaceId;
var wizardCurrentOperation = window.wizardCurrentOperation;
var wizardCurrentVersion = window.wizardCurrentVersion;
var wizardProtoUpload = window.wizardProtoUpload;
var wizardDescriptorSetUpload = window.wizardDescriptorSetUpload;
var wizardSoapWsdlUpload = window.wizardSoapWsdlUpload;
var wizardSoapXsdUpload = window.wizardSoapXsdUpload;
var wizardTestResponsePreview = window.wizardTestResponsePreview;
var wizardProtocolCapabilities = window.wizardProtocolCapabilities;
var wizardSecrets = window.wizardSecrets;
var wizardAuthProfiles = window.wizardAuthProfiles;
var selectedUpstreamId = window.selectedUpstreamId;
var editingUpstreamId = window.editingUpstreamId;
var protoParsed = window.protoParsed;
var selectedRpcMethod = window.selectedRpcMethod;
async function initWizardPage() {
renderSidebarBrand('create');
@@ -252,22 +246,6 @@ function selectMethod(btn) {
}
}
/* ── GraphQL operation type picker (Step 4 GraphQL) ── */
function selectGqlType(btn) {
document.querySelectorAll('.gql-type-card').forEach(function(b) { b.classList.remove('active'); });
btn.classList.add('active');
// Update query editor placeholder if it's still the default
var editor = document.getElementById('gql-query-editor');
if (!editor) return;
var type = btn.dataset.gqlType;
var defaults = {
query: 'query GetContact($id: ID!) {\n contact(id: $id) {\n id\n firstName\n lastName\n email\n company {\n id\n name\n }\n createdAt\n }\n}',
mutation: 'mutation CreateContact(\n $firstName: String!\n $lastName: String!\n $email: String!\n $company: String\n) {\n createContact(input: {\n firstName: $firstName\n lastName: $lastName\n email: $email\n company: $company\n }) {\n id\n firstName\n lastName\n createdAt\n }\n}'
};
if (defaults[type]) editor.value = defaults[type];
}
function escapeHtml(str) {
return String(str).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');
}