Esempio n. 1
0
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import Column

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw
from rvbd_portal.apps.datasource.forms import fields_add_time_selection, fields_add_resolution

# Report
from rvbd_portal.apps.report.tests.reports import synthetic_functions as funcs

report = Report(title='Synthetic No Resampling' )
report.save()

# Section 
section = Section(report=report, title='Section 0')
section.save()

# Table
table = AnalysisTable.create('test-synthetic-resampling', tables={}, 
                             func = funcs.analysis_generate_data,
                             resample = True,
                             params = {'source_resolution': 60 })
fields_add_time_selection(table)
fields_add_resolution(table)

Column.create(table, 'time', 'Time', iskey=True, isnumeric=True, datatype='time')
Column.create(table, 'value', 'Value', isnumeric=True)

raw.TableWidget.create(section, table, 'Table')
Esempio n. 2
0
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").  
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.maps as maps
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_profiler.datasources.profiler import GroupByTable

#
# Google Map example
#

# Google Map example
report = Report(title="Response Time Map", position=4)
report.save()

section = Section.create(report)

# Define a map and table, group by location
table = GroupByTable.create('maploc2', 'host_group', duration=60)

Column.create(table, 'group_name', iskey=True, label='Group Name')
Column.create(table, 'response_time', label='Resp Time', datatype='metric')
Column.create(table, 'network_rtt', label='Net RTT', datatype='metric')
Column.create(table, 'server_delay', label='Srv Delay', datatype='metric')
Column.create(table, 'avg_bytes', label='Response Time', datatype='metric')
Column.create(table, 'peak_bytes', 'Peak Bytes/s', datatype='bytes', units='B/s')
Column.create(table, 'avg_bytes_rtx', 'Avg Retrans Bytes/s', datatype='bytes', units='B/s')
Column.create(table, 'peak_bytes_rtx', 'Peak Retrans Bytes/s', datatype='bytes', units='B/s')
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3
import rvbd_portal.apps.report.modules.maps as maps

from rvbd_portal_profiler.datasources.profiler import GroupByTable, TimeSeriesTable
from rvbd_portal_shark.datasources.shark import SharkTable, create_shark_column

#
# Overall report
#

report = Report(title="Overall", position=1,
                field_order=['endtime', 'profiler_filterexpr', 'shark_filterexpr'],
                hidden_fields=['resolution', 'duration'])
report.save()

section = Section.create(report, title='Locations',
                         section_keywords=['resolution', 'duration'])
                         
# Define a map and table, group by location
table = GroupByTable.create('maploc', 'host_group', duration=60, resolution='auto')

Column.create(table, 'group_name',    label='Group Name', iskey=True)
Column.create(table, 'response_time', label='Resp Time',  datatype='metric')
Column.create(table, 'network_rtt',   label='Net RTT',    datatype='metric')
Column.create(table, 'server_delay',  label='Srv Delay',  datatype='metric')

maps.MapWidget.create(section, table, "Response Time", width=6, height=300)
Esempio n. 4
0
# Copyright (c) 2013 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ('License').
# This software is distributed 'AS IS' as set forth in the License.

from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_shark.datasources.shark import SharkTable, create_shark_column

#
# Define a Shark Report and Table
#
report = Report(title='Shark', position=3)
report.save()

section = Section.create(report)

### Shark Time Series

t = SharkTable.create(name='Total Traffic Bytes',
                      duration=1,
                      resolution='1sec',
                      aggregated=False)

create_shark_column(t,
                    'time',
                    extractor='sample_time',
                    iskey=True,
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from rvbd_portal.apps.report.tests.reports import criteria_functions as funcs

report = Report(title='Criteria Shared Fields')
report.save()

section = Section(report=report, title='Section')
section.save()

x = TableField.create('x', 'X Value')
for i in range(2):

    table = AnalysisTable.create('test-criteria-sharedfields-%d' % i,
                                 tables={},
                                 func=funcs.analysis_echo_criteria)
    Column.create(table, 'key', 'Key', iskey=True, isnumeric=False)
    Column.create(table, 'value', 'Value', isnumeric=False)

    table.fields.add(x)
    y = TableField.create('y',
                          'Y Value',
                          table,
                          hidden=True,
                          parent_keywords=['x'],
                          post_process_func=Function(
from django import forms

from rvbd_portal.apps.datasource.forms import fields_add_time_selection
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Table, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from . import criteria_functions as funcs

report = Report(title='Criteria Circular Dependency')
report.save()

# Section
section = Section(report=report, title='Section 0')
section.save()

table = AnalysisTable.create('test-criteria-circulardependency',
                             tables={},
                             func=funcs.analysis_echo_criteria)

TableField.create(keyword='t1',
                  obj=table,
                  post_process_template='table_computed:{t2}',
                  hidden=False)

TableField.create(keyword='t2',
                  obj=table,
                  post_process_template='table_computed:{t3}',
Esempio n. 7
0
# Copyright (c) 2013 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column, TableField
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_profiler.datasources import profiler
from rvbd_portal_profiler.datasources.profiler import (GroupByTable,
                                                       TimeSeriesTable)

report = Report(title="QoS Report", position=15)
report.save()

interface_field = TableField.create(keyword='interface',
                                    label='Interface',
                                    required=True)
datafilter_field = TableField.create(
    keyword='datafilter',
    hidden=True,
    post_process_template='interfaces_a,{interface}')

section = Section.create(report, title="Overall")

# Define a Overall TimeSeries showing In/Out Utilization
table = TimeSeriesTable.create('qos-overall-util',
                               duration=15,
Esempio n. 8
0
# Copyright (c) 2013 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ('License').
# This software is distributed 'AS IS' as set forth in the License.

from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_shark.datasources.shark import SharkTable, create_shark_column

#
# Define a Shark Report and Table
#
report = Report(title='Shark DNS', position=6)
report.save()

section = Section.create(report)

### DNS Success/Failure Queries Over time
name = 'DNS Success and Failure Queries Over Time'
t = SharkTable.create(name=name,
                      duration=15,
                      resolution='1min',
                      aggregated=False)

create_shark_column(t,
                    'time',
                    label='Time',
                    iskey=True,
Esempio n. 9
0
from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
import rvbd_portal.libs.profiler_tools as protools

from rvbd_portal_profiler.datasources.profiler import GroupByTable
from rvbd_portal_profiler.datasources.profiler_devices import DevicesTable

import rvbd_portal_business_hours.libs.business_hours as bizhours

report = Report(title="Business Hour Reporting - Profiler Interfaces",
                position=9,
                field_order=[
                    'endtime', 'duration', 'profiler_filterexpr',
                    'business_hours_start', 'business_hours_end',
                    'business_hours_tzname', 'business_hours_weekends'
                ],
                hidden_fields=['resolution'])
report.save()

section = Section.create(report)

bizhours.fields_add_business_hour_fields(section)

#
# Define by-interface table from Profiler
#
basetable = GroupByTable.create('bh-basetable',
                                'interface',
                                duration=60,
Esempio n. 10
0
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.raw as raw
import rvbd_portal.apps.report.modules.maps as maps
import rvbd_portal.apps.report.modules.yui3 as yui3
from rvbd_portal_profiler.datasources.profiler import GroupByTable
from rvbd_portal_sharepoint.datasources.sharepoint import (
    SharepointTable, create_sharepoint_column)

logger = logging.getLogger(__name__)

#
# HTML Example Report
#

report = Report(title="Landing Page Example",
                position=1,
                hide_criteria=True,
                reload_minutes=5)
report.save()

section = Section.create(report, title='Raw HTML')

# Define an image
imgurl = 'http://radar.weather.gov/Conus/Loop/NatLoop_Small.gif'
html = '<img src="%s" alt="Doppler Radar National Mosaic Loop">' % imgurl

table = StaticHTMLTable.create('Weather Image', html)
raw.TableWidget.create(section, table, 'weather image', width=6)

# Define an html table of links
# As an example of how the module loading works, this table
# may end up being shorter than the actual total number of reports
Esempio n. 11
0
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.raw as raw
from rvbd_portal.apps.datasource.forms import fields_add_time_selection
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.tests.reports import criteria_functions as funcs

report = Report(title='Criteria Time Selection')
report.save()

section = Section(report=report, title='Section 0')
section.save()

table = AnalysisTable.create('test-criteria-timeselection',
                             tables={},
                             func=funcs.analysis_echo_criteria)
fields_add_time_selection(table, initial_duration='1 day')

Column.create(table, 'key', 'Key', iskey=True, isnumeric=False)
Column.create(table, 'value', 'Value', isnumeric=False)

raw.TableWidget.create(section, table, 'Table')
Esempio n. 12
0
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_profiler.datasources.profiler_devices import DevicesTable

report = Report(title="Profiler Device List", position=10)
report.save()

section = Section.create(report)

#
# Device Table

devtable = DevicesTable.create('devtable')
Column.create(devtable, 'ipaddr', 'Device IP', iskey=True, isnumeric=False)
Column.create(devtable, 'name', 'Device Name', isnumeric=False)
Column.create(devtable, 'type', 'Flow Type', isnumeric=False)
Column.create(devtable, 'version', 'Flow Version', isnumeric=False)

yui3.TableWidget.create(section, devtable, "Device List", height=300, width=12)

Esempio n. 13
0
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from rvbd_portal.apps.report.tests.reports import criteria_functions as funcs

report = Report(title='Criteria Post Process Errors' )
report.save()

section = Section(report=report, title='Section 0')
section.save()

table = AnalysisTable.create('test-criteria-postprocess', tables={}, 
                             func = funcs.analysis_echo_criteria)

TableField.create('error', 'Error type', table)    
TableField.create('x', 'X Value', table,
                  hidden=True,
                  post_process_func = Function(funcs.postprocesserrors_compute))
    
Column.create(table, 'key', 'Key', iskey=True, isnumeric=False)
Column.create(table, 'value', 'Value', isnumeric=False)

raw.TableWidget.create(section, table, 'Table')
Esempio n. 14
0
from django import forms

from rvbd_portal.apps.datasource.forms import fields_add_time_selection
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Table, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from . import criteria_functions as funcs

report = Report(title='Criteria Section Keywords')
report.save()

# Section
section = Section.create(report=report,
                         title='Section 0',
                         section_keywords=['k1'])
section.save()

# Table
table = AnalysisTable.create('test-criteria-sectionkeywords-1',
                             tables={},
                             func=funcs.analysis_echo_criteria)
TableField.create(keyword='k1', label='Key 1', obj=table, initial='r1')

Column.create(table, 'key', 'Key', iskey=True, isnumeric=False)
Column.create(table, 'value', 'Value', isnumeric=False)

raw.TableWidget.create(section, table, 'Table 1')
Esempio n. 15
0
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").
# This software is distributed "AS IS" as set forth in the License.

import rvbd_portal.apps.datasource.modules.analysis as analysis
from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

import rvbd_portal_sample.datasources.sample_source as sample

#
# Sample report
#

report = Report(title="Sample")
report.save()

section = Section.create(report)

# Criteria table
table = analysis.create_criteria_table('sample-criteria')
yui3.TableWidget.create(section,
                        table,
                        "Report Criteria",
                        width=12,
                        height=200)

# Define a Overall TimeSeries showing Avg Bytes/s
options = sample.TableOptions(beta=4)
table = sample.Table.create(name='sample-table',
Esempio n. 16
0
# This software is licensed under the terms and conditions of the
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_sharepoint.datasources.sharepoint import (
    SharepointTable, create_sharepoint_column)
#
# Profiler report
#

report = Report(title="Sharepoint", position=2)
report.save()

section = Section.create(report)

# Define a Sharepoint Table
table = SharepointTable.create('sp-documents', '/', 'Shared Documents')

create_sharepoint_column(table, 'BaseName', issortcol=True)
create_sharepoint_column(table, 'Created', datatype='time')
create_sharepoint_column(table, 'Modified', datatype='time')
create_sharepoint_column(table, 'ID')
create_sharepoint_column(table, 'EncodedAbsUrl')

yui3.TableWidget.create(section,
                        table,
Esempio n. 17
0
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Column

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from rvbd_portal.apps.report.tests.reports import criteria_functions as funcs

report = Report(title='Criteria Defaults')
report.save()

# Report-level criteria
TableField.create(keyword='report-1',
                  label='Report 1',
                  obj=report,
                  initial='r1')
TableField.create(keyword='report-2',
                  label='Report 2',
                  obj=report,
                  required=True)

# Section
section = Section(report=report, title='Section 0')
section.save()

# Section-level criteria
TableField.create(keyword='section-1',
                  label='Section 1',
                  obj=section,
                  initial='s1')
TableField.create(keyword='section-2',
Esempio n. 18
0
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_profiler.datasources.profiler import (GroupByTable,
                                                       TimeSeriesTable)

#
# Profiler report
#

report = Report(title="Profiler", position=2)
report.save()

section = Section.create(report)

# Define a Overall TimeSeries showing Avg Bytes/s
table = TimeSeriesTable.create('ts-overall', duration=60, resolution="1min")

Column.create(table, 'time', 'Time', datatype='time', iskey=True)
Column.create(table, 'avg_bytes', 'Avg Bytes/s', datatype='bytes', units='B/s')

yui3.TimeSeriesWidget.create(section, table, "Overall Traffic", width=12)

# Define a TimeSeries showing Avg Bytes/s for tcp/80
table = TimeSeriesTable.create('ts-tcp80',
                               duration=60,
Esempio n. 19
0
from rvbd_portal.apps.datasource.models import Column

import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_wireshark.datasources.wireshark import WireSharkTable
from rvbd_portal_wireshark.datasources.wireshark import ColumnOptions as WireSharkColumnOptions

import logging
logger = logging.getLogger(__name__)

######################################################################
#
# Financial: App vs Packet
#

report = Report(title="PCAP Analysis (FileField)", position=8)
report.save()

section = Section.create(report)

#
# Table: Process Internal.pcap
#

table = WireSharkTable.create('pcap',
                              resample=True,
                              resolution='1s',
                              resolutions=['1s', '1m'])

Column.create(table,
              'pkttime',
Esempio n. 20
0
from django import forms

from rvbd_portal.apps.datasource.forms import fields_add_time_selection
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Table, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from . import criteria_functions as funcs

report = Report(title='Criteria Changing',
                field_order =['first', 'second'])
report.save()

section = Section(report=report, title='Section 0')
section.save()

TableField.create ('first', 'First Choice', section,
                   field_cls = forms.ChoiceField,
                   field_kwargs = {'choices': (('a', 'Option A'),
                                               ('b', 'Option B') ) })

TableField.create ('second', 'Second Choice', section,
                   field_cls = forms.ChoiceField,
                   pre_process_func =
                   Function(funcs.preprocess_changesecond),
                   dynamic=True)

table = AnalysisTable.create('test-criteria-changingchoices', tables={}, 
Esempio n. 21
0
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Column

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from rvbd_portal.apps.report.tests.reports import criteria_functions as funcs

report = Report(
    title='Criteria Parents',
    hidden_fields=['report_computed', 'section_computed', 'table_computed'])
report.save()

# Report-level independent
TableField.create(keyword='report_independent',
                  label='Report Independent',
                  obj=report)

# Report-level computed
TableField.create(keyword='report_computed',
                  obj=report,
                  post_process_template='report_computed:{report_independent}',
                  hidden=False)

# Section
section = Section(report=report, title='Section 0')
section.save()

# Section-level computed
TableField.create(keyword='section_computed',
                  obj=section,
Esempio n. 22
0
from django import forms

from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from rvbd_portal.apps.report.tests.reports import criteria_functions as funcs

report = Report(title='Criteria Pre Process')
report.save()

section = Section(report=report, title='Section 0')
section.save()

TableField.create('choices',
                  'Choices',
                  section,
                  field_cls=forms.ChoiceField,
                  pre_process_func=Function(funcs.preprocess_field_choices))

TableField.create('choices_with_params',
                  'Choices with params',
                  section,
                  field_cls=forms.ChoiceField,
                  pre_process_func=Function(
                      funcs.preprocess_field_choices_with_params,
                      params={
                          'start': 1,
Esempio n. 23
0

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3
from rvbd_portal_profiler.datasources.profiler import GroupByTable
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable

# helper libraries
from rvbd_portal.apps.plugins.builtin.whois.libs.whois import whois

#
# Profiler report
#

report = Report(title="Whois", position=5)
report.save()

section = Section.create(report)

# Define a Table that gets external hosts by avg bytes
table = GroupByTable.create('5-hosts', 'host', duration='1 hour',
                            filterexpr='not srv host 10/8 and not srv host 192.168/16')

Column.create(table, 'host_ip', 'IP Addr', iskey=True)
Column.create(table, 'avg_bytes', 'Avg Bytes', units='s', issortcol=True)


# Create an Analysis table that calls the 'whois' function to craete a link to 'whois'
whoistable = AnalysisTable.create('5-whois-hosts',
                                  tables={'t': table.id},
Esempio n. 24
0
import logging

from django.templatetags.static import static
from django.core.urlresolvers import reverse

from rvbd_portal.apps.datasource.modules.html import StaticHTMLTable
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.raw as raw

logger = logging.getLogger(__name__)

#
# HTML Example Report
#

report = Report(title="HTML Example", position=1)
report.save()

section = Section.create(report, title='Raw HTML')

# Define an image
imgurl = 'http://radar.weather.gov/Conus/Loop/NatLoop_Small.gif'
html = '<img src="%s" alt="Doppler Radar National Mosaic Loop">' % imgurl

table = StaticHTMLTable.create('Weather Image', html)
raw.TableWidget.create(section, table, 'weather image')

# Define an html table of links
# As an example of how the module loading works, this table
# may end up being shorter than the actual total number of reports
# because at the time this is calculated, all the remaining reports
# This software is licensed under the terms and conditions of the
# MIT License set forth at:
#   https://github.com/riverbed/flyscript-portal/blob/master/LICENSE ("License").
# This software is distributed "AS IS" as set forth in the License.

from rvbd_portal.apps.datasource.models import Column
from rvbd_portal.apps.report.models import Report, Section
import rvbd_portal.apps.report.modules.yui3 as yui3

from rvbd_portal_sharepoint.datasources.sharepoint import (SharepointTable,
                                                           create_sharepoint_column)
#
# Profiler report
#

report = Report(title="Sharepoint", position=2)
report.save()

section = Section.create(report)


# Define a Sharepoint Table
table = SharepointTable.create('sp-documents', '/', 'Shared Documents')

create_sharepoint_column(table, 'BaseName', issortcol=True)
create_sharepoint_column(table, 'Created', datatype='time')
create_sharepoint_column(table, 'Modified', datatype='time')
create_sharepoint_column(table, 'ID')
create_sharepoint_column(table, 'EncodedAbsUrl')

yui3.TableWidget.create(section, table, "Sharepoint Documents List",
Esempio n. 26
0
from django import forms

from rvbd_portal.apps.datasource.forms import fields_add_time_selection
from rvbd_portal.apps.datasource.modules.analysis import AnalysisTable
from rvbd_portal.apps.datasource.models import TableField, Table, Column
from rvbd_portal.libs.fields import Function

from rvbd_portal.apps.report.models import Report, Section
from rvbd_portal.apps.report.modules import raw

from . import criteria_functions as funcs

report = Report(title='Criteria Two Reports - 2')
report.save()

TableField.create(keyword='k2', label='Key 2', obj=report, initial='r2')

# Section
section = Section.create(report=report, title='Section')
section.save()

# Table
table = AnalysisTable.create('test-criteria-tworeports-2',
                             tables={},
                             func=funcs.analysis_echo_criteria)
TableField.create(keyword='k1', label='Key 1', obj=table, initial='r1')

Column.create(table, 'key', 'Key', iskey=True, isnumeric=False)
Column.create(table, 'value', 'Value', isnumeric=False)

raw.TableWidget.create(section, table, 'Table 2')