当前位置: 首页>>代码示例>>Python>>正文


Python Report.create方法代码示例

本文整理汇总了Python中steelscript.appfwk.apps.report.models.Report.create方法的典型用法代码示例。如果您正苦于以下问题:Python Report.create方法的具体用法?Python Report.create怎么用?Python Report.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在steelscript.appfwk.apps.report.models.Report的用法示例。


在下文中一共展示了Report.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Copyright

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
#
# Changelog:
# 20160507 Gwen : add MailboxUsageTable - office365 mailbox usage report

# Copyright (c) 2015 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.


import logging
logger = logging.getLogger(__name__)

from steelscript.appfwk.apps.report.models import Report
report = Report.create("Office365 MailBox Usage Report")
report.add_section("Main")

from steelscript.appfwk.apps.datasource.models import Column, TableField
import steelscript.appfwk.apps.report.modules.yui3 as yui3

# Import the datasource module for this plugin
import steelscript.o365.appfwk.datasources.o365_source as o365

table = o365.O365MailboxUsageTable.create(name='O365MailboxUsage')
# OUTPUT example
# [...
# {'Date': '2016-05-03T00:00:00','TotalInactiveMailboxCount': '7','TotalMailboxCount': '12'}
# ... ]

# Report 
开发者ID:gwenblum,项目名称:steelscript-o365,代码行数:33,代码来源:o365_mbusage_report.py

示例2:

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable

from steelscript.appfwk.apps.report.models import Report, TableField
from steelscript.appfwk.apps.report.modules import raw

report = Report.create(title='Criteria Circular Dependency')
report.add_section()

a = CriteriaTable.create('test-criteria-circulardependency')

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

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

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

report.add_widget(raw.TableWidget, a, 'Table')
开发者ID:carriercomm,项目名称:steelscript-appfwk,代码行数:25,代码来源:criteria_circulardependency.py

示例3:

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable
from steelscript.appfwk.apps.datasource.models import TableField

from steelscript.appfwk.apps.report.models import Report
from steelscript.appfwk.apps.report.modules import raw

from steelscript.appfwk.apps.report.tests.reports import criteria_functions as funcs

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

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

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

# Section
section = report.add_section(title='Section 0')

# Section-level computed
TableField.create(keyword='section_computed', obj=section,
                  post_process_template='section_computed:{report_computed}',
                  hidden=False)

# Table
a = CriteriaTable.create('test-criteria-parents')
开发者ID:carriercomm,项目名称:steelscript-appfwk,代码行数:33,代码来源:criteria_parents.py

示例4: Copyright

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# Copyright (c) 2015 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.


from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.tables as tables
from steelscript.netprofiler.appfwk.datasources.netprofiler_devices import \
    NetProfilerDeviceTable

report = Report.create("NetProfiler Device List", position=10)

report.add_section()

#
# Device Table

p = NetProfilerDeviceTable.create('devtable')
p.add_column('ipaddr', 'Device IP', iskey=True, datatype="string")
p.add_column('name', 'Device Name', datatype="string", sortasc=True)
p.add_column('type', 'Flow Type', datatype="string")
p.add_column('version', 'Flow Version', datatype="string")

report.add_widget(tables.TableWidget, p, "Device List", height=300, width=12)
开发者ID:,项目名称:,代码行数:28,代码来源:

示例5:

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# as set forth in the License.


import steelscript.appfwk.apps.report.modules.c3 as c3
from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.tables as tables

from steelscript.netshark.appfwk.datasources.netshark import \
    NetSharkTable
from steelscript.appfwk.apps.datasource.modules.analysis import \
    FocusedAnalysisTable

#
# Define a NetShark Report and Table
#
report = Report.create('NetShark Microburst Summary', position=10)
report.add_section()

# Summary Microbursts Graph for NetShark
t = NetSharkTable.create(name='MicroburstsTime', duration=1,
                         resolution='1sec', aggregated=False)

t.add_column('time', label='Time', iskey=True,
             extractor='sample_time', datatype='time')

t.add_column('max_microburst_1ms_bits', label='uBurst 1ms',
             extractor='generic.max_microburst_1ms.bits',
             operation='max', units='B')

t.add_column('max_microburst_10ms_bits', label='uBurst 10ms',
             extractor='generic.max_microburst_10ms.bits',
开发者ID:riverbed,项目名称:steelscript-netshark,代码行数:33,代码来源:netshark_microburst.py

示例6:

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable
from steelscript.appfwk.apps.datasource.models import TableField
from steelscript.appfwk.libs.fields import Function

from steelscript.appfwk.apps.report.models import Report
from steelscript.appfwk.apps.report.modules import raw
from . import criteria_functions as funcs

report = Report.create(title='Criteria Post Process')

section = report.add_section(title='Section 0')

a = CriteriaTable.create('test-criteria-postprocess')

TableField.create('w', 'W Value', a)
TableField.create('x', 'X Value', a)
TableField.create('y', 'Y Value', a)

for (f1, f2) in [('w', 'x'), ('w', 'y'), ('x', 'y')]:
    (TableField.create
     ('%s%s' % (f1, f2), '%s+%s Value' % (f1, f2), a,
      hidden=True, parent_keywords=[f1, f2],
      post_process_func=Function(funcs.postprocess_field_compute,
                                 params={'fields': [f1, f2]})))


report.add_widget(raw.TableWidget, a, 'Table')
开发者ID:carriercomm,项目名称:steelscript-appfwk,代码行数:29,代码来源:criteria_postprocess.py

示例7: plugin

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
    table.add_column(name, column_options...)
    table.add_column(name, column_options...)
    table.add_column(name, column_options...)

    report.add_widget(yui3.TimeSeriesWidget, table, name, width=12)

See the documeantion or sample plugin for more details
"""

from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.c3 as c3

# Import the datasource module for this plugin (if needed)
import steelscript.stock.appfwk.datasources.stock_source as stock

report = Report.create("Stock Report-Multiple Stocks", position=11)

report.add_section()

#
# Define a stock table with current prices with a list of stocks
#

table = stock.MultiStockPriceTable.create(name='multi-stock-price',
                                          duration='52w', resolution='day',
                                          stock_symbol=None)

# Add columns for time and 3 stock columns
table.add_column('date', 'Date', datatype='date', iskey=True)

# Bind the table to a widget for display
开发者ID:riverbed,项目名称:steelscript-stock,代码行数:33,代码来源:multi_stock_report.py

示例8:

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable

from steelscript.appfwk.apps.report.models import Report, TableField
from steelscript.appfwk.apps.report.modules import raw

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

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

# Section
report.add_section(title='Section')

# Table
a = CriteriaTable.create('test-criteria-tworeports-2')
TableField.create(keyword='k1', label='Key 1', obj=a, initial='r1')

report.add_widget(raw.TableWidget, a, 'Table 2')
开发者ID:carriercomm,项目名称:steelscript-appfwk,代码行数:19,代码来源:criteria_tworeports_2.py

示例9: software

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.

import steelscript.appfwk.apps.report.modules.tables as tables
import steelscript.netshark.appfwk.datasources.netshark_scanner_source as \
    scanner

from steelscript.appfwk.apps.report.models import Report
from steelscript.netshark.appfwk.datasources.netshark import NetSharkTable

# Import the datasource module for this plugin (if needed)


report = Report.create("NetShark Scanner", field_order=['endtime', 'duration'],
                       hidden_fields=['netshark_device',
                                      'netshark_source_name', 'resolution'])
report.add_section()

# Create base table
shark_bytes_table = NetSharkTable.create(name='shark_bytes', aggregated=True)
shark_bytes_table.add_column('generic_bytes', label='Bytes', iskey=False,
                             extractor='generic.bytes', operation='sum')

# Make
table = scanner.SharksTable.create(name='sharks',
                                   basetable=shark_bytes_table)
table.add_column('name', "Name", datatype='string')
table.add_column('host', "Host", datatype='string')
table.add_column('capjob', "Capture Job", datatype='string')
table.add_column('bytes', "Bytes")
开发者ID:riverbed,项目名称:steelscript-netshark,代码行数:33,代码来源:netshark_scanner_report.py

示例10: Copyright

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# Copyright (c) 2017 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.

from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.raw as raw

from steelscript.netshark.appfwk.datasources.netshark_msa import \
    MSADownloadTable

#
# Download PCAPs from two NetSharks and upload to a third for MSA analysis
#

report = Report.create('NetShark MSA Download', position=10)

report.add_section()

t = MSADownloadTable.create(name='MultiSegment Table')
t.add_column('results', label='Results', iskey=True)

report.add_widget(raw.TableWidget, t, 'MSA Results', width=12, height=400)
开发者ID:riverbed,项目名称:steelscript-netshark,代码行数:26,代码来源:netshark_msa.py

示例11: Copyright

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# Copyright (c) 2019 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.

import steelscript.appfwk.apps.report.modules.c3 as c3
from steelscript.appfwk.apps.report.models import Report
from steelscript.netprofiler.appfwk.datasources.netprofiler import (
    NetProfilerTimeSeriesTable,
    NetProfilerGroupbyTable)
#
# NetProfiler report
#

report = Report.create("NetProfiler", position=10)

report.add_section()

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

p.add_column('time', 'Time', datatype='time', iskey=True)
p.add_column('avg_bytes', 'Avg Bytes/s', units='B/s')

report.add_widget(c3.TimeSeriesWidget, p, "Overall Traffic", width=12)

# Define a TimeSeries showing Avg Bytes/s for tcp/80
p = NetProfilerTimeSeriesTable.create('ts-tcp80', duration=60,
                                      filterexpr='tcp/80', cacheable=False)
开发者ID:riverbed,项目名称:steelscript-netprofiler,代码行数:33,代码来源:netprofiler.py

示例12: software

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.


import steelscript.appfwk.apps.report.modules.c3 as c3
from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.tables as tables
from steelscript.netshark.appfwk.datasources.netshark import \
    NetSharkTable
from steelscript.appfwk.apps.datasource.modules.analysis import \
    FocusedAnalysisTable

#
# Define a NetShark Report and Table
#
report = Report.create('NetShark Microburst and TCP Errors', position=10)
report.add_section()

# Summary Microbursts Graph for NetShark
t = NetSharkTable.create(name='MicroburstsTime', duration=1,
                         resolution='1sec', aggregated=False)

t.add_column('time', label='Time', iskey=True,
             extractor='sample_time', datatype='time')

t.add_column('max_microburst_1ms_bits', label='uBurst 1ms',
             extractor='generic.max_microburst_1ms.bits',
             operation='max', units='B')

t.add_column('max_microburst_10ms_bits', label='uBurst 10ms',
             extractor='generic.max_microburst_10ms.bits',
开发者ID:riverbed,项目名称:steelscript-netshark,代码行数:33,代码来源:netshark_microburst_tcp.py

示例13: Copyright

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
# Copyright (c) 2015 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.

from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.tables as tables

from steelscript.netshark.appfwk.datasources.netshark import \
    NetSharkJobsTable

report = Report.create('NetShark Capture Jobs', position=10)

report.add_section()

# Table for NetShark
t = NetSharkJobsTable.create(name='Netshark Capture Jobs', cacheable=False)

t.add_column('netshark', label='NetShark', datatype='string', iskey=True)
t.add_column('job_name', label='Job Name', datatype='string')
t.add_column('job_id', label='Job ID', datatype='string', iskey=True)

t.add_column('interface', label='Interface', datatype='string')
t.add_column('bpf_filter', label='BPF Filter', datatype='string')
t.add_column('dpi_enabled', label='Enable DPI', datatype='string')
t.add_column('index_enabled', label='Enable Indexing', datatype='string')
t.add_column('state', label='Status', datatype='string')

t.add_column('start_time', label='Start Time', datatype='string')
t.add_column('end_time', label='End Time', datatype='string')
开发者ID:riverbed,项目名称:steelscript-netshark,代码行数:33,代码来源:netshark_jobs.py

示例14: import

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.maps as maps
import steelscript.appfwk.apps.report.modules.c3 as c3
import steelscript.appfwk.apps.report.modules.tables as tables

from steelscript.netprofiler.appfwk.datasources.netprofiler import (NetProfilerGroupbyTable,
                                                                    NetProfilerTimeSeriesTable)
from steelscript.netshark.appfwk.datasources.netshark import NetSharkTable

#
# Overall report
#

report = Report.create("Overall",
                       position=9,
                       field_order=['endtime', 'netprofiler_filterexpr',
                                    'netshark_filterexpr'],
                       hidden_fields=['resolution', 'duration'])

report.add_section('Locations', section_keywords=['resolution', 'duration'])

# Define a map and table, group by location
p = NetProfilerGroupbyTable.create('maploc', groupby='host_group', duration=60,
                                   resolution='auto')

p.add_column('group_name', label='Group Name', iskey=True, datatype="string")
p.add_column('response_time', label='Resp Time',  units='ms', sortdesc=True)
p.add_column('network_rtt', label='Net RTT',    units='ms')
p.add_column('server_delay', label='Srv Delay',  units='ms')

# Adding a widget using the Report object will apply them
开发者ID:riverbed,项目名称:steelscript-appfwk,代码行数:33,代码来源:overall.py

示例15: create_trigger

# 需要导入模块: from steelscript.appfwk.apps.report.models import Report [as 别名]
# 或者: from steelscript.appfwk.apps.report.models.Report import create [as 别名]
<div style="width:500px">
<p>This example report demonstrates usage of the alerting functionality.

<p>The report gets defined as usual, with tables for datasources and widgets
for display of the data.  Separately, we define a set of trigger functions
that will analyze the results of the table before it gets displayed.  These
triggers are attachd to the table using the ``create_trigger`` function.

<p>If the trigger evaluates to True, the results can be forwarded to a variety
of ``Destinations`` using a ``Sender`` class.  Multiple ``Destinations``
can be added to a single trigger.
</div>
"""

report = Report.create("NetProfiler - Alert Example",
                       description=description,
                       position=10)
report.add_section()

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

p.add_column('time', 'Time', datatype='time', iskey=True)
p.add_column('avg_bytes', 'Avg Bytes/s', units='B/s')

report.add_widget(c3.TimeSeriesWidget, p, "Overall Traffic", width=6)

# Add a trigger to evaluate if traffic exceeds a certain threshold
a = create_trigger(source=p,
                   trigger_func=netprofiler_triggers.local_spike,
开发者ID:,项目名称:,代码行数:33,代码来源:


注:本文中的steelscript.appfwk.apps.report.models.Report.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。