From a4c224291546a3a1451d280aaf15658fa562421b Mon Sep 17 00:00:00 2001 From: Robert Vasek Date: Tue, 3 Feb 2026 13:37:07 +0100 Subject: [PATCH] web: fix bind request format On-behalf-of: @SAP robert.vasek@sap.com Signed-off-by: Robert Vasek --- ...{index.2f8736bf.css => index.4561ca6e.css} | 84 +++++++++---------- .../{index.a8fc1aeb.js => index.b10aa2d7.js} | 19 +++-- web/dist/index.html | 4 +- web/src/types/binding.ts | 9 +- web/src/views/Resources.vue | 13 +-- 5 files changed, 69 insertions(+), 60 deletions(-) rename web/dist/assets/{index.2f8736bf.css => index.4561ca6e.css} (93%) rename web/dist/assets/{index.a8fc1aeb.js => index.b10aa2d7.js} (99%) diff --git a/web/dist/assets/index.2f8736bf.css b/web/dist/assets/index.4561ca6e.css similarity index 93% rename from web/dist/assets/index.2f8736bf.css rename to web/dist/assets/index.4561ca6e.css index 1d965fc82..164494a24 100644 --- a/web/dist/assets/index.2f8736bf.css +++ b/web/dist/assets/index.4561ca6e.css @@ -912,30 +912,30 @@ to { transform: translateY(0) scale(1); opacity: 1; transform: translateY(-1px); } -.resources[data-v-32c19ba7] { +.resources[data-v-adbc8337] { max-width: 1200px; margin: 0 auto; padding: 2rem; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif; } -.header-section[data-v-32c19ba7] { +.header-section[data-v-adbc8337] { margin-bottom: 2rem; } -.resources h2[data-v-32c19ba7] { +.resources h2[data-v-adbc8337] { color: #1e293b; margin-bottom: 1rem; font-size: 1.875rem; font-weight: 600; font-family: inherit; } -.resources h3[data-v-32c19ba7] { +.resources h3[data-v-adbc8337] { color: #334155; font-size: 1.25rem; font-weight: 600; font-family: inherit; margin: 0; } -.cli-indicator[data-v-32c19ba7] { +.cli-indicator[data-v-adbc8337] { background-color: #dbeafe; border: 1px solid #3b82f6; border-radius: 8px; @@ -947,17 +947,17 @@ to { transform: translateY(0) scale(1); opacity: 1; align-items: center; gap: 0.5rem; } -.loading[data-v-32c19ba7] { +.loading[data-v-adbc8337] { text-align: center; padding: 2rem; color: #666; } -.error[data-v-32c19ba7] { +.error[data-v-adbc8337] { text-align: center; padding: 2rem; color: #dc3545; } -.retry-btn[data-v-32c19ba7] { +.retry-btn[data-v-adbc8337] { padding: 0.5rem 1rem; background-color: #007bff; color: white; @@ -966,32 +966,32 @@ to { transform: translateY(0) scale(1); opacity: 1; cursor: pointer; margin-top: 1rem; } -.retry-btn[data-v-32c19ba7]:hover { +.retry-btn[data-v-adbc8337]:hover { background-color: #0056b3; } -.resources-container[data-v-32c19ba7] { +.resources-container[data-v-adbc8337] { display: grid; gap: 3rem; } -.templates-section[data-v-32c19ba7], -.collections-section[data-v-32c19ba7] { +.templates-section[data-v-adbc8337], +.collections-section[data-v-adbc8337] { background: #f8fafc; padding: 1.5rem; border-radius: 12px; border: 1px solid #e2e8f0; } -.no-resources[data-v-32c19ba7] { +.no-resources[data-v-adbc8337] { text-align: center; color: #666; padding: 1rem; } -.section-header[data-v-32c19ba7] { +.section-header[data-v-adbc8337] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; } -.item-count[data-v-32c19ba7] { +.item-count[data-v-adbc8337] { font-size: 0.9rem; color: #666; background: #e9ecef; @@ -999,7 +999,7 @@ to { transform: translateY(0) scale(1); opacity: 1; border-radius: 12px; font-weight: 500; } -.no-resources[data-v-32c19ba7] { +.no-resources[data-v-adbc8337] { text-align: center; padding: 3rem 2rem; color: #6b7280; @@ -1007,26 +1007,26 @@ to { transform: translateY(0) scale(1); opacity: 1; border-radius: 12px; border: 2px dashed #d1d5db; } -.no-resources-icon[data-v-32c19ba7] { +.no-resources-icon[data-v-adbc8337] { margin-bottom: 1rem; opacity: 0.4; color: #9ca3af; } -.no-resources h4[data-v-32c19ba7] { +.no-resources h4[data-v-adbc8337] { margin: 0 0 0.5rem 0; color: #374151; font-weight: 600; } -.no-resources p[data-v-32c19ba7] { +.no-resources p[data-v-adbc8337] { margin: 0; font-size: 0.9rem; } -.resource-grid[data-v-32c19ba7] { +.resource-grid[data-v-adbc8337] { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 1.5rem; } -.template-card[data-v-32c19ba7], .collection-card[data-v-32c19ba7] { +.template-card[data-v-adbc8337], .collection-card[data-v-adbc8337] { background: white; border: 1px solid #e2e8f0; border-radius: 12px; @@ -1035,27 +1035,27 @@ to { transform: translateY(0) scale(1); opacity: 1; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } -.template-card[data-v-32c19ba7]:hover, .collection-card[data-v-32c19ba7]:hover { +.template-card[data-v-adbc8337]:hover, .collection-card[data-v-adbc8337]:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transform: translateY(-2px); border-color: #cbd5e1; } -.card-header[data-v-32c19ba7] { +.card-header[data-v-adbc8337] { padding: 1.5rem 1.5rem 1rem 1.5rem; border-bottom: 1px solid #f1f5f9; } -.card-title[data-v-32c19ba7] { +.card-title[data-v-adbc8337] { margin: 0 0 0.75rem 0; color: #1e293b; font-size: 1.125rem; font-weight: 600; } -.card-badges[data-v-32c19ba7] { +.card-badges[data-v-adbc8337] { display: flex; flex-wrap: wrap; gap: 0.5rem; } -.badge[data-v-32c19ba7] { +.badge[data-v-adbc8337] { font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 12px; @@ -1063,42 +1063,42 @@ to { transform: translateY(0) scale(1); opacity: 1; display: inline-flex; align-items: center; } -.resources-badge[data-v-32c19ba7] { +.resources-badge[data-v-adbc8337] { background: #dbeafe; color: #1d4ed8; } -.permissions-badge[data-v-32c19ba7] { +.permissions-badge[data-v-adbc8337] { background: #fef3c7; color: #d97706; } -.namespaces-badge[data-v-32c19ba7] { +.namespaces-badge[data-v-adbc8337] { background: #d1fae5; color: #047857; } -.card-content[data-v-32c19ba7] { +.card-content[data-v-adbc8337] { padding: 1rem 1.5rem; } -.card-description[data-v-32c19ba7] { +.card-description[data-v-adbc8337] { color: #64748b; margin: 0 0 1rem 0; line-height: 1.5; font-size: 0.9rem; } -.card-preview[data-v-32c19ba7], .collection-templates[data-v-32c19ba7] { +.card-preview[data-v-adbc8337], .collection-templates[data-v-adbc8337] { margin-top: 1rem; } -.card-preview strong[data-v-32c19ba7], .collection-templates strong[data-v-32c19ba7] { +.card-preview strong[data-v-adbc8337], .collection-templates strong[data-v-adbc8337] { color: #374151; font-size: 0.875rem; display: block; margin-bottom: 0.5rem; } -.resource-preview[data-v-32c19ba7], .template-list[data-v-32c19ba7] { +.resource-preview[data-v-adbc8337], .template-list[data-v-adbc8337] { display: flex; flex-wrap: wrap; gap: 0.5rem; } -.resource-tag[data-v-32c19ba7], .template-tag[data-v-32c19ba7] { +.resource-tag[data-v-adbc8337], .template-tag[data-v-adbc8337] { font-size: 0.75rem; background: #f1f5f9; color: #475569; @@ -1106,12 +1106,12 @@ to { transform: translateY(0) scale(1); opacity: 1; border-radius: 6px; border: 1px solid #e2e8f0; } -.more-indicator[data-v-32c19ba7] { +.more-indicator[data-v-adbc8337] { font-size: 0.75rem; color: #6b7280; font-style: italic; } -.card-actions[data-v-32c19ba7] { +.card-actions[data-v-adbc8337] { padding: 1rem 1.5rem; background: #fafbfc; border-top: 1px solid #f1f5f9; @@ -1119,7 +1119,7 @@ to { transform: translateY(0) scale(1); opacity: 1; gap: 0.75rem; justify-content: flex-end; } -.details-btn[data-v-32c19ba7], .bind-btn[data-v-32c19ba7] { +.details-btn[data-v-adbc8337], .bind-btn[data-v-adbc8337] { padding: 0.5rem 1rem; border: none; border-radius: 6px; @@ -1128,21 +1128,21 @@ to { transform: translateY(0) scale(1); opacity: 1; font-size: 0.875rem; transition: all 0.2s ease; } -.details-btn[data-v-32c19ba7] { +.details-btn[data-v-adbc8337] { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; } -.details-btn[data-v-32c19ba7]:hover { +.details-btn[data-v-adbc8337]:hover { background: #f1f5f9; border-color: #cbd5e1; } -.bind-btn[data-v-32c19ba7] { +.bind-btn[data-v-adbc8337] { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; border: 1px solid transparent; } -.bind-btn[data-v-32c19ba7]:hover { +.bind-btn[data-v-adbc8337]:hover { background: linear-gradient(135deg, #059669 0%, #047857 100%); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2); diff --git a/web/dist/assets/index.a8fc1aeb.js b/web/dist/assets/index.b10aa2d7.js similarity index 99% rename from web/dist/assets/index.a8fc1aeb.js rename to web/dist/assets/index.b10aa2d7.js index eea8ce063..5ef5df4d7 100644 --- a/web/dist/assets/index.a8fc1aeb.js +++ b/web/dist/assets/index.b10aa2d7.js @@ -98,7 +98,7 @@ var __yieldStar = (value) => { }; var __forAwait = (obj, it, method) => (it = obj[__knownSymbol("asyncIterator")]) ? it.call(obj) : (obj = obj[__knownSymbol("iterator")](), it = {}, method = (key, fn) => (fn = obj[key]) && (it[key] = (arg) => new Promise((yes, no, done) => (arg = fn.call(obj, arg), done = arg.done, Promise.resolve(arg.value).then((value) => yes({ value, done }), no)))), method("next"), method("return"), it); var require_index_001 = __commonJS({ - "assets/index.a8fc1aeb.js"(exports) { + "assets/index.b10aa2d7.js"(exports) { (function polyfill() { const relList = document.createElement("link").relList; if (relList && relList.supports && relList.supports("modulepreload")) { @@ -12377,11 +12377,14 @@ ${formattedObject}`; metadata: { name: bindingName }, - templateRef: { - name: templateName - }, - clusterIdentity: { - identity: clusterIdentity + spec: { + templateRef: { + name: templateName + }, + clusterIdentity: { + identity: clusterIdentity + }, + author: "web-ui" } }; const response = yield httpClient.post(bindUrl, bindingRequest); @@ -12598,8 +12601,8 @@ Details: ${kubeError.details || "No additional details available"}`; }; } }); - const Resources_vue_vue_type_style_index_0_scoped_32c19ba7_lang = ""; - const Resources = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-32c19ba7"]]); + const Resources_vue_vue_type_style_index_0_scoped_adbc8337_lang = ""; + const Resources = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-adbc8337"]]); const routes = [ { path: "/", component: Resources }, { path: "/resources", component: Resources } diff --git a/web/dist/index.html b/web/dist/index.html index 287c954f6..61aad12aa 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -5,8 +5,8 @@ Kube Bind - - + +
diff --git a/web/src/types/binding.ts b/web/src/types/binding.ts index d6b6aa49d..77ffc05ee 100644 --- a/web/src/types/binding.ts +++ b/web/src/types/binding.ts @@ -11,8 +11,11 @@ export interface BindableResourcesRequest { metadata: { name: string } - templateRef: BindingTemplate - clusterIdentity: ClusterIdentity + spec: { + templateRef: BindingTemplate + clusterIdentity: ClusterIdentity + author: string + } } export interface APIServiceExportRequestResponse { @@ -74,4 +77,4 @@ export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes] // Helper function to check if an error response is a structured KubeBindError export function isKubeBindError(error: any): error is KubeBindError { return error && typeof error === 'object' && error.kind === 'Error' && error.apiVersion && error.message && error.code -} \ No newline at end of file +} diff --git a/web/src/views/Resources.vue b/web/src/views/Resources.vue index 1a9e9f486..048902859 100644 --- a/web/src/views/Resources.vue +++ b/web/src/views/Resources.vue @@ -335,11 +335,14 @@ const handleBind = async (templateName: string, bindingName: string) => { metadata: { name: bindingName }, - templateRef: { - name: templateName - }, - clusterIdentity: { - identity: clusterIdentity + spec: { + templateRef: { + name: templateName + }, + clusterIdentity: { + identity: clusterIdentity + }, + author: 'web-ui' } }