@model Disco.Web.Models.Device.ImportModel
@{
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Import/Export Devices");
}
@using (Html.BeginForm(MVC.API.Device.ImportParse(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.ValidationSummary()
}
CSV Import Specification
Format
- The import file must be in comma-separated values format (CSV Reference).
- The first line will be ignored (it is assumed the file includes headers).
- Be conscious of editors removing leading zeros from serial numbers (ie: Microsoft Excel).
Fields
The following fields/columns are available for to the import file. The order of the fields must be as shown below.
| Field Name |
Description |
| Serial Number |
Required - must contain the device serial number (maximum of 60 characters).
|
| Device Model |
The ID for the Device Model (Show IDs). Default: 1 [@Html.ActionLink(Model.DeviceModels[0].ToString(), MVC.Config.DeviceModel.Index(Model.DeviceModels[0].Id))]
|
| Device Profile |
The ID for the Device Profile (Show IDs). Default: 1 [@Html.ActionLink(Model.DeviceProfiles[0].ToString(), MVC.Config.DeviceProfile.Index(Model.DeviceProfiles[0].Id))]
|
| Device Batch |
The ID for the Device Batch (Show IDs). Default: <None>
|
| Assigned User |
The ID for the User assigned to the device. Default: <None>
|
| Location |
Updates the Location of the device. Maximum of 250 characters. Default: <None>
|
| Asset Number |
Updates the Asset Number of the device. Maximum of 40 characters. Default: <None>
|
| ID |
Description |
Manufacturer |
Model |
@foreach (var dm in Model.DeviceModels)
{
| @Html.ActionLink(dm.Id.ToString(), MVC.Config.DeviceModel.Index(dm.Id)) |
@dm.ToString() |
@dm.Manufacturer |
@dm.Model |
}
| ID |
Name |
Short Name |
Description |
@foreach (var dp in Model.DeviceProfiles)
{
| @Html.ActionLink(dp.Id.ToString(), MVC.Config.DeviceProfile.Index(dp.Id)) |
@dp.Name |
@dp.ShortName |
@dp.Description |
}
| ID |
Name |
Purchase Date |
@foreach (var db in Model.DeviceBatches)
{
| @Html.ActionLink(db.Id.ToString(), MVC.Config.DeviceBatch.Index(db.Id)) |
@db.Name |
@CommonHelpers.FriendlyDate(db.PurchaseDate) |
}
@Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices())