Ejemplo n.º 1
0
class HomeView(DashboardView):
    template_name = "main.html"
    crumbs = (
        {'url': 'admin:index', 'name': _('Home')},
    )
    grid = Grid(Row(Column(User(), width=4), Column(Authentication(), width=4), Column(SettledEnterprise(), width=4),
        Column(Signatures(), width=4), Column(Evidences(), width=4)))
Ejemplo n.º 2
0
    def test_main(self):
        """Main test method."""
        box = Box(widgets=[Widget(template='_.html')])
        grid = Grid(Row(Column(width=12)))
        view = DashboardView.as_view()

        assert box
        assert grid
        assert view
Ejemplo n.º 3
0
    def test_main(self):
        """Main test method."""
        box = Box(items=[Item()])
        grid = Grid(Row(Column(width=12)))
        view = DashboardView()

        assert box
        assert grid
        assert view
Ejemplo n.º 4
0
class HomeView(DashboardView):
    template_name = 'suit_dashboard/template.html'
    crumbs = ({'url': 'admin:index', 'name': _('Home')},)
    grid = Grid(
        Row(Column()),  # default width=12 (maximum)
        Row(Column(width=6), Column(width=1), Column(width=4)),
        Row(Column(  # nested rows and columns
            Row(Column(width=10), Column(width=2)),
            Row(Column(width=4), Column(width=6)), width=5),Column(width=6)
        )
    )
Ejemplo n.º 5
0
class HomeView(DashboardView):
    template_name = 'dashboard/main.html'
    crumbs = (
        {'url': 'admin:index', 'name': _('Home')},
    )
    grid = Grid(
        Row(
            Column(BoxMachineBasicInfo(), width=6),
            Column(BoxMachineBasicInfoChart(), width=6),
            Column(BoxMinionStatusChart(), width=12)
        )
    )
Ejemplo n.º 6
0
class DashboardStatisticsView(DashboardView):
    # template_name = 'dashboard/main.html'
    # model = User
    # These next two lines tell the view to index lookups by username
    # slug_field = 'username'
    # slug_url_kwarg = 'username'
    # grid = Grid(Row(Column(BoxMachine(), width=12)))
    grid = Grid(
      Row(
        Column(
          Box(html_id='allitems',title=1,description='All Items'),
          width=1),
        Column(
          Box(html_id='services',title=1,description='Services'),
          width=1),
        Column(
              Box(html_id='insurance',title='2',description='Insurance'),
              width=1),
        Column(
              Box(html_id='filing',title='3',description='Filings & Permits'),
              width=1),
        Column(
              Box(html_id='violation',title='1',description='Violations & Suits'),
              width=1),
        Column(
              Box(html_id='current',title='20',description='Current'),
              width=1),
        Column(
              Box(html_id='attention',title='0',description='Coming Due'),
              width=1),
        Column(
              Box(html_id='pastdue',title='0',description='Past Due'),
              width=1),
      ),
        Row(
            Column(
                Box(),
                width=12),
        ),
        Row(
            Column(Row(
                Column(
                    Box(html_id='filtertitle', title='Showing :', description=''),
                    width=1),
                Column(
                    Box(html_id='showfilters', title='All Items'),
                    width=1))),
        ),

    )
Ejemplo n.º 7
0
class LineView(DashboardView):
    template_name = 'data.html'
    crumbs = (
        {'url': 'admin:data', 'name': _('数据')},
    )
    grid = Grid(Row(Column(BasicLine(), width=12)))
Ejemplo n.º 8
0
 def test_grid_columns_type(self):
     """Test raising of errors when items type are wrong."""
     with pytest.raises(TypeError) as e:
         Grid(1)
     assert 'All elements of Grid must be Row instances' in str(e.value)
Ejemplo n.º 9
0
class EvidView(DashboardView):
    template_name = 'data.html'
    crumbs = ({'url': 'admin:evid', 'name': _('用户取证次数')}, )
    grid = Grid(Row(Column(EvidLine(), width=12)))
Ejemplo n.º 10
0
class SignView(DashboardView):
    template_name = 'data.html'
    crumbs = ({'url': 'admin:sign', 'name': _('用户签名次数')}, )
    grid = Grid(Row(Column(SignLine(), width=12)))
Ejemplo n.º 11
0
class SetEnView(DashboardView):
    template_name = 'data.html'
    crumbs = ({'url': 'admin:seten', 'name': _('总入驻企业数量')}, )
    grid = Grid(Row(Column(SetEnLine(), width=12)))
Ejemplo n.º 12
0
class AutionView(DashboardView):
    template_name = 'data.html'
    crumbs = ({'url': 'admin:aution', 'name': _('已认证用户量')}, )
    grid = Grid(Row(Column(AutionLine(), width=12)))