<!--
 *
 *      NAME
 *       historyHostConfig.uix
 *
 *      NOTES
 *       Table to view Host Configuration History
 *
 *
 *  @author  kChiasson
 *
-->

<page xmlns="http://bali.us.oracle.com/cabo/baja"
      xmlns:baja="http://bali.us.oracle.com/cabo/baja"
      xmlns:uix="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"
      xmlns:data="http://bali.us.oracle.com/cabo/marlin">

 <baja:head   xmlns="http://bali.us.oracle.com/cabo/marlin"
              xmlns:uix="http://bali.us.oracle.com/cabo/marlin"
              xmlns:html="http://www.w3.org/TR/REC-html40">


   <dataScope>
      <contents>
      <head xmlns="http://xmlns.oracle.com/uix/ui"
         uix:title="pageTitle@getPageTitle"/>
      </contents>
      <provider>
        <data name="getPageTitle">
          <method class="oracle.sysman.eml.ecm.track.HistoryTrackData" method="getPageTitle"/>
        </data>
      </provider>
    </dataScope>
 </baja:head>
 
    <!-- special handler to load help topic -->
   <handlers>
    <event name="null">
      <method class="oracle.sysman.eml.ecm.OnlineHelp"
              method="loadHistoryHelpTopic"/>
    </event>
   </handlers>

  <baja:content xmlns="http://bali.us.oracle.com/cabo/marlin">
  <dataScope>
  <contents>

        <pageLayout xmlns="http://bali.us.oracle.com/cabo/marlin"
            uix:title="headerTitle@getPageTitle">

          <mediumAdvertisement>
            <include baja:node="../../../oemBanner" />
          </mediumAdvertisement>
          <globalButtons>
            <include baja:node="../../../globalButtonBar" />
          </globalButtons>
          <marlin:tabs>
            <include baja:node="../../../globalTabs" />
          </marlin:tabs>

          <marlin:pageHeader>
            <include baja:node="../../../globalHeader" />
          </marlin:pageHeader>

          <marlin:location>
            <include baja:node="../../../breadCrumbs" />
          </marlin:location>

          <copyright>
            <include baja:node="../../../copyright" />
          </copyright>

<!-- *************  End Standard Header ************* -->

          <contents>
          <messageBox automatic="true" />

            <form name="historyHostConfig" >
              <contents>
                <formValue name="blockStart" uix:value="blockStart@patchList"/>

                  <stackLayout>
                  <contents>

                 <tableLayout width="100%">
                  <contents>
                    
                    <rowLayout>
                    <contents>  
                    <switcher marlin:childName="status@historyData">
                      <case name="success">
                        <messageChoice
                              name="dateFilter"
                              data:selectedValue="dateFilterSelectedValue@historyData"
                              data:prompt="VIEW@TrkResourceBundle"
                              onChange="submitForm('historyHostConfig', true, {'event':'filterWithDate'})">
                           <contents data:childData="dateFilterList@historyData">
                            <option data:text="filterName"                                 
                                    data:value="filterValue"/>                       
                           </contents>
                        </messageChoice>
                       </case>
                      </switcher>
                     </contents>
                    </rowLayout>

                    <rowLayout>
                    <contents>

                     <switcher marlin:childName="status@historyData">
                      <case name="failure">
                        <messageBox automatic="false"
                                    uix:message= "ERR_LOADHISTORY@ResourceBundle"
                                    messageType="error" />
                      </case>
                      <case name="success">

                      <table name="historyTable" width="100%"
                            formSubmitted="true"
                            minValue="1"
                            showAll="yes"
                            uix:value="value@historyData"
                            uix:maxValue="maxValue@historyData"
                            uix:blockSize="blockSize@historyData"
                            uix:alternateText="PW_ALT_NOHISTORY@ResourceBundle"
                            uix:tableData="tabledata@historyData">
                          <tableFormat tableBanding="rowBanding"/>

                           <columnHeaderStamp>
                            <sortableHeader data:text="text"
                                uix:value="value"
                                uix:sortable="sort">
                            <boundAttribute name="sortable">
                            <defaulting>
                                <dataObject data:source="(value)@sortColumnHeader"/>
                                <dataObject select="sort"/>
                            </defaulting>
                            </boundAttribute>
                            </sortableHeader>
                           </columnHeaderStamp>

                          <columnHeaderData>
                                <col uix:sort="SORT_DELTATIME@historyData"      value="LBL_DELTATIME"   uix:text="COLHDR_DELTATIME@ResourceBundle"/>
                                <col uix:sort="SORT_OPERATION@historyData"      value="LBL_OPERATION"   uix:text="COLHDR_OPERATION@ResourceBundle"/>
                                <col uix:sort="SORT_CATAGORY@historyData"       value="LBL_CATEGORY"    uix:text="COLHDR_CATEGORY@ResourceBundle"/>
                                <col uix:sort="SORT_KEY@historyData"            value="LBL_KEY"         uix:text="COLHDR_KEY@ResourceBundle"/>
                                <col uix:sort="SORT_DETAILS@historyData"        value="LBL_DETAILS"     uix:text="COLHDR_DETAILS@ResourceBundle"/>
                          </columnHeaderData>


                          <contents>
                           <styledText uix:text="LBL_DELTATIME"/>
                           <styledText uix:text="LBL_OPERATION"/>
                           <styledText uix:text="LBL_CATEGORY"/>
                           <styledText uix:text="LBL_KEY"/>
                           <styledText uix:text="LBL_DETAILS"/>
                         </contents>

                        </table>

                      </case>
                     </switcher>

                    </contents>
                    </rowLayout>
                   </contents>
                   </tableLayout>
                  </contents>
                </stackLayout>

            </contents>
            </form>
            <spacer height="20"/>

          </contents>
        </pageLayout>
      </contents>

      <provider>
        <data name="ResourceBundle">
           <bundle class = "oracle.sysman.eml.ecm.track.HistoryTrackResourceBundle"/>
        </data>

        <data name="TrkResourceBundle">
           <bundle class = "oracle.sysman.eml.ecm.resources.TrackResourceBundle"/>
        </data>

        <data xmlns="http://bali.us.oracle.com/cabo/marlin" name="historyData">
           <method class="oracle.sysman.eml.ecm.track.HistoryTrackData" method="populateHistoryTable"/>
        </data>

        <data name="sortColumnHeader">
            <method class="oracle.sysman.eml.ecm.track.HistoryTrackData"
                 method="getSortColumnHeader"/>
        </data>

        <data xmlns="http://bali.us.oracle.com/cabo/marlin" name="getTitle">
           <method class="oracle.sysman.eml.ecm.track.HistoryTrackData" method="getTitle"/>
        </data>

        <data name="getPageTitle">
           <method class="oracle.sysman.eml.ecm.track.HistoryTrackData"
                method="getPageTitle"/>
        </data>

     </provider>

    </dataScope>

  </baja:content>


    <handlers>

      <!-- This handles the next/prev buttons in the admin table -->
      <event name="goto">
        <method class="oracle.sysman.eml.ecm.track.HistoryTrackHandler"
          method ="tableGoto"/>
      </event>

      <event name="sort">
        <method class="oracle.sysman.eml.ecm.track.HistoryTrackHandler"
          method="doSort"/>
      </event>

      <event name="filterWithDate">
        <method class="oracle.sysman.eml.ecm.track.HistoryTrackHandler"
          method="filterWithDate"/>
      </event>     

    </handlers>


</page>

