<?xml version = '1.0' encoding = 'UTF-8'?>
<page xmlns="http://bali.us.oracle.com/cabo/baja" 
      xmlns:baja="http://bali.us.oracle.com/cabo/baja"       
      xmlns:data="http://bali.us.oracle.com/cabo/marlin"       
      xmlns:marlin="http://bali.us.oracle.com/cabo/marlin" 
      xmlns:html="http://www.w3.org/TR/REC-html40">
  
  <handlers>
    <!-- use this handler to enter this page -->
    <event name="doLoad">
      <method class="oracle.sysman.eml.mntr.metrics.MetricsDataObject"
              method="doLoad"/>
    </event>
  </handlers>
  <baja:content xmlns="http://bali.us.oracle.com/cabo/marlin" >
    <dataScope>
      <provider>
        <data name="timeData">
            <method class="oracle.sysman.eml.mntr.util.CommonDataObject" 
                    method="getCurrentTime"/>
        </data>
        <data name="allMetricData">
            <method class="oracle.sysman.eml.mntr.metrics.em2go.MetricsDataObjectEm2go" 
                    method="getAllMetricData"/>
        </data>
        <data name="commonResourceBundle">
            <bundle class="oracle.sysman.resources.CommonResourceBundle"/>
        </data>
        <data name="mntrResourceBundle">
            <bundle class="oracle.sysman.resources.MntrResourceBundle"/>
        </data>
      </provider>
      <contents>
        <html:title>
          <text data:text="header@allMetricData" />
        </html:title> 

        <!-- pageLayout xmlns="http://bali.us.oracle.com/cabo/marlin" >
          <mediumAdvertisement>
            <include baja:node="../oemBanner" />
          </mediumAdvertisement>
          <marlin:location>
            <include baja:node="../breadCrumbs" />
          </marlin:location>
          <copyright><text marlin:text="COPYRIGHT@commonResourceBundle"/></copyright>

          <marlin:contents -->

          <include baja:node="../../em2go/em2goGlobalBanner"/>
          <include baja:node="../../em2go/em2goBreadCrumbs"/>

          <styledText styleClass="OraHeaderSubSub" data:text="header@allMetricData"/>

                <rowLayout>
                  <contents>
                        <styledText styleClass="OraInlineInfoText" 
				    marlin:text="LAST_REFRESHED@mntrResourceBundle"/>
                        <spacer width="4"/>
                        <styledText styleClass="OraInlineInfoText" data:text="timestamp@timeData"/>
                  </contents>
                </rowLayout>

                    <switcher data:childName="node@allMetricData">
                      <case name="okNode">

        <!--.............. Converting from tableLayout to table format due to performance reason .............-->
<!-- Comment out not in use

        <table partialRenderMode="self"
               id="allMetricsTable" 
               width="100%"
               alternateText="No Metric Data Found."
               data:tableData="row@allMetricData"
               data:value="value@allMetricData"
               data:minValue="minValue@allMetricData"
               data:maxValue="maxValue@allMetricData"
               data:blockSize="blockSize@allMetricData">

          <tableFormat tableBanding="rowBanding"/>
          <columnHeaderFormats>
             <columnHeaderFormat cellNoWrapFormat="false"/>
             <columnHeaderFormat cellNoWrapFormat="true"/>
          </columnHeaderFormats>
          <columnHeaderStamp>
             <styledText styleClass="OraTableColumnHeader" data:text="textKey"/>
          </columnHeaderStamp>
          <columnHeaderData>
             <col textKey="Metric Name"/>
             <col textKey="Metric Column"/>
          </columnHeaderData>
          <columnFormats>
            <columnFormat width="20%"/>
            <columnFormat width="80%"/>
          </columnFormats>

          <contents>
            <styledText data:text="metric1" styleClass="OraHeaderSubSub"/>                     
            <tableLayout> 
              <contents data:childData="mcData1">
                <rowLayout>
                  <contents>
                    <cellFormat wrappingDisabled="true">
                      <contents>  
                        <image data:source="severity" data:destination="severityDest" 
                                                      rendered="true" data:rendered="hasSeverity"/>
                        <spacer width="4" rendered="true" data:rendered="hasSeverity"/>
                        <styledText data:text="metricColumn" data:destination="metricColumnDest"/>
                      </contents>
                     </cellFormat>
                   </contents>
                </rowLayout>
              </contents>
            </tableLayout>
          </contents>
        </table>
-->
        <!--.............. End Converting from tableLayout to table format .............-->

                        <tableLayout>
                          <contents data:childData="row@allMetricData">
                            <rowLayout>
                              <contents>

                                <header data:text="metric1" rendered="false" data:rendered="hasMetric1">
                                  <contents>
                                   <!-- ................. We have drill down for each metric ................. -->
                                   <styledText styleClass="OraPromptText" data:text="metric1" 
                                               rendered="false" data:rendered="hasMetric1"
                                               data:destination="metric1Dest"/>

                                    <!-- tableLayout>
                                      <contents data:childData="mcData1">
                                        <rowLayout hAlign="left" vAlign="top">
                                          <contents>
                                            <cellFormat>
                                              <contents>
                                                <image data:source="severity" data:destination="severityDest" 
                                                       rendered="true" data:rendered="hasSeverity"/>
                                              </contents>
                                            </cellFormat>
                                            <spacer width="10"/>
                                            <cellFormat>
                                              <contents>
                                                <styledText data:text="metricColumn" data:destination="metricColumnDest"/>
                                              </contents>
                                            </flowLayout>
                                            </cellFormat>
                                          </contents>
                                        </rowLayout>
                                      </contents>
                                    </tableLayout -->

                                  </contents>
                                </header>
			      </contents>
			    </rowLayout>
	
                            <!-- rowLayout>
                              <contents>
                                <header data:text="metric2" rendered = "false" data:rendered="hasMetric2">
                                  <contents>
                                   <styledText styleClass="OraHeaderSubSub" data:text="metric2" rendered="false" data:rendered="hasMetric2"/>
                                    <tableLayout>
                                      <contents data:childData="mcData2">
                                        <rowLayout hAlign="left" vAlign="top">
                                          <contents>
                                            <cellFormat>
                                              <contents>
                                                <image data:source="severity" data:destination="severityDest" 
                                                       rendered="true" data:rendered="hasSeverity"/>
                                              </contents>
                                            </cellFormat>
                                            <spacer width="10"/>
                                            <cellFormat>
                                              <contents>
                                                <styledText data:text="metricColumn" data:destination="metricColumnDest"/>
                                              </contents>
                                            </cellFormat>
                                          </contents>
                                        </rowLayout>
                                      </contents>
                                    </tableLayout>
                                  </contents>
                                </header>
                              </contents>
                            </rowLayout-->

                          </contents>
                        </tableLayout>

                      </case>
                      <case name="errNode">
                      <stackLayout><contents>
                        <messageBox messageType="error" />
                                <!-- longDescURL="unimpl"
                                text="An error has occurred!" -->
                        <styledText styleClass="OraInlineErrorText" data:text="errMsg@allMetricData" />
                      </contents></stackLayout>
                      </case>
                    </switcher>
          <!-- /marlin:contents>
        </pageLayout -->
      
          <include baja:node="../../em2go/em2goGlobalFooter"/>

      </contents>
    </dataScope>
  </baja:content>
</page>
