Implement tags since adding tags can crash the app on the netbox side
This commit is contained in:
parent
f4be250595
commit
6b51a91685
|
|
@ -12,7 +12,7 @@
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Tenant { get; set; }
|
public string Tenant { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public IList<string> Tags { get; set; }
|
public IList<Tag> Tags { get; set; }
|
||||||
public CustomFields CustomFields { get; set; }
|
public CustomFields CustomFields { get; set; }
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
public DateTime LastUpdated { get; set; }
|
public DateTime LastUpdated { get; set; }
|
||||||
|
|
@ -25,4 +25,14 @@
|
||||||
public object Previous { get; set; }
|
public object Previous { get; set; }
|
||||||
public IList<Result> Results { get; set; }
|
public IList<Result> Results { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Tag
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
public string url { get; set; }
|
||||||
|
public string display { get; set; }
|
||||||
|
public string name { get; set; }
|
||||||
|
public string slug { get; set; }
|
||||||
|
public string color { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,18 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Community Tag</th>
|
<th>Community Tag</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>Community Type</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@foreach (var item in Model) {
|
@foreach (var item in Model) {
|
||||||
<tr>
|
<tr>
|
||||||
<td>@item.Name</td>
|
<td>@item.Name</td>
|
||||||
<td>@item.Description</td>
|
<td>@item.Description</td>
|
||||||
|
<td>
|
||||||
|
@foreach (var tags in item.Tags) {
|
||||||
|
<div class="d-inline-flex p-2 text-white" style="background-color:#@tags.color">@tags.display</div>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
Loading…
Reference in New Issue