Git Product home page Git Product logo

Comments (10)

bitflingr avatar bitflingr commented on July 30, 2024

what does your :templatedir: look like in config/gdash.yaml ?

from gdash.

code-decode avatar code-decode commented on July 30, 2024

xx@vishnud3:/opt/gdash$ cat config/gdash.yaml
:graphite: http://vishnud4.qa.xx.com
:templatedir: /opt/gdash/graph_templates

.....

root@vishnud3:/opt/gdash# pwd
/opt/gdash
root@vishnud3:/opt/gdash# tree graph_templates/
graph_templates/
├── dashboards
│   ├── admin_qa1web101
│   │   ├── admin.graph
│   │   ├── dash.yaml
│   │   ├── jdbcConnectionPool_Connections.graph
│   │   ├── jdbcConnectionPool_threadPool.graph
│   │   ├── Memory_Heap.graph
│   │   ├── Memory_NonHeap.graph
│   │   ├── os_OpenFileDescriptors.graph
│   │   ├── os_SystemLoadAverage.graph
│   │   ├── sessions_Active.graph
│   │   ├── sessions_create_expire.graph
│   │   └── threads_template.graph
│   └── admin_qa4web101
│   ├── admin.graph
│   ├── dash.yaml
│   ├── jdbcConnectionPool_Connections.graph
│   ├── jdbcConnectionPool_threadPool.graph
│   ├── Memory_Heap.graph
│   ├── Memory_NonHeap.graph
│   ├── os_OpenFileDescriptors.graph
│   ├── os_SystemLoadAverage.graph
│   ├── sessions_Active.graph
│   ├── sessions_create_expire.graph
│   └── threads_template.graph
└── node_templates
└── collectd
├── cpu-average.graph
├── cpu-max.graph
├── dash.yaml
├── disk-IO.graph
├── disk-usage.graph
├── entropy.graph
├── fork_rate.graph
├── load.graph
├── memory-usage.graph
├── network.eth0.errors.graph
├── network.eth0.trafic.graph
├── network.eth1.errors.graph
├── network.eth1.trafic.graph
├── processes.graph
├── uptime.graph
└── users.graph

7 directories, 60 files

from gdash.

bitflingr avatar bitflingr commented on July 30, 2024

ill see if i can reproduce this with a similar layout as yours. When you view source on the home page and search for 'data-source=' do you see an array of your graphs?

something like

<input class="search-query" style="height: 25px;" name="dashboard" type="text" placeholder=" Dashboard..." data-provide="typeahead" data-items="10" data-source='["machines/server01", "machines/server02",  "machines/server03".....etc.

from gdash.

code-decode avatar code-decode commented on July 30, 2024

I do not see the array.

<form id="form-search" name="dashboards" style="margin: 0;" class="form-search" method="get" action="/search">
                      <div class="input-append">
                      <input class="span2 search-query" name="dashboard" type="text" placeholder="Dashboard..." data-provide="typeahead" data-items="10" data-source='node_templates/node exampledashboards/Platform-admin on qa1web101dashboards/Platform-admin on qa2web101dashboards/Platform-admin on qa3web101dashboards/Platform-admin on qa4web101' autocomplete="off" />

from gdash.

bitflingr avatar bitflingr commented on July 30, 2024

Hmm so it's missing the '[]' and ','. I am guessing it has something to do with the whitespace. I probably won't be able to reproduce this till later this week.

from gdash.

bitflingr avatar bitflingr commented on July 30, 2024

I have not gotten around to this but noticed that the node_template is the default files. could you try deleting or moving them out of the graph_templates directory?

from gdash.

code-decode avatar code-decode commented on July 30, 2024

I removed the files from node_templates directory but that did not change the search results.

I do not know ruby. In sinatra_app.rb the search elements are created by appending category and name. Do I need to provide some parameter in my graph/dashboard configuration for these to be set.

Thank you for your help. Much appreciated..

from gdash.

bitflingr avatar bitflingr commented on July 30, 2024

I was about to give up because i was not able to reproduce but i just discovered that it is a Ruby version issue. Ruby 1.9 and above outputs Array.to_s method differently than 1.8.7. Examples below:

1.8.7

~$ irb1.8
irb(main):001:0> arr = []
=> []
irb(main):002:0> arr << 'a'
=> ["a"]
irb(main):003:0> arr << 'b'
=> ["a", "b"]
irb(main):004:0> arr << 'c'
=> ["a", "b", "c"]
irb(main):005:0> arr
=> ["a", "b", "c"]
irb(main):006:0> arr.to_s
=> "abc"

1.9.3

1.9.3p448 :001 > arr = []
 => []
1.9.3p448 :002 > arr << 'a'
 => ["a"]
1.9.3p448 :003 > arr << 'b'
 => ["a", "b"]
1.9.3p448 :004 > arr << 'c'
 => ["a", "b", "c"]
1.9.3p448 :005 > arr
 => ["a", "b", "c"]
1.9.3p448 :006 > arr.to_s
 => "[\"a\", \"b\", \"c\"]"

Ill come up with a fix shortly but you can try using ruby 1.9.3 or 2.0.0 to verify.

from gdash.

bitflingr avatar bitflingr commented on July 30, 2024

I believe calling .inspect rather than .to_s on an array object will do the trick but ill leave it up to the maintainers wether or not they want to add this in or just not support ruby 1.8.7 since I believe it is now deprecated.

from gdash.

code-decode avatar code-decode commented on July 30, 2024

I moved to ruby 1.9.3 as suggested and this is resolved. Thank you!

from gdash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.