4 Replies Latest reply on May 10, 2011 5:42 AM by ahmad.hasan

    how can i display the remaining time and volume at qouta notifications through MWG 7.1

      my appliance is MWG 4500 with version 7.1

       

      i need to add the remaining time or volume at the time and volume notification messages..

       

      please if any do it before, send to me the html code and tell me what is the name of the template that will be modified.

       

      regards,

        • 1. Re: how can i display the remaining time and volume at qouta notifications through MWG 7.1

          I had the very same problem, the only thing I successfully managed to do is to use the limited Quota.*Remaining* properties...

          Something like -> Quota.Time.RemainingDay to diplay the remaining quota available for the user, on the error page for example, did you try to use them before ?

           

          Regards

           

          Message was edited by: Valeinrete on 09/05/11 07:20:46 CDT
          • 2. Re: how can i display the remaining time and volume at qouta notifications through MWG 7.1

            thanks for replying Valeinrete.

             

            actually i didn't use it before and i don't know how to use this rule and where..

             

            but my need is to inform the user with his remaining time or volume at the page that appears when he requists a site which under Qouta before accepting continue his session.

             

            regards..

            • 3. Re: how can i display the remaining time and volume at qouta notifications through MWG 7.1
              michael_schneider

              You can edit the block message and put in reference to the properties, which contain the exceeded and max available quota to put that into context.

              My example is based on the default rule set from the library. Here is how you edit the respective action.

              edit action template.jpg

              This will display a message looking like this:

              result.jpg

              Here is the blockpage code:

               

               

              <!-- FileName: VolumeSessionExceeded.html
                   Language: [en]
              -->
              <!--Title-->
              <table class='titleTable' background='$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.system.proxy.enduserurl"/>$/files/default/img/bg_navbar.jpg'>
                <tr>
                  <td class='titleData'>
                    Starting new Volume Session
                  </td>
                </tr>
              </table>
              <!--/Title-->
              
              <!--Content-->
              <table class="contentTable">
                <tr>
                  <td class="contentData">
                   Please confirm with pushing the button "<b>Yes, I want to continue the session!</b>" if you want to continue the volume session. After pushing the button you will be navigated to the URL "<script type="text/javascript">computeLastQuotaURL("$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.system.url.raw"/>$", "$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.system.proxy.enduserurl"/>$/plugin?target=QuotaPlugin&quotatype=");</script>".<br /><b>Please note: </b><br />If you continue a volume session, your volume quota will be reduced during the session!
                    <br />
                  </td>
                </tr>
              </table>
              <!--/Content-->
              
              <!--Info-->
              <table class='buttonTable'>
                <form id="activateform" method="post">
                <tr>
                  <td class='infoData'>
                    <b>Please confirm: </b>
                  </td>
                  <td class='infoData' text-align="left">
                    <input class="button" type="button" id="activatebutton" value="Yes, I want to continue the session!" onClick="$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.volquota.js.activatesession"/>$">
                    <br />
                  </td>
                </tr>
              </form>
              </table>
              <table class='infoTable'>
                <tr>
                  <td class='infoData'>
                    <br />
                    <b>URL: </b>
                      <script type="text/javascript">
                        computeLastQuotaURL("$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.system.url.raw"/>$","$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.system.proxy.enduserurl"/>$/plugin?target=QuotaPlugin&quotatype=");
                      </script>
                  </td>
                </tr>
                <tr>
                  <td class='infoData'>
                    <br />
                      <script type="text/javascript">
                        writeToDocument("<b> </b>" + "$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.trustedsource.categorylist.tostring">
                <parameters>
                  <entry>
                    <string>com.scur.engine.trustedsource.categorylist.tostring.categorylist</string>
                    <parameter valueTyp="2">
                      <value>
                        <propertyInstance useMostRecentConfiguration="true" propertyId="com.scur.engine.trustedsource.url.categories"/>
                      </value>
                    </parameter>
                  </entry>
                </parameters>
              </propertyInstance>$" );
                      </script>
                  </td>
                </tr>
                <tr>
                  <td class='infoData'>
                    <b>Quota Type: </b>Volume Quota<br />
                    <b>Remaining Qutoa for today: </b>$<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.stringfilter.number.tovolumestring">
                <parameters>
                  <entry>
                    <string>com.scur.engine.stringfilter.number.tovolumestring.number</string>
                    <parameter valueTyp="2">
                      <value>
                        <propertyInstance useMostRecentConfiguration="false" configurationId="61772204032993712" propertyId="com.scur.engine.volquota.remainingday"/>
                      </value>
                    </parameter>
                  </entry>
                </parameters>
              </propertyInstance>$ of $<propertyInstance useMostRecentConfiguration="false" propertyId="com.scur.engine.stringfilter.number.tovolumestring">
                <parameters>
                  <entry>
                    <string>com.scur.engine.stringfilter.number.tovolumestring.number</string>
                    <parameter valueTyp="2">
                      <value>
                        <propertyInstance useMostRecentConfiguration="false" configurationId="61772204032993712" propertyId="com.scur.engine.volquota.sizeperday"/>
                      </value>
                    </parameter>
                  </entry>
                </parameters>
              </propertyInstance>$
              
                    <br>
                    <br>
                  </td>
                </tr>
              </table>
              <!--/Info-->
              

              best,

              Michael

               

              Message was edited by: michael_schneider on 10/05/2011 10:26:08 CEST