417 lines
18 KiB
Plaintext
417 lines
18 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Standard.Master" CodeBehind="MapTypA.aspx.cs" Inherits="TALAS_V5.MessagesMap.MapTypA1" %>
|
|
|
|
<%@ Register assembly="DevExpress.Web.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>
|
|
|
|
<asp:Content ID="NaviContent" ContentPlaceHolderID="NaviContent" runat="server">
|
|
|
|
</asp:Content>
|
|
|
|
|
|
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server" >
|
|
<script type="text/javascript" src="Scripts/maps.js"></script>
|
|
<script type="text/javascript" src="Scripts/svg-pan-zoom.js"></script>
|
|
<script type="text/javascript" src="Scripts/jquery-1.11.1.min.js"></script>
|
|
<link rel="stylesheet" href="Map.css" type="text/css" media="screen" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var offsetH = 1000;
|
|
var offsetW = 200;
|
|
|
|
|
|
window.addEventListener('beforeunload', function (event) {
|
|
setViewboxInCookie();
|
|
});
|
|
|
|
window.onload = function () {
|
|
|
|
|
|
if (isMobile.any()) {
|
|
setHeight();
|
|
var panZoom = window.panZoom = svgPanZoom('#svgBox', {
|
|
zoomEnabled: false,
|
|
controlIconsEnabled: false,
|
|
dblClickZoomEnabled: false,
|
|
preventMouseEventsDefault: false,
|
|
panEnabled: false,
|
|
fit: 1,
|
|
center: 1,
|
|
maxZoom: 100
|
|
|
|
});
|
|
panZoom.resize();
|
|
panZoom.fit();
|
|
panZoom.center();
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
setHeight();
|
|
var panZoom = window.panZoom = svgPanZoom('#svgBox', {
|
|
zoomEnabled: true,
|
|
controlIconsEnabled: true,
|
|
fit: 1,
|
|
center: 1,
|
|
maxZoom: 100
|
|
|
|
});
|
|
panZoom.resize();
|
|
panZoom.fit();
|
|
panZoom.center();
|
|
|
|
}
|
|
getViewboxFromCookie();
|
|
|
|
|
|
};
|
|
|
|
|
|
$(window).resize(function () {
|
|
if (!isMobile.any()) {
|
|
setHeight();
|
|
panZoom.resize();
|
|
panZoom.fit();
|
|
panZoom.center();
|
|
|
|
|
|
}
|
|
})
|
|
|
|
function setHeight() {
|
|
|
|
var hScreen = getViewport()[1]-60;
|
|
var wScreen = getViewport()[0]-80;
|
|
|
|
|
|
var divbox = document.getElementById("sVGcontainer");
|
|
|
|
var svg = document.getElementById("svgBox");
|
|
|
|
|
|
if (divbox != null) {
|
|
divbox.scrollHeight = hScreen;
|
|
divbox.scrollWidth = wScreen;
|
|
divbox.setAttribute("height", hScreen);
|
|
divbox.setAttribute("width", wScreen);
|
|
}
|
|
|
|
if (svg != null) {
|
|
if (isMobile.any()) {
|
|
svg.setAttribute("height", hScreen);
|
|
svg.setAttribute("width", wScreen);
|
|
}
|
|
|
|
else {
|
|
svg.setAttribute("height", hScreen);
|
|
svg.setAttribute("width", wScreen);
|
|
}
|
|
svg.style.visibility = "visible";
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
function getViewport() {
|
|
|
|
var viewPortWidth;
|
|
var viewPortHeight;
|
|
|
|
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
|
|
if (typeof window.innerWidth != 'undefined') {
|
|
viewPortWidth = window.innerWidth,
|
|
viewPortHeight = window.innerHeight
|
|
}
|
|
|
|
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
|
|
else if (typeof document.documentElement != 'undefined'
|
|
&& typeof document.documentElement.clientWidth !=
|
|
'undefined' && document.documentElement.clientWidth != 0) {
|
|
viewPortWidth = document.documentElement.clientWidth,
|
|
viewPortHeight = document.documentElement.clientHeight
|
|
}
|
|
|
|
// older versions of IE
|
|
else {
|
|
viewPortWidth = document.getElementsByTagName('body')[0].clientWidth,
|
|
viewPortHeight = document.getElementsByTagName('body')[0].clientHeight
|
|
}
|
|
return [viewPortWidth, viewPortHeight];
|
|
}
|
|
|
|
|
|
function goLocation(idLocation)
|
|
{
|
|
location.href = "../Stations/Location.aspx?id=" + idLocation;
|
|
}
|
|
|
|
function goArea(idArea)
|
|
{
|
|
location.href = "../Stations/Area.aspx?id=" + idArea;
|
|
}
|
|
|
|
function GoAll()
|
|
{
|
|
location.href = "MapTypAll.aspx";
|
|
}
|
|
</script>
|
|
|
|
|
|
<div id="BoxDevice" style="visibility:hidden; position:absolute; left:50px; top:0px; width:400px; height: 600px; vertical-align:top; ">
|
|
|
|
<dx:ASPxDataView ID="ASPxDataViewModulBox" Width="400px" Height="500px" ClientIDMode="Static" ClientInstanceName="ModulBox" OnCustomCallback="ASPxDataViewModulBox_CustomCallback" runat="server" PagerSettings-ShowNumericButtons="False" PagerSettings-Visible="False" Layout="Flow" BackColor="#666666" Theme="Default" SettingsLoadingPanel-Text="Lade Standortdaten">
|
|
|
|
<SettingsFlowLayout ItemsPerPage="1" />
|
|
<SettingsTableLayout ColumnCount="1" RowsPerPage="1" />
|
|
<SettingsBreakpointsLayout ItemsPerPage="1" ItemsPerRow="1">
|
|
</SettingsBreakpointsLayout>
|
|
<PagerSettings ShowNumericButtons="False" Visible="False" ShowDefaultImages="False" ShowDisabledButtons="False"></PagerSettings>
|
|
|
|
<ItemTemplate >
|
|
<table border="0">
|
|
<tr>
|
|
<td style="text-align:left;">
|
|
<font class="textHeader">Allgemein:</font>
|
|
<table class="boxData" border="1">
|
|
<tr>
|
|
<td style="width:100px;"><b>Standort: </b></td>
|
|
<td colspan="2"><dx:ASPxLabel ID="lblArea" runat="server" ForeColor="White" Text='<%# Eval("AreaName") %>' /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Bereich:</b></td>
|
|
<td colspan="2"><dx:ASPxLabel ID="lblLocation" runat="server" ForeColor="White" Text='<%# Eval("LocationName") %>' /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Gerät:</b></td>
|
|
<td colspan="2"><dx:ASPxLabel ID="lblModul" runat="server" ForeColor="White" Text='<%# Eval("ModulName") %>' /></td >
|
|
</tr>
|
|
<tr>
|
|
<td><b>Status:</b></td>
|
|
<td colspan="2"><dx:ASPxLabel ID="ASPxLabel1" runat="server" ForeColor="White" Text='<%# Eval("ConnectionState") %>' /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Zutrittskontrolle:</b></td>
|
|
|
|
<td><dx:ASPxLabel ID="ASPxLabelInfo" runat="server" ForeColor="White" Text='<%# Eval("AccessInfo") %>' /></td>
|
|
<td style="width:20px;">
|
|
<dx:ASPxImage ID="ASPxImage1" runat="server" ImageUrl='<%# Eval("AccessImage") %>' ShowLoadingImage="false"></dx:ASPxImage>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td style="text-align:left; padding-top:8px;">
|
|
<font class="textHeader">Anstehende Meldungen:</font>
|
|
<%# Eval("DatapointTable") %>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</ItemTemplate>
|
|
|
|
<Paddings Padding="0px" />
|
|
<ContentStyle>
|
|
<Paddings Padding="0px" />
|
|
</ContentStyle>
|
|
<ItemStyle BackColor="#01AEEF" ForeColor="White" HorizontalAlign="Left" VerticalAlign="Top" Width="400px" Height="500px">
|
|
<Paddings Padding="4px" />
|
|
</ItemStyle>
|
|
<PagerStyle ItemSpacing="0px" Spacing="0px">
|
|
<Paddings Padding="5px" />
|
|
</PagerStyle>
|
|
<PagerPanelStyle>
|
|
<Paddings Padding="5px" />
|
|
</PagerPanelStyle>
|
|
<Border BorderStyle="None" BorderWidth="0px" />
|
|
|
|
</dx:ASPxDataView>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="BoxCable" style="visibility:hidden; position:absolute; left:50px; top:0px; width:400px; height: 600px; vertical-align:top; ">
|
|
|
|
<dx:ASPxDataView ID="ASPxDataViewModulCable" Width="400px" Height="500px" ClientIDMode="Static" ClientInstanceName="ModulBoxCable" OnCustomCallback="ASPxDataViewModulBoxCable_CustomCallback" runat="server" PagerSettings-ShowNumericButtons="False" PagerSettings-Visible="False" Layout="Flow" BackColor="#666666" Theme="Default" SettingsLoadingPanel-Delay="0">
|
|
|
|
<SettingsFlowLayout ItemsPerPage="1" />
|
|
<SettingsTableLayout ColumnCount="1" RowsPerPage="1" />
|
|
<SettingsBreakpointsLayout ItemsPerPage="1" ItemsPerRow="1">
|
|
</SettingsBreakpointsLayout>
|
|
<PagerSettings ShowNumericButtons="False" Visible="False" ShowDefaultImages="False" ShowDisabledButtons="False"></PagerSettings>
|
|
|
|
<ItemTemplate >
|
|
<table border="0">
|
|
<tr>
|
|
<td style="text-align:left;">
|
|
<font class="textHeader">Allgemein:</font>
|
|
<table class="boxData">
|
|
|
|
<tr>
|
|
<td><b>Karte:</b></td>
|
|
<td><dx:ASPxLabel ID="ASPxLabel2" ForeColor="White" runat="server" Text='<%# Eval("Map") %>' /></td>
|
|
<td><b>Interne Kabel-ID:</b></td>
|
|
<td><dx:ASPxLabel ID="lblCable" ForeColor="White" runat="server" Text='<%# Eval("CableID") %>' /></td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="text-align:left; padding-top:8px;">
|
|
<font class="textHeader">Verknüpfte Kabelüberwachungen:</font>
|
|
<%# Eval("DatapointTableCable") %>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td style="text-align:left; padding-top:8px;">
|
|
<font class="textHeader">Anstehende Meldungen:</font>
|
|
<%# Eval("DatapointTableMessages") %>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</ItemTemplate>
|
|
|
|
<Paddings Padding="0px" />
|
|
<ContentStyle>
|
|
<Paddings Padding="0px" />
|
|
</ContentStyle>
|
|
<ItemStyle BackColor="#01AEEF" ForeColor="White" HorizontalAlign="Left" VerticalAlign="Top" Width="400px" Height="500px">
|
|
<Paddings Padding="4px" />
|
|
</ItemStyle>
|
|
<PagerStyle ItemSpacing="0px" Spacing="0px">
|
|
<Paddings Padding="5px" />
|
|
</PagerStyle>
|
|
<PagerPanelStyle>
|
|
<Paddings Padding="5px" />
|
|
</PagerPanelStyle>
|
|
<Border BorderStyle="None" BorderWidth="0px" />
|
|
|
|
</dx:ASPxDataView>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="sVGcontainer" style="width: 99%; height: 99%; border:0px solid; border-color:#666666; ">
|
|
|
|
|
|
<% @Import Namespace="System.IO" %>
|
|
|
|
<%
|
|
//ab hier wird die SVG Grafik eingeührt
|
|
|
|
StreamReader stmReader;
|
|
string linkmap = "~/Map/"+(string)Session["MapPath"].ToString() ;
|
|
|
|
try
|
|
{
|
|
stmReader = File.OpenText(Server.MapPath(linkmap));
|
|
//Daten auslesen
|
|
string strLine;
|
|
while (null != (strLine = stmReader.ReadLine()))
|
|
{
|
|
Response.Write(strLine + "\r\n");
|
|
}
|
|
stmReader.Close();
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
Response.Write("<center><br/><br/><p class='Title'>Die SVG-Karte mit dem Pfad '"+linkmap+"' kann vom Server nicht geladen werden!\r\n</p>");
|
|
}
|
|
|
|
//bis hier SVG Karte
|
|
%>
|
|
|
|
</div>
|
|
|
|
<div id="topi" style="visibility:hidden; position:absolute; z-index:0; left:45px; top:1888px; max-height:10px" >
|
|
|
|
|
|
<dx:aspxgridview ID="ASPxGridViewMap" runat="server" Font-Size="0.1pt" visible="true" ClientIDMode="Static" ClientInstanceName="GridDevices" KeyFieldName="IdLD" OnCustomCallback="ASPxGridViewMap_CustomCallback" DataSourceID="ObjectDataSourceMap" xmlns:dx="devexpress.web" autogeneratecolumns="False" settingsloadingpanel-mode="Disabled">
|
|
<SettingsPager PageSize="10000"> </SettingsPager> <ClientSideEvents
|
|
EndCallback="function(s, e) {
|
|
updateRec();
|
|
}"
|
|
Init="function(s, e) {
|
|
initRec();
|
|
}"
|
|
/> <Columns> <dx:GridViewDataTextColumn Caption="ID" FieldName="IdLD" VisibleIndex="0" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="NameArea" FieldName="NameArea" VisibleIndex="1" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="NameLocation" FieldName="NameLocation" VisibleIndex="2" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="NameDevice" FieldName="NameDevice" VisibleIndex="3" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Hinweise" FieldName="AlertList" VisibleIndex="10" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Level" FieldName="PrioLevel" VisibleIndex="20" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="PrioName" FieldName="PrioName" VisibleIndex="21" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="PrioColor" FieldName="PrioColor" VisibleIndex="22" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Unquittiert" FieldName="Unacknowledge" VisibleIndex="23" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="ConnectionColor" FieldName="ConnectionColor" VisibleIndex="24" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Link" FieldName="Link" VisibleIndex="25" ReadOnly> </dx:GridViewDataTextColumn>
|
|
|
|
</Columns> </dx:aspxgridview>
|
|
|
|
|
|
<dx:aspxgridview ID="ASPxGridViewCables" runat="server" Font-Size="0.1pt" settingsloadingpanel-mode="Disabled" KeyFieldName="Line" visible="true" ClientIDMode="Static" ClientInstanceName="GridCables" OnCustomCallback="ASPxGridViewCables_CustomCallback" DataSourceID="ObjectDataSourceCable" xmlns:dx="devexpress.web" autogeneratecolumns="False">
|
|
<SettingsPager PageSize="10000"> </SettingsPager> <ClientSideEvents
|
|
EndCallback="function(s, e) {
|
|
updateLine();
|
|
}"
|
|
Init="function(s, e) {
|
|
initLine();
|
|
updateLine();
|
|
}"
|
|
/> <Columns> <dx:GridViewDataTextColumn Caption="Line" FieldName="Line" VisibleIndex="0" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Color" FieldName="Color" VisibleIndex="1" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Description" FieldName="Description" VisibleIndex="2" ReadOnly> </dx:GridViewDataTextColumn>
|
|
</Columns> </dx:aspxgridview>
|
|
|
|
|
|
<dx:aspxgridview ID="ASPxGridViewVisible" runat="server" Font-Size="0.1pt" settingsloadingpanel-mode="Disabled" KeyFieldName="Object" visible="true" ClientIDMode="Static" ClientInstanceName="GridVisible" OnCustomCallback="ASPxGridViewVisible_CustomCallback" DataSourceID="ObjectDataSourceVisible" xmlns:dx="devexpress.web" autogeneratecolumns="False">
|
|
<SettingsPager PageSize="10000"> </SettingsPager> <ClientSideEvents
|
|
EndCallback="function(s, e) {
|
|
updateVisibleObjects();
|
|
}"
|
|
Init="function(s, e) {
|
|
// initVisibleObjects();
|
|
updateVisibleObjects();
|
|
}"
|
|
/> <Columns> <dx:GridViewDataTextColumn Caption="Object" FieldName="Object" VisibleIndex="0" ReadOnly> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="Visible" FieldName="Visible" VisibleIndex="1" ReadOnly> </dx:GridViewDataTextColumn>
|
|
</Columns> </dx:aspxgridview>
|
|
|
|
<dx:ASPxTimer ID="ASPxTimer1" runat="server" Interval="10000" ClientIDMode="Static"
|
|
ClientInstanceName="Timer1" xmlns:dx="devexpress.web" >
|
|
|
|
<ClientSideEvents Tick="function(s, e) {
|
|
GridDevices.PerformCallback();
|
|
GridCables.PerformCallback();
|
|
GridVisible.PerformCallback();
|
|
}" /> </dx:ASPxTimer>
|
|
|
|
|
|
<asp:ObjectDataSource ID="ObjectDataSourceMap" runat="server" SelectMethod="GetMapStationList" TypeName="TalasLibary.MapClass" >
|
|
<SelectParameters>
|
|
<asp:SessionParameter DefaultValue="0" Name="iddistrict" SessionField="IdDistrict" Type="Int32" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
|
|
<asp:ObjectDataSource ID="ObjectDataSourceCable" runat="server" SelectMethod="GetMapCableList" TypeName="TalasLibary.MapClass" >
|
|
<SelectParameters>
|
|
<asp:SessionParameter DefaultValue="0" Name="idMap" SessionField="IdMap" Type="Int32" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
|
|
<asp:ObjectDataSource ID="ObjectDataSourceVisible" runat="server" SelectMethod="GetMapVisibleList" TypeName="TalasLibary.MapClass" >
|
|
<SelectParameters>
|
|
<asp:SessionParameter DefaultValue="0" Name="idMap" SessionField="IdMap" Type="Int32" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
|
|
</div>
|
|
|
|
|
|
</asp:Content>
|
|
|