A comprehensive web component for viewing and triggering Tekton tasks integrated with Facets Control Plane.
- 📊 Task Dashboard: View all available Tekton tasks with status indicators
- 🚀 Task Triggering: Launch tasks with dynamic parameter forms
- 📈 Run History: Track task execution history with detailed status
- 📋 Step Logs: View logs for individual task steps
- 🔄 Real-time Updates: Auto-refresh task status and runs
- 📱 Responsive Design: Works on desktop and mobile devices
- 🔐 Secure Integration: Uses Facets session authentication
-
Clone & Setup:
cd /Users/anujhydrabadi/work/repos/tekton-tasks-web-component npm install
-
Start Development Server:
npm run dev
This will build the component and start a local server at
http://localhost:8080
-
View Component: Open your browser to see the Tekton Tasks dashboard
-
Build for Production:
npm run build
-
Host the Component: Upload
public/tekton-tasks.js
to your hosting service -
Register in Facets:
- Navigate to Organizational Settings → Web Components
- Click "Add Component"
- Fill in the details:
- Name:
tekton-tasks
- Type:
local
(sidebar component) - Remote URL:
https://your-host.com/tekton-tasks.js
- Icon URL:
https://your-host.com/tekton-icon.svg
(optional) - Tooltip: "Tekton Tasks Dashboard"
- Name:
src/
├── components/ # UI component modules (planned)
├── services/
│ └── api.js # Control Plane API integration
├── utils/
│ ├── constants.js # Configuration and constants
│ ├── formatters.js # Data formatting utilities
│ └── auth.js # Authentication helpers
├── styles/
│ └── main.css # Component styles
└── tekton-tasks.js # Main component entry point
The component integrates with 4 Control Plane APIs:
- GET Tasks - Fetch available tasks for a resource
- GET Task Runs - Get execution history for a task
- POST Trigger Task - Create and start a new task run
- GET Step Logs - Retrieve logs for task steps
Edit src/utils/constants.js
to customize:
export const CONFIG = {
CLUSTER_ID: 'cluster1', // Target cluster
RESOURCE_NAME: 'tekton', // Resource name
RESOURCE_TYPE: 'service', // Resource type
REFRESH_INTERVAL: 10000, // Auto-refresh interval (ms)
// ... other settings
};
- Status Indicators: Visual status with colors and icons
- Parameter Count: Shows number of configurable parameters
- Quick Actions: Trigger task or view run history
- Dynamic Forms: Auto-generated based on task parameters
- Parameter Validation: Support for string and array types
- Default Values: Pre-filled from task definitions
- Timeline View: Chronological list of executions
- Expandable Details: Click to view run parameters and steps
- Step Logs: Direct access to individual step logs
npm run dev
- Build and start development servernpm run build
- Build for productionnpm run preview
- Preview built component
- Create new components in
src/components/
- Add utilities to
src/utils/
- Update styles in
src/styles/main.css
- Integrate in main component
src/tekton-tasks.js
- Push to GitHub repository
- Enable GitHub Pages in repository settings
- Component available at:
https://username.github.io/repo-name/tekton-tasks.js
- Vercel: Zero-config deployments
- Netlify: Advanced CDN features
- AWS S3 + CloudFront: Enterprise hosting
- Authentication: Inherits Facets session tokens
- Input Validation: Sanitizes all user inputs
- Error Handling: Secure error messages
- CORS: Proper cross-origin configuration
- Chrome/Edge 88+
- Firefox 85+
- Safari 14+
- Mobile browsers with Web Components support
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
For issues or questions:
- Check the browser console for error messages
- Verify API permissions and authentication
- Ensure Control Plane APIs are accessible
- Test with different browsers
Built with ❤️ for Facets Control Plane integration