diff options
Diffstat (limited to 'tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs')
4 files changed, 0 insertions, 456 deletions
diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/index.html b/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/index.html deleted file mode 100644 index 911f66e013..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/index.html +++ /dev/null @@ -1,290 +0,0 @@ -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> - -<HTML> -<HEAD> - <TITLE>Apache Tuscany Alert Aggregator Sample</TITLE> - <link REL="stylesheet" TYPE="text/css" href="style.css"> -</HEAD> - -<BODY ONLOAD="getSources('')"> -<script type="text/javascript"> -function getXMLHTTP() -{ - var xmlHttp; - try - { - // Firefox, Opera 8.0+, Safari - xmlHttp=new XMLHttpRequest(); - } - catch (e) - { - // Internet Explorer - try - { - xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) - { - try - { - xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (e) - { - alert("Your browser does not support AJAX!"); - return false; - } - } - } - return xmlHttp; -} - -var callIsRunning = false; - -function getAlerts(sourceid) -{ - var xmlHttp = getXMLHTTP(); - xmlHttp.onreadystatechange=function() - { - var refr = document.getElementById("refresh"); - if(xmlHttp.readyState<4) - { - callIsRunning = true; - refr.innerHTML="<SPAN>Updating...</SPAN>"; - } - if(xmlHttp.readyState==4) - { - callIsRunning = false; - refr.innerHTML="<SPAN CLASS=\"clickable link\" ONCLICK=\"getAlerts('')\">Refresh</SPAN>"; - document.getElementById("alertTable").innerHTML=xmlHttp.responseText; - } - } - - if(!callIsRunning) - { - if(sourceid=='') - { - xmlHttp.open("GET","rest/sample.display.DisplayComponent/HTMLDisplayService/updateAllAlertsHTMLTable",true); - } - else - { - xmlHttp.open("GET","rest/sample.display.DisplayComponent/HTMLDisplayService/updateSourceAlertsHTMLTable?sourceId="+sourceid,true); - } - xmlHttp.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" ); - xmlHttp.send(null); - } - - // Call this function again after x minutes - setTimeout("getAlerts('');", 5*60000); -} - -function displayAlert(url, alertid) -{ - if(alertid=="") - { - document.getElementById("alertData").innerHTML="<IFRAME CLASS=\"alert_data\" SRC=\""+url+"\"/>"; - window.location="#data"; - return; - } - - document.getElementById(alertid).className="read_title"; - - var xmlHttp = getXMLHTTP() - xmlHttp.onreadystatechange=function() - { - if(xmlHttp.readyState==4) - { - if(xmlHttp.responseText=="") - { - document.getElementById("alertData").innerHTML="<IFRAME CLASS=\"alert_data\" SRC=\""+url+"\"/>"; - } - else - { - document.getElementById("alertData").innerHTML=xmlHttp.responseText; - } - window.location="#data"; - } - } - - xmlHttp.open("GET","rest/sample.display.DisplayComponent/HTMLDisplayService/readAlert?alertID="+alertid,true); - xmlHttp.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" ); - xmlHttp.send(null); -} - -function getSources(sourceid) -{ - var xmlHttp = getXMLHTTP() - xmlHttp.onreadystatechange=function() - { - var refreshSources = document.getElementById("refreshSources"); - var refresh = document.getElementById("refresh"); - if(xmlHttp.readyState<4) - { - refreshSources.innerHTML=" (Updating...)"; - refresh.innerHTML="<SPAN>Updating...</SPAN>"; - } - if(xmlHttp.readyState==4) - { - refreshSources.innerHTML=""; - document.getElementById("sourcesTable").innerHTML=xmlHttp.responseText; - getAlerts(sourceid); - } - } - xmlHttp.open("GET","rest/sample.display.DisplayComponent/HTMLDisplayService/getAlertSourcesHTMLTable",true); - xmlHttp.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" ); - xmlHttp.send(null); -} - -function showEditSource(sourceid) -{ - document.getElementById("edit_source_"+sourceid).className = "source_"+sourceid; -} - -function hideEditSource(sourceid) -{ - document.getElementById("edit_source_"+sourceid).className = "hidden source_"+sourceid; -} - -function updateSource(sourceid) -{ - hideEditSource(sourceid); - var type = document.getElementById("source_"+sourceid+"_type").value; - var sourceXML = constructSourceXML(sourceid, type); - - sendSourceData("rest/sample.display.DisplayComponent/HTMLDisplayService/updateAlertSource", sourceXML, sourceid); -} - -function sendSourceData(url, sourceXML, sourceid) -{ - var xmlHttp = getXMLHTTP() - xmlHttp.onreadystatechange=function() - { - var refreshSources = document.getElementById("refreshSources"); - var refresh = document.getElementById("refresh"); - if(xmlHttp.readyState<4) - { - refreshSources.innerHTML=" (Updating...)"; - refresh.innerHTML="<SPAN>Updating...</SPAN>"; - } - if(xmlHttp.readyState==4) - { - getSources(sourceid); - } - } - xmlHttp.open("POST",url,true); - xmlHttp.send(sourceXML); - -} - -function deleteSource(sourceid) -{ - var xmlHttp = getXMLHTTP() - xmlHttp.onreadystatechange=function() - { - if(xmlHttp.readyState==4) - { - getSources(''); - document.getElementById("alertData").innerHTML=""; - } - } - xmlHttp.open("GET","rest/sample.display.DisplayComponent/HTMLDisplayService/deleteAlertSource?sourceId="+sourceid,true); - xmlHttp.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" ); - xmlHttp.send(null); -} - -function showAddNewSource(sourceid) -{ - document.getElementById("add_source_"+sourceid).className = "source_"+sourceid; -} - -function hideAddNewSource(sourceid) -{ - document.getElementById("add_source_"+sourceid).className = "hidden source_"+sourceid; -} - -function showSourceType(sourceid) -{ - var typeElem = document.getElementById("source_"+sourceid+"_type"); - var type = typeElem.options[typeElem.selectedIndex].value; - - if(type=="rss") - { - document.getElementById("add_rss_source").className = ""; - document.getElementById("add_pop_source").className = "hidden"; - } - else if(type=="pop") - { - document.getElementById("add_rss_source").className = "hidden"; - document.getElementById("add_pop_source").className = ""; - } -} - -function addSource(sourceid) -{ - hideAddNewSource(sourceid); - - var typeElem = document.getElementById("source_"+sourceid+"_type"); - var type = typeElem.options[typeElem.selectedIndex].value; - var sourceXML = constructSourceXML(sourceid, type); - - sendSourceData("rest/sample.display.DisplayComponent/HTMLDisplayService/addAlertSource", sourceXML, sourceid); - -} - -function constructSourceXML(sourceid, type) -{ - var name = document.getElementById("source_"+sourceid+"_name").value; - var address = document.getElementById("source_"+sourceid+"_address").value; - - var sourceXML = "<source xmlns=\"http://tuscany.apache.org/samples/alerter\" type=\""+type+"\" id=\""+sourceid+"\">"; - sourceXML += "<name>"+name+"</name>"; - sourceXML += "<address>"+address+"</address>"; - - if(type=="rss") - { - var feedAddress = document.getElementById("source_"+sourceid+"_feedAddress").value; - sourceXML += "<feedAddress>"+feedAddress+"</feedAddress>"; - } - else if(type=="pop") - { - var popServer = document.getElementById("source_"+sourceid+"_popServer").value; - sourceXML += "<popServer>"+popServer+"</popServer>"; - var popUsername = document.getElementById("source_"+sourceid+"_popUsername").value; - sourceXML += "<popUsername>"+popUsername+"</popUsername>"; - var popPassword = document.getElementById("source_"+sourceid+"_popPassword").value; - sourceXML += "<popPassword>"+popPassword+"</popPassword>"; - } - sourceXML += "</source>"; - - return sourceXML; -} -</script> -<H1 ID="top">Apache Tuscany Alert Aggregator Sample</H1> -<P>Alert Sources<SPAN ID="refreshSources"></SPAN>:</P> -<DIV ID="sourcesTable"></DIV> -<P>Recent Alerts (<SPAN ID="refresh"><SPAN CLASS="clickable link" ONCLICK="getAlerts('')">Refresh</SPAN></SPAN>):</P> -<DIV ID="alertTable"></DIV> -<HR></HR> -<P><A ID="data" HREF="#top">Back to top</A></P> -<DIV ID="alertData"></DIV> - -</BODY> -</HTML> - diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/pop.png b/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/pop.png Binary files differdeleted file mode 100644 index 1cf1df24a7..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/pop.png +++ /dev/null diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/rss.png b/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/rss.png Binary files differdeleted file mode 100644 index b3c949d224..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/rss.png +++ /dev/null diff --git a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/style.css b/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/style.css deleted file mode 100644 index cd377e90e5..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/samples/AlertAggregator/httpserver/htdocs/style.css +++ /dev/null @@ -1,166 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-p,table,li,h1,h2,h3
-{
-font-family: verdana, arial, 'sans serif';
-}
-
-p, h1, h2, h3, table, li, hr
-{
-margin-left: 10pt;
-}
-
-table
-{
-border-color: black;
-border-collapse: separate;
-border-spacing: 0px 1px;
-
-margin-right: 10pt;
-margin-left: 10pt;
-width: 800px;
-}
-
-.sourceDetailsTable
-{
-width: 600px;
-}
-
-tr, td
-{
-margin-left: 0pt;
-margin-right: 0pt;
-padding-left: 10pt;
-font-size: 90%;
-}
-
-p,li,th
-{
-font-size: 90%;
-margin-left: 10pt;
-}
-
-pre
-{
-margin-left: 10pt;
-}
-
-body
-{
-#ffffff;
-}
-
-h1,h2,h3,hr
-{
-color: firebrick;
-}
-
-a:link {COLOR: firebrick;}
-a:visited {COLOR: firebrick;}
-a:active {COLOR: navy;}
-
-.link
-{
-COLOR: firebrick;
-text-decoration: underline;
-}
-
-.clickable
-{
-cursor: pointer
-}
-
-.unread_title
-{
-font-weight: bold;
-}
-
-.read_title
-{
-font-weight: normal;
-}
-
-.summary
-{
-color: DimGrey;
-}
-
-.hidden
-{
-display: none;
-}
-
-.alert_data
-{
-margin-left: 10px;
-width: 800px;
-height: 800px;
-}
-
-.source_0
-{
-background-color: LightGreen;
-}
-
-.source_1
-{
-background-color: LightSkyBlue;
-}
-
-.source_2
-{
-background-color: Khaki;
-}
-
-.source_3
-{
-background-color: LightPink;
-}
-
-.source_4
-{
-background-color: Orange;
-}
-
-.source_5
-{
-background-color: LightCoral;
-}
-
-.source_6
-{
-background-color: Orchid;
-}
-
-.source_7
-{
-background-color: Peru;
-}
-
-.source_8
-{
-background-color: SpringGreen;
-}
-
-.source_9
-{
-background-color: LightGrey;
-}
-
|