Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
redbeard
@brianredbeard
also, does Ralph-NG only use python3?
✪ vi4m Marcin Kliks
@vi4m
yes, it's python 3 based
i will paste you something we use for building packages
redbeard
@brianredbeard
perfect. thanks @vi4m
✪ vi4m Marcin Kliks
@vi4m
and this is the debian files: https://github.com/allegro/ralph/tree/ng/debian
redbeard
@brianredbeard
i was starting out with the .deb just because it was the "preferred" way of installing ralph. Now that i can see what dark witchery is occurring under the hood I can try and bend it to my whimsy :smile:
swb
@spencewb16_twitter
@vi4m for back office assets, I'm unable to edit components and software? seems like they're filled in automatically whenever I add a new asset with default values. I must be missing something, though I've gone through much of the documentation...
✪ vi4m Marcin Kliks
@vi4m
actually, you're not missing anything :D
models are there, but we didn't implement it yet, sorry for that surprise
didn't implement the view, though it's quite easy to do (in fevew lines of code)
i think we should do it eventually
o_O
swb
@spencewb16_twitter
Oh I see. What file do I need to edit to add the view? or do i need to add a new view file entirely?
✪ vi4m Marcin Kliks
@vi4m
just a sec
swb
@spencewb16_twitter
in views file in /opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/back_office
i see the default values :smile: just not sure how to go about editing it so that it reroutes properly back to components section
swb
@spencewb16_twitter
@vi4m I am all set with this, just copied some of the settings from views.py in /ralph/assets instead. thanks for the honesty/clarification! very helpful
swb
@spencewb16_twitter
@vi4m last question, could you please point me in the right direction to making changes to the top link bar with dropdowns? i want to tweak a couple small things :smirk:
swb
@spencewb16_twitter
@vi4m one last last question - on my components page, I'm trying to make a ForeignKey autocomplete field, but it always makes it into dropdown. how can i avoid default dropdown and have autocomplete when using a ForeignKey field?
Raoul Thill
@rthill
@all is there a possibility to manage passwords per server?
✪ vi4m Marcin Kliks
@vi4m
what do you mean?
Raoul Thill
@rthill
password vault functionality inside ralph for physical and virtual server.
✪ vi4m Marcin Kliks
@vi4m
so it could be rather vault integration
swb
@spencewb16_twitter
@vi4m what do i have to do to make the FK autocomplete work? which django autocomplete tool does ralph use?
xliiv
@xliiv
@spencewb16_twitter it should work out of the box, what's the issue and it's custom solution
Raoul Thill
@rthill
@vi4m yes sure, do you have any plans on vault integration?
swb
@spencewb16_twitter
@xliiv whenever i make a foreign key field, it makes it a dropdown. This is in the Components tab on assets. I've compared the model and my field to others that have the autocomplete solution (for example ServiceEnvironment or BudgetInfo on the BasicInfo tab), and I'm not seeing any differences. I suspect it is something to do with the admin.py file for assets, but I've tried everything I can think of?
swb
@spencewb16_twitter
Screen Shot 2016-12-09 at 12.34.01 PM.png
^i want this to change to...
Screen Shot 2016-12-09 at 12.34.20 PM.png
✪ vi4m Marcin Kliks
@vi4m
allegro/ralph@be58d08
see this commit
raw_id_fields had to be set
(for @spencewb16_twitter question)
swb
@spencewb16_twitter
thanks for the responses everyone. i thought that was the case, so i added raw_id_fields to EthernetAdmin class (which is where i'm trying to add it on the components tab) in admin.py for assets. However, still no dice
✪ vi4m Marcin Kliks
@vi4m
@xliiv @ar4s any ideas?
xliiv
@xliiv

@spencewb16_twitter it's issue with base_object, because when i did

      class EthernetInline(RalphTabularInline):                                    
          model = Ethernet                                                         
          fields = (                                                               
            'base_object', 'model', #'mac', 'model_name', 'label', 'speed',   
          )                                                                        
          extra = 1                                                                
          raw_id_fields = ['model']                                                
        #formset = NetworkInlineFormset                                          
          form = EthernetLockDeleteForm

this works

blob
xliiv
@xliiv
.. this works for model, but when i add 'base_object' to raw_id_fields this doesn't work and needs debugging
swb
@spencewb16_twitter

@xliiv this is added to admin.py file, or within components.py file? what is 'base_object' field for anway - seems unrelated? can this work with 'label' field within 'class Ethernet(Component)' or not possible?

sorry for so many questions

and what is ethernetlockdeleteform
swb
@spencewb16_twitter
ohhhhh it's the views.py
i m a dummy sorry :( i think i got this tho.... for now..... :smiling_imp:
xliiv
@xliiv
@spencewb16_twitter
yup, it's views.py file..
base_object is a bit abstract.. but in this case it's data-center-asset, like server
ethernetlockdeleteform makes data in form readonly when _dhcp_expose_should_lock_fields is set to True
swb
@spencewb16_twitter
thank you @xliiv! you rock! :guitar:
xliiv
@xliiv
@spencewb16_twitter you're welcome
;P
hosfeld
@hosfeld
Hi all! Any chance to move an asset from backoffice to datacenter (or have an asset in both categtories?)