Hi, Hope somebody can shed some light on this issue. I still could not
figure out why my changes are not working.

I suspect the webpages /js files are generated and stored somewhere? that
why the modified codes did not take place? If so, where should I delete
these files so that the next time when opennms will generate these files
again and take modified codes?

I doubled checked the jar file, it contains the modified navbar.tfl

I commented everything inside the if statement

if (window.location != window.parent.location &&
window.name.indexOf("-with-header") == -1) {
   // Hide the header
   //$("#header").hide();
   // Remove any padding from the body
  //$("body.fixed-nav").attr('style', 'padding-top: 0px !important');
}


but when viewing source on the browser I still got the older version of
this code:

<script type='text/javascript'>
if (window.location != window.parent.location) {
  // Hide the header
  $("#header").hide();
  // Remove any padding from the body
  $("body.fixed-nav").attr('style', 'padding-top: 0px !important');
}
</script>
<!-- End bootstrap header -->

I tried stop opennms, restart the machine, nothing make any difference.

Thanks for any tips.

-rockdale





On Wed, Nov 2, 2016 at 7:16 PM, Rockdale Green <rockdale.gr...@gmail.com>
wrote:

> Hi, Jesse:
>
> Sorry for the late reply. Thanks for the link. That exactly what I needed.
>
> I updated the navbar.tfl, but it is still not working. When I view the
> iframe source (or page source when browser the webpage outside a iframe)
> It still shows
>
> <script type='text/javascript'>
> if (window.location != window.parent.location) {
>   // Hide the header
>   $("#header").hide();
>   // Remove any padding from the body
>   $("body.fixed-nav").attr('style', 'padding-top: 0px !important');
> }
> </script>
> <!-- End bootstrap header -->
>
> looks the change did not get to the client. Does the server cached the
> older webpage somehow. I verified that the ftl is changed. stopped openNMS
> when I made the change.  Started the openNMS, and I also made sure that the
> web browser cleared all the cache/histories. Here are the steps I did:
>
> 1. stop opennms by issue:
> opennms stop
>
> 2. copied opennms-webapp-18.0.0.jar from 
> /usr/share/opennms/jetty-webapps/opennms/WEB-INF/lib
> to /usr/myusername/test
>
> 3. under dir /usr/myusername/test issue:
>  jar xf opennms-webapp.18.0.0.jar to extract the jar
>
> 4. went to /usr/myusername/test/org/opennms/web/controller to edit
> navbar.ftl file. (I actually commented out the whole $("#header").hide();
> line just to make sure)
>
> following are the changes:
> if (window.location != window.parent.location &&
> window.name.indexOf("-with-header") == -1) {
>   // Hide the header
>   //$("#header").hide();
>   // Remove any padding from the body
>   $("body.fixed-nav").attr('style', 'padding-top: 0px !important');
> }
>
> 5 went back to dir  /usr/myusername/test and issue:
> jar uf opennms-webapp-18.0.0.jar org/opennms/webcontroller/navbar.ftl
>
> 6. copied opennms-webapp-18.0.0.jar under  /usr/myusername/test to another
> directory and extract the jar to verify the navbar.ftl contains the changes
> I just made.
>
> 7. copied opennms-webapp-18.0.0.jar to /usr/share/opennms/jetty-
> webapps/opennms/WEB-INF/lib
>
> 8. issue " opennms start " to start opennms
>
> Did I missing something? I searched the files extracted from
> opennms-webapp-18.0.0.jar and did not find any other places contain
> $("#header").hide(); at all. navbar.ftl is the only file that contains it.
>
> Any help is very much appreciated.
> -rockdale
>
>
> On Fri, Oct 28, 2016 at 8:46 AM, Jesse White <je...@opennms.org> wrote:
>
>> Oops. Take a look at the commit referenced in this JIRA issue instead:
>>     https://issues.opennms.org/browse/HZN-929
>>
>> If you're not compiling from source, you can try making the changes to
>> the navbar.ftl file in the following .jar:
>>     ${OPENNMS_HOME}/jetty-webapps/opennms/WEB-INF/lib/opennms-we
>> bapp-${version}.jar
>> -Jesse
>>
>>
>> On 10/28/2016 08:39 AM, Rockdale Green wrote:
>>
>> Hi, Jesse:
>>
>> Thanks for your reply. I went to the link but it shows the commit is
>> missing?
>>
>> We went looking everywhere, but couldn’t find those commits.
>>
>> Sometimes commits can disappear after a force-push. Head back to the latest
>> changes here <https://github.com/OpenNMS/opennms/pull/1088/files>.
>>
>>
>> Though the commit is very useful - we also trying to do auto-login.
>> Allow login via GET requests #1088
>>
>> I actually tried to enable anonymous access for all, Add Anonymous_role
>> in applicationContext_spring_security.xml wherever USER_ROLE appears.
>> The top navigation is missing even access from web browser. (not within an
>> iframe).
>>
>>
>> On Thu, Oct 27, 2016 at 9:35 AM, Jesse White <je...@opennms.org> wrote:
>>
>>> Hi Rockdale,
>>>
>>> We actually ran into this recently too. Try making these changes:
>>>
>>>    https://github.com/OpenNMS/opennms/pull/1088/commits/6b5ef62
>>> 94690b0c5da56e15ebefaef1a9d31c7c2
>>> Best,
>>> Jesse
>>>
>>>
>>> On 10/27/2016 09:22 AM, Rockdale Green wrote:
>>>
>>> Hi, all:
>>>
>>> This is the first time I work with OpenNMS. We are trying to host/embed
>>> openNMS web interface inside one of the webpage in our intranet website. I
>>> thought this should be straight forward but the top navbar and horizon logo
>>> are disappearing when embedded in an IFrame. What left is just
>>> the breadcrumb (home>.....) and the content.  Looked in the
>>> /includes/bootstrap.jsp. It is these lines
>>>
>>>
>>> <c:choose>
>>>   <c:when test="${param.quiet == 'true'}">
>>>
>>>   </c:when>
>>>   <c:otherwise>
>>>     <jsp:include page="/navBar.htm" flush="false" />
>>>   </c:otherwise>
>>> </c:choose>
>>>
>>>
>>> So I commented out the c:choose and make the /NavBar.htm alway gets
>>> included. But it is still not showing. Also I cannot find NavBar.htm
>>> anywhere nor NavBar.jsp files in the source code. Are they generated on the
>>> run time?  You can tell I am pretty new for JSP/Spring. Any help/hints will
>>> be much appreciated.
>>>
>>> Thanks in advance
>>> -rockdale
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The Command Line: Reinvented for Modern Developers
>>> Did the resurgence of CLI tooling catch you by surprise?
>>> Reconnect with the command line and become more productive.
>>> Learn the new .NET and ASP.NET CLI. Get your free 
>>> copy!http://sdm.link/telerik
>>>
>>> _______________________________________________
>>> Please read the OpenNMS Mailing List 
>>> FAQ:http://www.opennms.org/index.php/Mailing_List_FAQ
>>>
>>> opennms-devel mailing list
>>>
>>> To *unsubscribe* or change your subscription options, see the bottom of 
>>> this page:https://lists.sourceforge.net/lists/listinfo/opennms-devel
>>>
>>> ------------------------------------------------------------------------------
>>> The Command Line: Reinvented for Modern Developers Did the resurgence of
>>> CLI tooling catch you by surprise? Reconnect with the command line and
>>> become more productive. Learn the new .NET and ASP.NET CLI. Get your
>>> free copy! http://sdm.link/telerik 
>>> _______________________________________________
>>> Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.p
>>> hp/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or
>>> change your subscription options, see the bottom of this page:
>>> https://lists.sourceforge.net/lists/listinfo/opennms-devel
>>
>> ------------------------------------------------------------------------------
>> The Command Line: Reinvented for Modern Developers
>> Did the resurgence of CLI tooling catch you by surprise?
>> Reconnect with the command line and become more productive.
>> Learn the new .NET and ASP.NET CLI. Get your free 
>> copy!http://sdm.link/telerik
>>
>> _______________________________________________
>> Please read the OpenNMS Mailing List 
>> FAQ:http://www.opennms.org/index.php/Mailing_List_FAQ
>>
>> opennms-devel mailing list
>>
>> To *unsubscribe* or change your subscription options, see the bottom of this 
>> page:https://lists.sourceforge.net/lists/listinfo/opennms-devel
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> The Command Line: Reinvented for Modern Developers
>> Did the resurgence of CLI tooling catch you by surprise?
>> Reconnect with the command line and become more productive.
>> Learn the new .NET and ASP.NET CLI. Get your free copy!
>> http://sdm.link/telerik
>> _______________________________________________
>> Please read the OpenNMS Mailing List FAQ:
>> http://www.opennms.org/index.php/Mailing_List_FAQ
>>
>> opennms-devel mailing list
>>
>> To *unsubscribe* or change your subscription options, see the bottom of
>> this page:
>> https://lists.sourceforge.net/lists/listinfo/opennms-devel
>>
>
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to