Morten,
I need to add a roomid that has more than 30 chars.
I've altered the size of rommid column in table room (at database level), but the HTML fields has a 30 chars limitation.
Nav web has built on Django framework which is very nice ;), but I don't know where I can make this modification.
*** EXPLANATION:
Here at UFSC, we have devices in many places.
Bellow has an example of devices physical location:
UFSC (Santa Catarina's Federal University) Campus Trindade (City: Florianópolis - SC - Brazil) CCB (Biological's Science Centre) Morfologia (Morphology's Department) Secretaria da Morfologia (Morphology's Department Management Room) Lab. Virtual de Estudos Morfológicos (Virtual Laboratory of Morphological Studies)
We have added UFSC as a Parent Organization for Campus Trindade (there are many other campus, but I try to focus only on Trindade):
[image: Imagem inline 1]
CCB (Biological's Science Centre) was registered as a location:
[image: Imagem inline 2]
All the other information we are try to register as a room. Here we are experiencing the mentioned limitation problems. We have thought to register these information as a Location, but the Location information isn't displayed at ip device info screen nor at Edit IP Device screen. Unfortunately, this complicates our work.
Here is a simple room registry example:
CCB_Morfologia_Lab. Virtual de Estudos Morfológicos:CCB::Contato - Gianor - 2320:Na Morfologia/Anatômico, passando a secretaria de morfologia, entre os anfiteatros:::-27.60106, -48.52385
If I try to split "CCB_Morfologia_Lab. Virtual de Estudos Morfológicos" into two fields: (rommid: CCB_Morfologia , description: Lab. Virtual de Estudos Morfológicos) this will cause a contraint violation, because I'll need to add another device that lives in Morphology's Department, but in another place (Morphology's Department Management Room for example).
My sugestion is:
1 - add a field called Location in Edit IP Device screen which filters the Room field. 2 - add Location and Parent Organization information at IP Device Info.
We can help you and your development team to make these modifications (and maybe others). This could be a nice starting.
I hope you understand our necessity and help us to put NAV in production for replace Whatsup Gold.
:)
On Mon, 26 Aug 2013 16:25:42 -0300 Bruno Galindro da Costa bruno.galindro@gmail.com wrote:
I need to add a roomid that has more than 30 chars.
I've altered the size of rommid column in table room (at database level), but the HTML fields has a 30 chars limitation.
Nav web has built on Django framework which is very nice ;), but I don't know where I can make this modification.
The Django model Room is defined in the Python module nav.models.manage. The max_length attribute is set to 30 there. Modifying data model would require a SQL changescript under the `sql/changes/` directory, and a change to the Room model class.
The Location/Room data models are modeled after the scheme used at NTNU (from which NAV originated). NTNU has multiple campuses and locations, but all wiring closets are identified by a unique 3 digit number (which makes the limit of 30 characters seem immense).
That being said, the 30 character limit is entirely artificial. The database field is of the type VARCHAR, and could be changed to have no limit at all. However, since this string is a primary key, having it be a huge string isn't a good way to normalize the schema.
My sugestion is:
1 - add a field called Location in Edit IP Device screen which filters the Room field. 2 - add Location and Parent Organization information at IP Device Info.
We can help you and your development team to make these modifications (and maybe others). This could be a nice starting.
IIUC, your use case is that you have so many rooms in your database, that the Room dropdown box for editing IP Devices is overpopulated?
John-Magne has suggested something like this component: http://ivaynberg.github.io/select2/ - I.e. a hierarchical (Location/Room), searchable dropdown.
I'm Cc:ing nav-dev, since your getting into development territory with this question.
IIUC, your use case is that you have so many rooms in your database, that the Room dropdown box for editing IP Devices is overpopulated?
Not only that, but if the location could be searcheable too, we can define more flexible room IDs, avoiding increase rommid size at database.
John-Magne has suggested something like this component:
http://ivaynberg.github.io/select2/ - I.e. a hierarchical (Location/Room), searchable dropdown.
Good. If we use this component to filter the room id search by location, my problem will certainly be resolved.
Anyone are working with it now?
2013/9/2 Morten Brekkevold morten.brekkevold@uninett.no
On Mon, 26 Aug 2013 16:25:42 -0300 Bruno Galindro da Costa < bruno.galindro@gmail.com> wrote:
I need to add a roomid that has more than 30 chars.
I've altered the size of rommid column in table room (at database level), but the HTML fields has a 30 chars limitation.
Nav web has built on Django framework which is very nice ;), but I don't know where I can make this modification.
The Django model Room is defined in the Python module nav.models.manage. The max_length attribute is set to 30 there. Modifying data model would require a SQL changescript under the `sql/changes/` directory, and a change to the Room model class.
The Location/Room data models are modeled after the scheme used at NTNU (from which NAV originated). NTNU has multiple campuses and locations, but all wiring closets are identified by a unique 3 digit number (which makes the limit of 30 characters seem immense).
That being said, the 30 character limit is entirely artificial. The database field is of the type VARCHAR, and could be changed to have no limit at all. However, since this string is a primary key, having it be a huge string isn't a good way to normalize the schema.
My sugestion is:
1 - add a field called Location in Edit IP Device screen which filters
the
Room field. 2 - add Location and Parent Organization information at IP Device Info.
We can help you and your development team to make these modifications
(and
maybe others). This could be a nice starting.
IIUC, your use case is that you have so many rooms in your database, that the Room dropdown box for editing IP Devices is overpopulated?
John-Magne has suggested something like this component: http://ivaynberg.github.io/select2/ - I.e. a hierarchical (Location/Room), searchable dropdown.
I'm Cc:ing nav-dev, since your getting into development territory with this question.
-- Morten Brekkevold UNINETT
On Mon, 16 Sep 2013 08:28:30 -0300 Bruno Galindro da Costa bruno.galindro@gmail.com wrote:
John-Magne has suggested something like this component:
http://ivaynberg.github.io/select2/ - I.e. a hierarchical (Location/Room), searchable dropdown.
Good. If we use this component to filter the room id search by location, my problem will certainly be resolved.
Anyone are working with it now?
Not at this very moment, no.
We are working towards a NAV 4.0 release in December, where we hope to include a series of design changes to increase uniformity of the web interface. This feature would fit well in the scope of these changes.
You should file a bug report for this wishlist item, then I will assign it to one of the guys working on the interface redesign.
Done: https://bugs.launchpad.net/nav/+bug/1234410
Tks!
2013/9/17 Morten Brekkevold morten.brekkevold@uninett.no
On Mon, 16 Sep 2013 08:28:30 -0300 Bruno Galindro da Costa < bruno.galindro@gmail.com> wrote:
John-Magne has suggested something like this component:
http://ivaynberg.github.io/select2/ - I.e. a hierarchical (Location/Room), searchable dropdown.
Good. If we use this component to filter the room id search by location,
my
problem will certainly be resolved.
Anyone are working with it now?
Not at this very moment, no.
We are working towards a NAV 4.0 release in December, where we hope to include a series of design changes to increase uniformity of the web interface. This feature would fit well in the scope of these changes.
You should file a bug report for this wishlist item, then I will assign it to one of the guys working on the interface redesign.
-- Morten Brekkevold UNINETT