Results 1 to 6 of 6

Thread: html zimlet tab intrAnet

  1. #1
    gimecoffee is offline Intermediate Member
    Join Date
    Apr 2010
    Location
    Bend, Or
    Posts
    18
    Rep Power
    5

    Default html zimlet tab intrAnet

    I have a zimlet tab pulling a web-app from an intrAnet ONLY web server (not available on the Internet.) The tab doesn't work when the staffer is accessing the Zimbra web-mail from outside our local network. Without actually putting my webapp on the Internet is there a way to proxy that application through when the user is outside the our internal LAN? I thought maybe the proxy servlet but that seems to be talking about AJAX requests and this is a whole webapp.

    Thoughts?
    Rois Cannon

  2. #2
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    It should be possible to "proxy" the app, but the way to do it will probably change with what you want to display in zimbra.

    What does your zimlet actually do? Does it make an iframe in a zimlet tab?

  3. #3
    gimecoffee is offline Intermediate Member
    Join Date
    Apr 2010
    Location
    Bend, Or
    Posts
    18
    Rep Power
    5

    Default

    I altered the sample zimlet com_zimbra_tabiframe to point to my internal LAN webserver.

    Thanx for the help.
    Rois Cannon

  4. #4
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    You can create a proxy accessible externally.
    You set it to allow you with an url to access your internal LAN webserver.
    Then you use this url in the iframe of the zimlet.

    Since you don't want to actually put your webapp on the Internet accessible to anyone, you can limit the access to the proxy by checking for example if the person accessing the proxy is authenticated by zimbra.

  5. #5
    gimecoffee is offline Intermediate Member
    Join Date
    Apr 2010
    Location
    Bend, Or
    Posts
    18
    Rep Power
    5

    Default

    Are you talking about a completely separate "reverse" proxy server on our firewall?

    I got the proxy to work in the zimlet tab but it only works on the initial page. It doesn't rewrite the links correctly so the app doesn't appear to function.

    For example (trying to make a Hesk help desk accessible to staff when outside the LAN):
    Internal ONLY address to Hesk is
    Code:
    http://hesk.myinternaldomain.com/
    The proxy URL in the js file is
    Code:
    https://mydomain.com/service/proxy?target=http://hesk.myinternaldomain.com/
    Initial page does show up in the tab but it's not formatted correctly so css files aren't making it through the proxy. "Submit a ticket" link should be
    Code:
    http://hesk.coosbay.cardinal-services.com/index.php?a=add
    when NOT through a proxy so the proxy address should be
    Code:
    https://mydomain.com/service/proxy?target=http://hesk.coosbay.cardinal-services.com/index.php?a=add
    but it's showing up as
    Code:
    https://zimbra.cardinal-services.com/service/index.php?a=add
    Mixing and matching URL parts.

    Sorry I'm a newbie to zimlet writing so I'm mostly copying samples zimlets and altering at this point. Can this be done through a zimlet tab? I'm happy to do the reading and figure this out if you could point me at a zimlet page page with instructions and/or samples that would be great. Here is the js from the zimlet tab sample with my alterations of the com name and source URL.
    Code:
    /*
     * ***** BEGIN LICENSE BLOCK *****
     * Zimbra Collaboration Suite Zimlets
     * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
     * 
     * The contents of this file are subject to the Zimbra Public License
     * Version 1.3 ("License"); you may not use this file except in
     * compliance with the License.  You may obtain a copy of the License at
     * http://www.zimbra.com/license.
     * 
     * Software distributed under the License is distributed on an "AS IS"
     * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
     * ***** END LICENSE BLOCK *****
     */
    
    /**
     * Defines the Zimlet handler class.
     *   
     */
    function com_zimbra_heskbeta_HandlerObject() {
    }
    
    /**
     * Makes the Zimlet class a subclass of ZmZimletBase.
     *
     */
    com_zimbra_heskbeta_HandlerObject.prototype = new ZmZimletBase();
    com_zimbra_heskbeta_HandlerObject.prototype.constructor = com_zimbra_heskbeta_HandlerObject;
    
    /**
     * This method gets called by the Zimlet framework when the zimlet loads.
     *  
     */
    com_zimbra_heskbeta_HandlerObject.prototype.init =
    function() {
    
    	this._simpleAppName = this.createApp("HelpDeskBETA", "HeskIcon", "HelpDeskBETA");
    
    };
    
    /**
     * This method gets called by the Zimlet framework each time the application is opened or closed.
     *  
     * @param	{String}	appName		the application name
     * @param	{Boolean}	active		if true, the application status is open; otherwise, false
     */
    com_zimbra_heskbeta_HandlerObject.prototype.appActive =
    function(appName, active) {
    	
    	switch (appName) {
    		case this._simpleAppName: {
    		
    			var app = appCtxt.getApp(appName); // get access to ZmZimletApp
    
    			break;
    		}
    	}
    	
    	// do something
    };
    
    /**
     * This method gets called by the Zimlet framework when the application is opened for the first time.
     *  
     * @param	{String}	appName		the application name		
     */
    com_zimbra_heskbeta_HandlerObject.prototype.appLaunch =
    function(appName) {
    
    	switch (appName) {
    		case this._simpleAppName: {
    			// do something
    		
    			var app = appCtxt.getApp(appName); // get access to ZmZimletApp
    
    			app.setContent("<iframe id=\"tabiframe-app\" name=\"tabiframe-app\" src=\"https://zimbra.mydomain.com/service/proxy?target=http://hesk.mydomain.com\" width=\"100%\" height=\"100%\" /></iframe>"); // write HTML to app
    
    			break;
    		}
    	}
    
    };
    Thx for the help
    Rois Cannon

  6. #6
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    Quote Originally Posted by gimecoffee View Post
    Are you talking about a completely separate "reverse" proxy server on our firewall?
    Yes, I was talking about creating your own proxy.
    Zimbra proxy is not really effective to display web page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Tab Zimlet connecting phpBB &amp; Zimbra
    By spidermonkey2012 in forum Zimlets
    Replies: 2
    Last Post: 02-18-2013, 03:16 PM
  2. Cannot deploy simple tab zimlet
    By fruitloaf in forum Zimlets
    Replies: 2
    Last Post: 10-28-2010, 01:26 PM
  3. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  4. failed to read html content in webmail HTML mode
    By Frederick Cheung in forum Administrators
    Replies: 1
    Last Post: 02-24-2008, 05:32 PM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •