[Plugin] Custom Tab


Recommended Posts

customlarge.png.e0cb690d73cea725de6927fc0abce6a7.png

Custom Tab

 

A very simple plugin to allow you to create a custom tab on unRaid's GUI to integrate a webApp's GUI.  Use it for an app that you may use all the time in managing your system or want very easy access to (Krusader?)

 

While this plugin will allow you to add multiple custom tabs, under unRaid 6.3, the display is limited to 1280 pixels across.  Should the number of tabs added exceed that, you will get overlapping icons, etc.  

 

Settings are very simple.

 

URL or Built-In Page - Lets you choose either a URL (docker App?) or a built-in page of unRaid

Name - What appears on the tabs (limit 20 characters)

Full Name - Self explanatory, limited to 50 characters

URL - A URL to the webApp you want

Width & Height - The width and the height of the frame to display.

Azure / Gray Icon - The fontawesome icon to use for the custom tab when your theme is either Azure or Gray

Tab Position - Where to place the new tab * See below

 

With any docker app that is basically an app built upon a desktop (like Krusader), for best results you're going to want the width and height to match what you have set in the docker template (and ideally the height set so that everything fits on the screen).  With other apps such as Radarr, the height isn't so much important.

 

Regardless, for the best looking display, you're going to want to set the width to be 1280.  But you can play around with it as you choose.

 

Tab Positions

 

The default "Automatic" setting will place all new tabs at the end of the list.  To manually position the tab where ever you like, enter in a number here between 1 and 999

 

Standard tab numbering are as follows:

Dashboard: 1

Main: 1

Shares: 2

Users: 3

Settings: 4

Plugins: 50

Docker: 60

VMs: 70

Apps: 80

Tools: 90

Automatic Custom Tabs: 990-999

When numbers are duplicated, then they will be placed in alphabetical order.

 

IE: To have a custom tab appear before Main, but after Dashboard, set the tab number to be 1 and the name must start with E-O

To place a custom tab before VMs and after plugins (like I do with @dlandon's Libvirt Hotplug USB plugin), you can set the tab number to be 61-69

 

 

 

 

Find the plugin within the Apps tab (search for custom)  After installing, you can create a new tab by going to Settings - User Utilities - Custom Tab

 

There is basic error checking done on the naming (getting rid of quotes, spaces, etc.)  But, if after applying the changes Dynamix starts giving errors referencing defaultPageBuilder (I can't think of everything), then your recourse is to SSH into your server and enter in the following:  But with "normal" naming, you won't run into this.


rm -rf /usr/local/emhttp/plugins/customtabtemp

 

After which you can refresh your browser and remove whatever characters are messing up Dynamix

 

Screenshots showing Krusader in action:

Untitled.png.9103f1351e5417caca7a8845b75d8ca8.pngUntitled.thumb.png.0c925ff0fb8852e09eb73ceb44f10066.png

Edited by Squid
  • Like 1
  • Upvote 6
Link to comment
On 5/12/2017 at 2:07 PM, kizer said:

Cool addon Squid I can think of several things I could use in that Tab. 

Is there any way to install multiple instances of the Plugin for multiple Tabs?

ok.

 

With a view to 6.4 (which BTW I have NOT seen as of yet), I've added in support for up to 100 custom tabs.  Although you're basically limited to 3-4 maximum under 6.3 due to the limited screen real-estate available.  Once you exceed that available real-estate, you will see overlapping sections on the tabs, etc.

Link to comment

Any chance we could get a Midnight Comander  or terminal window in a tab? With full F-key support. I know there is a cli plugin, but it's a bit buried to get to the ui. Something one could change the font size like in putty.  

 

Thanks

Edited by hernandito
Link to comment
  • 3 weeks later...

It should be noted that this plugin will NOT add on to the Icons along the left side of the screen if you are running unRaid 6.4.0-RC1+ and the new azure / gray themes.  It will still add in the custom tabs with 6.4 when running the default Black / White themes.

 

This is out of the plugin's control, and cannot be fixed on my end.  Whether or not LT decides to support custom added icons with the new themes is still TBD.

 

unRaid 6.4RC3+ now supports custom icons.  Added in support to this on the plugin (2017-06-18+)

Edited by Squid
Link to comment
20 minutes ago, Squid said:

It should be noted that this plugin will NOT add on to the Icons along the left side of the screen if you are running unRaid 6.4.0-RC1+ and the new azure / gray themes.  It will still add in the custom tabs with 6.4 when running the default Black / White themes.

 

This is out of the plugin's control, and cannot be fixed on my end.  Whether or not LT decides to support custom added icons with the new themes is still TBD.

 

Support for custom icons needs to be developed. LT just released rc1 :)

 

Link to comment
  • 2 weeks later...

Added in support for custom tabs when using 6.4 RC3+ and the Azure / Gray themes

 

Dynamix utilizes font-awesome for the new themes.  A new entry on each Custom Tab setting will allow you to enter in the appropriate font-awesome code for the icon.

 

This is a list of the font-awesome codes:  http://fontawesome.io/cheatsheet/

 

When looking at it, you'll see entries like:

 

fa-envelope [] 

 

What you need to enter for this particular icon is f0e0  Entering in an invalid code may result in strange results from dynamix (but doesn't appear to cause any crashing of unRaid's UI)

 

 

Link to comment

 

 

Added in support to put any page within unRaid (setting, plugin config, etc) as a custom tab.

 

- I did this because I have the very bad habit of not checking Dynamix Active Streams to see if the wife is watching something before rebooting / stopping the array.

- Any .page file (ie: any Icon in unRaid GUI) can be put on as a custom tab, but note that depending upon how the file is programmed, there may be minor issues (during testing, only CA Auto Update (Docker Settings) had any problems.  Dynamix Active Streams works perfectly.

- As with a custom tab set with a URL, the plugin supports Azure / Grey themes when running 6.4+

- Because of how plugins are written, there may be multiple .page files associated with any given plugin, and you may have to try different ones to get what you want.

 

 

If a naming conflict between the .page file and the custom tab occurs, then an underscore (_) will be added to the name of the tab.

 

Side Note:  The Azure / Grey themes are hardcoded as to the amount of text that they display next to the icon, so long Names may get cut-off on the display.  This doesn't impact the custom tab at all, and is also out of my control.

 

*** The original page file is NOT touched or modified in any way shape or form.  A copy is made and modified for the custom tab.  IE:  The original "settings" icon is still available where ever it was within unRaid's GUI.

Edited by Squid
Link to comment
  • 4 weeks later...
  • 2 months later...
On 7/17/2017 at 8:12 AM, dalben said:

Oh, I should have reported here.  Using Konqueror inside a custom tab window, I can't use the CTRL or Shift keys to select multiple items.

punctuality-quote-funny-1-picture-quote-1.jpg

 

Updated so that the frame now has focus in the window.  IE: Keyboard now works on URL custom tabs

 

You will have to either make a change (any change) in the settings for the plugin, or reboot the server for the update to refresh the code for the tabs.  

 

TLDR:  TBH I didn't see a problem with simply shift / alt not working.  That was just a PITA.  But, when I went to actually use Krusader today and discovered that the entire keyboard didn't work at all, I figured that I probably should fix it.

 

My bad guys.  Apologies.

 

Edited by Squid
  • Like 1
Link to comment
  • 2 months later...

Is there a problem with this plugin under 6.4.0_rc15e or am I screwing up somewhere?. 

 

Was trying to set a custom tab and point it to a docker running a Grafana dashboard but even though I can perfectly access it through the browser I only get a white rectangle in unRAID. Thought it was that specific container but I can't make it work with any URL pages. Only with unRAID built-in stuff. 

 

These are my settings.

 

image.png.ba23dce1be0b519df0dc29296ae85c70.png

Link to comment
29 minutes ago, Laucien said:

Is there a problem with this plugin under 6.4.0_rc15e or am I screwing up somewhere?. 

 

Was trying to set a custom tab and point it to a docker running a Grafana dashboard but even though I can perfectly access it through the browser I only get a white rectangle in unRAID. Thought it was that specific container but I can't make it work with any URL pages. Only with unRAID built-in stuff. 

 

These are my settings.

 

image.png.ba23dce1be0b519df0dc29296ae85c70.png

If you access your server via https then its a browser enforced security violation to display an iframe as http   Switch it to https if it supports it, if not then you're SOL  I'll have to add a note to the plugin for this.

Link to comment
Just now, Squid said:

If you access your server via https then its a browser enforced security violation to display an iframe as http   Switch it to https if it supports it, if not then you're SOL  I'll have to add a note to the plugin for this.

 

Ah, that makes total sense. Thanks!. 

Link to comment
  • 2 weeks later...
  • 2 months later...
29 minutes ago, SSD said:

Squid -

 

The page seems to refresh every time you navigate to the tab. Is there an option that the web page state can be preserved?

 

Thanks!

Explain.  I don't understand.  I've got active streams and user scripts (built-in .page file), NetData and Glances (via IP address) all running via tabs no problems.

Link to comment

If I open a custom tab, the page is empty and the web page opens. That is perfect. Then I click on the unRAID main tab and it shows. Then I click on the custom tab again. It is empty and the page reloads, rather than just displaying the same static content it displayed the last time I was there. The page I am using can take quite a few seconds to refresh. I'd just prefer it preserve the page as it was before I left.

Link to comment

The GUI has a dynamic page building structure, whenever you click on one of the header buttons, such as Main or a Custom Tab, the building structure is going to find and load the associated pages. Next these pages are executed to build the actual content. There is no "preserved" page  content unless a particular page does some clever caching itself, but that is not a trivial thing to do.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.