-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefault.aspx
More file actions
257 lines (230 loc) · 12.8 KB
/
Copy pathDefault.aspx
File metadata and controls
257 lines (230 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AllanStevens.InfrastructureManagement._Default" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Infrastructure Management</title>
<%--<link href="style/style1.css" rel="stylesheet" type="text/css" />--%>
</head>
<body>
<form id="form1" runat="server" class="wrapper">
<div id="header"><h1>Infrastructure Management</h1></div>
<asp:XmlDataSource ID="XmlDataSourceNavigation" runat="server"
DataFile="~/data/navigation.xml"></asp:XmlDataSource>
<asp:XmlDataSource
ID="XmlDataSourceServerLists"
runat="server"
DataFile="~/data/servers.xml" EnableCaching="False" >
</asp:XmlDataSource>
<!--TransformFile="~/data/servers_sort.xsl" -->
<div id="sidemenu">
<div id="menu">
<div class="box_tl"></div>
<div class="box_tr"></div>
<div class="box_content">
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="XmlDataSourceNavigation" ImageSet="Simple"
NodeIndent="10" AutoGenerateDataBindings="False"
onselectednodechanged="TreeView1_SelectedNodeChanged" >
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#000000" Font-Bold="False" />
<SelectedNodeStyle Font-Underline="True"
HorizontalPadding="0px" VerticalPadding="0px" ForeColor="#000000" />
<DataBindings>
<asp:TreeNodeBinding DataMember="menu" TextField="name" ValueField="xpath" />
<asp:TreeNodeBinding DataMember="section" TextField="name" ValueField="xpath" />
<asp:TreeNodeBinding DataMember="item" TextField="name" ValueField="xpath" />
</DataBindings>
<RootNodeStyle Font-Bold="False" />
<NodeStyle Font-Names="Verdana" Font-Size="10pt" ForeColor="#000000"
HorizontalPadding="0px" NodeSpacing="0px" VerticalPadding="0px"
Font-Bold="False" />
<LeafNodeStyle Font-Bold="False" />
</asp:TreeView>
</div>
<div class="box_bl"></div>
<div class="box_br"></div>
</div>
<br />
<asp:Literal runat="server" id="litQuickLinks"></asp:Literal>
<!--Search-->
<br />
<div id="menu">
<div class="box_tl"></div>
<div class="box_tr"></div>
<div class="box_content" style="padding-left:15px;">
<asp:TextBox ID="txtSearch" runat="server" Width="125px"></asp:TextBox>
<asp:DropDownList ID="ddlSearch" runat="server" Width="125px" style="margin-top:5px;">
<asp:ListItem Value=" ">All Locations</asp:ListItem>
<asp:ListItem Value="[@location='Location 1']">Location 1</asp:ListItem>
<asp:ListItem Value="[@location='Location 2']">Location 2</asp:ListItem>
<asp:ListItem Value="[@location='Location 3']">Location 3</asp:ListItem>
<asp:ListItem Value="[@location='Other']">Other</asp:ListItem>
</asp:DropDownList><!-- todo - pull this infomration from data\xml-->
<br />
<asp:LinkButton ID="lnkSearch" runat="server" Width="125px" style="margin-top:5px;margin-left:85px;"
onclick="lnkSearch_Click">Search</asp:LinkButton>
</div>
<div class="box_bl"></div>
<div class="box_br"></div>
</div>
</div>
</div>
<div id="mainbody">
<asp:GridView ID="GridView1" runat="server"
DataSourceID="XmlDataSourceServerLists" AutoGenerateColumns="False"
CellPadding="4"
onrowdeleting="GridView1_RowDeleting" onrowdeleted="GridView1_RowDeleted"
onselectedindexchanged="GridView1_SelectedIndexChanged" Width="100%"
AllowSorting="True" onsorting="GridView1_Sorting"
onprerender="GridView1_PreRender" onrowdatabound="GridView1_RowDataBound"
CssClass="gridrow">
<columns>
<asp:BoundField DataField="catergory" HeaderText="catergory"
SortExpression="catergory" Visible="False"></asp:BoundField>
<asp:BoundField DataField="location" HeaderText="location"
SortExpression="location" Visible="False"></asp:BoundField>
<asp:TemplateField HeaderText="" ItemStyle-Width="20px">
<ItemTemplate>
<img alt="" src="image/icons/<%# Eval("catergory").ToString() %>.gif"/>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="name" HeaderText="Name" SortExpression="name" ItemStyle-Font-Bold="true">
</asp:BoundField>
<asp:BoundField DataField="ip" HeaderText="IP Address" SortExpression="ip"
Visible="False">
</asp:BoundField>
<asp:BoundField DataField="iloip" HeaderText="ILO IP" SortExpression="iloip"
Visible="False">
</asp:BoundField>
<asp:BoundField DataField="description" HeaderText="Description"
SortExpression="description" Visible="True"></asp:BoundField>
<asp:TemplateField HeaderText="" Visible="false">
<ItemTemplate>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="" >
<ItemTemplate>
<%# AllanStevens.InfrastructureManagement.Common.BuildLink(Eval("ip").ToString(), AllanStevens.InfrastructureManagement.BuildLinkTypes.RDP) %>
<%# AllanStevens.InfrastructureManagement.Common.BuildLink(Eval("iloip").ToString(), AllanStevens.InfrastructureManagement.BuildLinkTypes.ILO) %>
<%# AllanStevens.InfrastructureManagement.Common.BuildLink(Eval("url").ToString(), AllanStevens.InfrastructureManagement.BuildLinkTypes.URL) %>
</ItemTemplate>
<ItemStyle Width="0px" Wrap="false" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" OnClientClick="javascript:return confirm('Do you really want to delete the item?');" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
CommandName="Select" Text="Edit"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:BoundField DataField="guid" HeaderText=""
SortExpression="guid" Visible="True"></asp:BoundField>
</columns>
<FooterStyle Font-Bold="True" ForeColor="White" />
<SelectedRowStyle Font-Bold="True" />
<AlternatingRowStyle BackColor="#FFE5E6" />
<HeaderStyle ForeColor="White" />
</asp:GridView>
<asp:Literal runat="server" id="litNoResults">No items<br /><br /></asp:Literal>
<asp:Panel ID="pnlAdd" runat="server" Visible="False">
<table>
<tr>
<td>
Location</td>
<td>
<asp:DropDownList ID="ddlLocation" runat="server" AutoPostBack="True"
onselectedindexchanged="ddlLocation_SelectedIndexChanged">
<asp:ListItem>Location 1</asp:ListItem>
<asp:ListItem>Location 2</asp:ListItem>
<asp:ListItem>Location 3</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList><!-- todo - pull this infomration from data\xml-->
</td>
</tr>
<tr>
<td>
Catergory</td>
<td>
<asp:DropDownList ID="ddlCatergory" runat="server"></asp:DropDownList>
</td>
</tr>
<tr>
<td>
Name</td>
<td>
<asp:TextBox ID="txtName" runat="server" Width="268px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtName" ErrorMessage="Name missing" ValidationGroup="Add"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
IP Address</td>
<td>
<asp:TextBox ID="txtIP" runat="server" Width="268px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
ILO IP Address</td>
<td>
https://
<asp:TextBox ID="txtILOIP" runat="server" Width="268px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Application Url</td>
<td>
<asp:TextBox ID="txtURL" runat="server" Width="268px"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top">
Description</td>
<td>
<asp:TextBox ID="txtDescription" runat="server" Height="72px" Width="381px"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top">
Unique Identifier </td>
<td>
<asp:TextBox ID="txtGUID" runat="server" Width="268px" BorderStyle="None"
Enabled="False" ReadOnly="True" BorderColor="White" BorderWidth="1px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</table>
<asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False"
onclick="lnkCancel_Click" BorderColor="White" BorderStyle="Solid"
BorderWidth="4px">Cancel</asp:LinkButton>
<asp:LinkButton ID="lnkSave" runat="server" onclick="lnkSave_Click"
ValidationGroup="Add" BorderColor="White" BorderStyle="Solid"
BorderWidth="4px">Save</asp:LinkButton>
</asp:Panel>
<br />
<asp:LinkButton ID="lnkAddItem" runat="server" BorderColor="White"
BorderWidth="4px" CausesValidation="False" onclick="lnkAddItem_Click">Add
new item</asp:LinkButton>
<asp:LinkButton ID="lnkShowAll" runat="server" BorderColor="White"
BorderWidth="4px" CausesValidation="False" onclick="lnkShowAll_Click">Show
All Fields</asp:LinkButton>
<asp:label ID="lblCount" runat="server"></asp:label>
</div>
</form>
</body>
</html>