Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -966,67 +966,67 @@ 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;
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-weight: 500;
}
.no-resources[data-v-32c19ba7] {
.no-resources[data-v-adbc8337] {
text-align: center;
padding: 3rem 2rem;
color: #6b7280;
background: white;
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;
Expand All @@ -1035,91 +1035,91 @@ 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;
font-weight: 500;
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;
padding: 0.25rem 0.5rem;
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;
display: flex;
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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions web/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kube Bind</title>
<script type="module" crossorigin src="./assets/index.a8fc1aeb.js"></script>
<link rel="stylesheet" href="./assets/index.2f8736bf.css">
<script type="module" crossorigin src="./assets/index.b10aa2d7.js"></script>
<link rel="stylesheet" href="./assets/index.4561ca6e.css">
</head>
<body>
<div id="app"></div>
Expand Down
9 changes: 6 additions & 3 deletions web/src/types/binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ export interface BindableResourcesRequest {
metadata: {
name: string
}
templateRef: BindingTemplate
clusterIdentity: ClusterIdentity
spec: {
templateRef: BindingTemplate
clusterIdentity: ClusterIdentity
author: string
}
}

export interface APIServiceExportRequestResponse {
Expand Down Expand Up @@ -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
}
}
13 changes: 8 additions & 5 deletions web/src/views/Resources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,14 @@ const handleBind = async (templateName: string, bindingName: string) => {
metadata: {
name: bindingName
},
templateRef: {
name: templateName
},
clusterIdentity: {
identity: clusterIdentity
spec: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

web/src/types/binding.ts needs updating

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and author was made required:

// Author is the identifier of the entity that created this binding request.
	// This is used for audit purposes and to track who initiated the binding.
	//
	// +required
	// +kubebuilder:validation:Required
	Author string `json:"author"`

either add placeholder from UI or make it optional

templateRef: {
name: templateName
},
clusterIdentity: {
identity: clusterIdentity
},
author: 'web-ui'
}
}

Expand Down