Exemple #1
0
    def __init__(self, **kwargs):
        FluentIndexDashboard.__init__(self, **kwargs)
        self.children.append(
            modules.Group(
                title="IaaS",
                display="tabs",
                children=[
                    modules.ModelList(
                        title='Network',
                        models=(
                            'nodeconductor.iaas.models.FloatingIP',
                            'nodeconductor.iaas.models.IpMapping',
                            'nodeconductor.iaas.models.SecurityGroup',
                        )),
                    modules.ModelList(
                        title='Virtual Machine',
                        models=(
                            'nodeconductor.iaas.models.Instance',
                            'nodeconductor.iaas.models.InstanceSlaHistory',
                            'nodeconductor.iaas.models.Template',
                            'nodeconductor.iaas.models.TemplateLicense',
                        )),
                    modules.ModelList(
                        title='Cloud',
                        models=(
                            'nodeconductor.iaas.models.Cloud',
                            'nodeconductor.iaas.models.CloudProjectMembership',
                            'nodeconductor.iaas.models.OpenStackSettings',
                        ))
                ]))

        billing_models = ['nodeconductor.cost_tracking.*']
        if NodeConductorExtension.is_installed('nodeconductor_killbill'):
            billing_models.append('nodeconductor_killbill.models.Invoice')
        if NodeConductorExtension.is_installed('nodeconductor_paypal'):
            billing_models.append('nodeconductor_paypal.models.Payment')

        self.children.append(AppIconList(_('Billing'), models=billing_models))
        self.children.append(
            AppIconList(_('Structure'),
                        models=('nodeconductor.structure.*', )))
        self.children.append(
            AppIconList(_('Backup'), models=('nodeconductor.backup.*', )))
Exemple #2
0
 def __init__(self, app_title, models, **kwargs):
     super(CustomAppIndexDashboard, self).__init__(app_title, models,
                                                   **kwargs)
     path = self._get_app_models_path()
     self.children = [modules.ModelList(title=app_title, models=[path])]