init project
This commit is contained in:
78
src/pages/ConfigMaps.tsx
Normal file
78
src/pages/ConfigMaps.tsx
Normal file
@@ -0,0 +1,78 @@
|
||||
export default function ConfigMaps() {
|
||||
const configmaps = [
|
||||
{
|
||||
name: 'app-config',
|
||||
namespace: 'default',
|
||||
data: 3,
|
||||
age: '2h',
|
||||
labels: 'app=web'
|
||||
},
|
||||
{
|
||||
name: 'database-config',
|
||||
namespace: 'default',
|
||||
data: 5,
|
||||
age: '1d',
|
||||
labels: 'app=database'
|
||||
},
|
||||
{
|
||||
name: 'redis-config',
|
||||
namespace: 'default',
|
||||
data: 2,
|
||||
age: '3h',
|
||||
labels: 'app=redis'
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold">ConfigMaps</h1>
|
||||
<p className="text-sm text-gray-600">Manage configuration data for applications.</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-white border border-gray-200 rounded-lg shadow-sm">
|
||||
<div className="px-6 py-4 border-b border-gray-200">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-lg font-medium">ConfigMap List</h2>
|
||||
<button className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 text-sm">
|
||||
Create ConfigMap
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="overflow-x-auto">
|
||||
<table className="min-w-full">
|
||||
<thead className="bg-gray-50 border-b border-gray-200">
|
||||
<tr>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Namespace</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Data</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Age</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Labels</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="bg-white divide-y divide-gray-200">
|
||||
{configmaps.map((configmap) => (
|
||||
<tr key={configmap.name} className="hover:bg-gray-50">
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
<div className="text-sm font-medium text-gray-900">{configmap.name}</div>
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{configmap.namespace}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{configmap.data}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{configmap.age}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{configmap.labels}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
||||
<button className="text-blue-600 hover:text-blue-900 mr-3">View</button>
|
||||
<button className="text-green-600 hover:text-green-900 mr-3">Edit</button>
|
||||
<button className="text-red-600 hover:text-red-900">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user