Skip to content
Tech Master Tech Master

OneStopTechnical Forum

  • Books
  • AI
  • Networking
  • Windows
  • Linux
  • Cloud
  • Mac
  • Active Directory
  • Azure
  • Cloud
  • Exchange
  • M365
  • Server 2025
  • Storage
  • Vsphere
  • Website
  • Database
  • Security
  • Knowledge Base
  • VPN
Tech Master
Tech Master

OneStopTechnical Forum

Deep Dive: Customizing Snipe-IT Frontend (Vue.js) for Additional Fields

blog.payperitem.com, April 3, 2025April 3, 2025

1๏ธโƒฃ Locate the Vue Components

Snipe-ITโ€™s Vue.js frontend components are stored in:
๐Ÿ“‚ resources/js/components/

For assets, the main Vue component files are:

  • EditAsset.vue โ€“ For editing an asset
  • CreateAsset.vue โ€“ For creating a new asset
  • ShowAsset.vue โ€“ For displaying an asset

2๏ธโƒฃ Add a Custom Field to Vue Components

Letโ€™s say we want to add a new field called โ€œWarranty Expiry Dateโ€ to assets.

๐Ÿ“ Modify EditAsset.vue

  1. Open resources/js/components/assets/EditAsset.vue
  2. Locate the <form> section where fields are defined.
  3. Add a new field under the existing ones:
vue
<template>
<div>
<!-- Other asset fields -->

<div class="form-group">
<label for="warranty_expiry">Warranty Expiry Date</label>
<input type="date" class="form-control" v-model="asset.warranty_expiry" />
</div>
</div>
</template>

<script>
export default {
data() {
return {
asset: {
warranty_expiry: '' // Initialize the new field
}
};
},
methods: {
saveAsset() {
axios.put(`/api/v1/hardware/${this.asset.id}`, this.asset)
.then(response => {
this.$emit('saved', response.data);
})
.catch(error => {
console.error(error);
});
}
}
}
</script>

๐Ÿ“ Modify CreateAsset.vue

Repeat the same process in resources/js/components/assets/CreateAsset.vue, ensuring the field is added to the data() object.


3๏ธโƒฃ Modify Backend to Support the New Field

To store and retrieve the new field, update the Eloquent model:

๐Ÿ“ Modify app/Models/Asset.php

Add the new field to the fillable array:

php
protected $fillable = ['name', 'serial', 'warranty_expiry', ...];

4๏ธโƒฃ Modify API Controller (If Needed)

If you want API support, modify the AssetController:

๐Ÿ“ Modify app/Http/Controllers/API/AssetController.php

Ensure the warranty_expiry field is included in API responses:

phppublic function show($id)
{
return response()->json(Asset::findOrFail($id)->makeHidden(['created_at', 'updated_at']));
}

5๏ธโƒฃ Compile Vue.js Changes

After modifying the Vue components, rebuild the frontend:

sh
itcd /var/www/snipe-it
npm install
npm run dev # or npm run prod for production

6๏ธโƒฃ Final Step: Run Laravel Migrations

If you havenโ€™t added warranty_expiry to the database yet, run:

shCopyEditphp artisan make:migration add_warranty_expiry_to_assets --table=assets

Then edit the migration file in database/migrations/:

phppublic function up()
{
Schema::table('assets', function (Blueprint $table) {
$table->date('warranty_expiry')->nullable();
});
}

Run the migration:

shCopyEditphp artisan migrate

7๏ธโƒฃ Restart Services

Finally, restart the necessary services:

shphp artisan config:clear
php artisan cache:clear
php artisan queue:restart
systemctl restart nginx # or Apache

๐ŸŽฏ Now, Your Custom Field is Fully Integrated!

This process ensures that: โœ… The Vue.js frontend displays the new field.
โœ… The backend Laravel API processes it correctly.
โœ… The database stores the new field.

Linux OpenSource Website #100GbE#100GbECloudNetworking#10GbE#40GbE#5GUPF#AdaptiveResync#AdaptiveResyncNVMe#AF_XDP#AIArbitrage#AIClusterOptimization#AIInferenceonFPGA#AIModelParallelism#AIonGPUs#AIQuantTrading#AMDMPGPU#AnsibleAutomation#AnsibleForVMware#ApacheFlinkPerformance#AWSNitro#AWSVMwareCloud#Azure#AzureVMwareSolution#BareMetalCloudTuning#BareMetalServer#BatchedInferenceOptimization#BladeServers#BSOD#CacheTiering#CentOS#CephHighPerformance#CiscoACI#CiscoACIAnsible#CiscoHyperFlex#CiscoMDS#CiscoNexus#CiscoUCS#CiscoVPC#CiscoVXLAN#CloudComputing#CloudHosting#CloudMigration#CloudNative5G#Colocation#ColumnarStorageTuning#CompressionOptimization#Containerization#CUDAonVMware#CyberSecurity#CyberSecurity #WindowsSecurity #PrivacyMatters #Firewall #EndpointSecurity#DataCenter#DataCenterNetworking#DDoSProtection#DebianServer#Deduplication#DeepLearningHFT#DeepLearningInfra#DellCompellent#DellIDRAC#DellIDRACAPI#DellOpenManage#DellPowerEdge#DellPowerMax#DellPowerStore#DellUnityXT#DellVxRail#DirectFlash#DirectMarketAccess (DMA)#DirectX#DistributedTrainingInfra#DPDK#DPDKTelcoOptimizations#DPUPassthrough#DPUvsFPGA#DruidRealTimeAnalytics#DVS#DynamicCongestionControl#eBPFNetworking#EdgeAIOptimization#EdgeComputing#EnterpriseIT#ESXi#ESXiAdaptiveResync#ESXiNUMAOptimization#ESXiQueueDepth#ESXiRDMA#ESXiTuning#ETLPerformanceOptimization#FCBufferCredits#FCNPIV#FCoE#FCoEPerformance#FCPortChannel#FibreChannel#FibreChannelZoning#Firewall#FPGAforAI#FPGAforHFT#GameOptimization#GlobalEdgeRouting#GoogleCloudVMwareEngine#GPUDirectStorage#GPUPassthrough#HardenedServer#HLSforFPGA#HPC#HPCforAI#HPE3PAR#HPEAlletra#HPEGen10Plus#HPEiLO#HPEiLOAutomation#HPEInfoSight#HPEOneView#HPEPrimera#HPEProLiant#HPEStoreOnce#Hyperscale#HyperscaleLoadBalancing#HyperscaleMultiTenantSecurity#HyperV#IDSIPS#InfiniBandAI#InfrastructureAsCode#IntelFPGAAcceleration#IntelSPDK#IntrusionDetection#IOPSOptimization#IOTailLatency#iSCSI#iSCSIJumboFrames#ITInfrastructure#ITPro#JuniperNetworks#K8sMultiCloud#KafkaUltraLowLatency#KernelBypassNetworking#KubernetesCluster#KVM#LatencyArbitrageInfra#LatencyFix#LinuxServer#LUNQueueDepth#ManagedHosting#MarketDataFeedOptimization#MarketMakingAI#MellanoxConnectXPerformance#MellanoxGPUDirect#MellanoxNetworking#MellanoxRoCE#Microsegmentation#Microservices#MIGonNVIDIA#MultiAccessEdgeComputing#NASStorage#NetAppAFF#NetAppAnsibleModules#NetAppFAS#NetAppFlexGroup#NetAppMetroCluster#NetAppONTAP#NetAppSnapMirror#Networking#NeuralAccelerators#NeuralNetworkBacktesting#NFVAcceleration#NSXT#NVGPUPassthrough#NVIDIABlueField#NVMe#NVMeLatencyBenchmark#NVMeoF#NVMeoFPerformance#NVMeOverFabric#NVMePolling#NVMeQueueDepth#NVMeTCPPerformance#NVSwitchTuning#O-RANOptimization#OnChipNetworking#OpenStack#OptanePMem#P4ProgrammableNIC#PCGaming#PCIssues#PensandoDPU#PersistentMemoryRDMA#PFCforRoCE#PicoSecondPrecision#PipelinedCompute#PowerShell#ProgrammableNICs#Proxmox#PureEvergreen#PureFlashArray#PureStorage#PureX90#PyTorchXLA (Accelerated Linear Algebra for PyTorch)#QoSStorage#RAID#RDMA#RDMAonDPU#RDMAOptimization#RDMAoverEthernet#RDMAQueueDepthTuning#RDMAStorage#RedHat#ReinforcementLearningForTrading#SANStorage#SentimentAnalysisTrading#Server#ServerlessPerformanceTuning#ServerRoom#ServerSecurity#SIEM#SIEMSolutions#SOC2Compliance#SRIOV#SRIOVNetworking#SSDServers#StorageClassMemory#StorageIOControl#StorageTiers#StreamingDataOptimization#StreamProcessingAI#SubMicrosecondTrading#SysAdmin#SysAdminLife#TaskScheduler#TCPBypass#TechSupport#TelcoEdgeAI#TensorFlowXRT#Terraform#TerraformMultiCloud#TerraformVMware#TickToTradeOptimization#TinyMLPerformance#UbuntuServer#UltraLowLatencyFPGA#vCloudDirector#VectorizedQueryExecution#VFIO#vGPUPassthrough#VMDirectPathIO#vMotion#VMware#VMwareHCX#VMwarePowerCLI#VMwarePVRDMA#VMwareSmartNIC#VPSHosting#vRANPerformanceTuning#vSANDeduplication#vSANPerformance#vSANResyncImpact#vSphere#vSphereMultiCloud#vSphereOptimization#WindowsAutomation#WindowsDebugging#WindowsFix#WindowsGaming#WindowsServer#WriteAmplification#WriteBackCaching#XilinxAlveo#XilinxSmartNIC#ZeroCopyNetworking#ZeroLatencyInference#ZeroTrustArchitecture#ZFSPerformanceTuning

Post navigation

Previous post
Next post

Related Posts

Securing a website exposed to the Internet or running on a public IP

April 2, 2025April 2, 2025

1. Network & Perimeter Security ๐Ÿ”น Firewall & WAF (Web Application Firewall) ๐Ÿ”น DDoS Protection ๐Ÿ”น VPN & Private Access 2. Web Server & OS Security ๐Ÿ”น Hardening the Web Server ๐Ÿ”น OS & Kernel Security 3. Application Security ๐Ÿ”น Secure Code Practices ๐Ÿ”น Secure APIs 4. Data Security ๐Ÿ”น…

Read More

Automate scripting for installing snipeiT on Ubutu Server

April 7, 2025

Sure! Here’s a Bash script that automates the installation of Snipe-IT on an Ubuntu Server. This script sets up: Letโ€™s assume Ubuntu 20.04+ and a fresh server. โœ… Script: install_snipeit.sh bash#!/bin/bash# Exit on any errorset -e# Define MySQL root password and Snipe-IT DB infoMYSQL_ROOT_PASSWORD=”StrongRootPass123!”SNIPEIT_DB=”snipeit”SNIPEIT_USER=”snipeuser”SNIPEIT_PASS=”SnipeUserPass456!”echo “Updating system…”apt update && apt upgrade…

Read More

Open-Source 2FA (Two-Factor Authentication) solutions for Active Directory

April 7, 2025

๐Ÿ” 1. privacyIDEA ๐Ÿ” 2. LinOTP ๐Ÿ” 3. Authelia ๐Ÿ” 4. Aegis Secure Login (for Windows) ๐Ÿงฐ 5. Keycloak (w/ FreeIPA or LDAP) Bonus: RADIUS + AD + 2FA Gateway Stack If youโ€™re into building your own stack: This setup works great for adding 2FA to VPNs, SSH, and web…

Read More

Recent Posts

  • List of AD Schema Versions
  • OldNewExplorer Free Download For Windows 11, 10, 8 and 7 [Latest Version]
  • How to Get the Classic (old) Context Menu on Windows 11
  • BitLocker Recovery Keys
  • Active Directory and Server hardening

Recent Comments

No comments to show.
June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« May    
Log in
©2025 Tech Master | WordPress Theme by SuperbThemes
  • Login
  • Sign Up
Forgot Password?
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
body::-webkit-scrollbar { width: 7px; } body::-webkit-scrollbar-track { border-radius: 10px; background: #f0f0f0; } body::-webkit-scrollbar-thumb { border-radius: 50px; background: #dfdbdb }