• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python models.Report类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: import

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,代码行数:31,代码来源:overall.py


示例2:

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,代码行数:23,代码来源:criteria_circulardependency.py


示例3:

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,代码行数:31,代码来源:criteria_parents.py


示例4: Copyright

# 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 steelscript.appfwk.apps.report.modules.tables as tables
from steelscript.appfwk.apps.report.models import Report

from steelscript.netprofiler.appfwk.datasources.netprofiler import \
    NetProfilerServiceByLocTable

#
# NetProfiler report
#

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

report.add_section()

# Define a Overall TimeSeries showing Avg Bytes/s
p = NetProfilerServiceByLocTable.create('services-by-loc')

report.add_widget(tables.TableWidget, p, "Services by location", width=6)
开发者ID:,项目名称:,代码行数:24,代码来源:


示例5:

# 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,代码行数:31,代码来源:netshark_microburst.py


示例6: Copyright

# 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.


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

from steelscript.netprofiler.appfwk.datasources.netprofiler_live import \
    NetProfilerLiveConfigTable

import steelscript.appfwk.apps.report.modules.tables as tables

report = Report.create("NetProfiler Live Templates")
report.add_section()

p = NetProfilerLiveConfigTable.create('live-templates')

report.add_widget(tables.TableWidget, p, 'Widgets Configuration', width=12,
                  height=0, searching=True)
开发者ID:riverbed,项目名称:steelscript-netprofiler,代码行数:21,代码来源:netprofiler_live.py


示例7:

from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.raw as raw
from steelscript.appfwk.apps.datasource.forms import fields_add_time_selection
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable

report = Report.create(title='Criteria Time Selection')
report.add_section()

a = CriteriaTable.create('test-criteria-timeselection')
fields_add_time_selection(a, initial_duration='1 day')

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


示例8: software

# 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,代码行数:31,代码来源:netshark_scanner_report.py


示例9:

from steelscript.appfwk.apps.datasource.modules.html import HTMLTable
from steelscript.appfwk.apps.report.models import Report
import steelscript.appfwk.apps.report.modules.raw as raw
import steelscript.appfwk.apps.report.modules.maps as maps
import steelscript.appfwk.apps.report.modules.yui3 as yui3
from steelscript.netprofiler.appfwk.datasources.netprofiler import NetProfilerGroupbyTable
from steelscript.appfwk.apps.plugins.builtin.sharepoint.datasources.sharepoint import SharepointTable


logger = logging.getLogger(__name__)

#
# HTML Example Report
#

report = Report.create("Landing Page Example", position=9.1,
                       hide_criteria=True, reload_minutes=5)

report.add_section('Raw HTML')


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

table = HTMLTable.create('Weather Image', html=markup)
report.add_widget(raw.TableWidget, 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
开发者ID:carriercomm,项目名称:steelscript-appfwk,代码行数:32,代码来源:landing_example.py


示例10: Copyright

# 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,代码行数:31,代码来源:netprofiler.py


示例11:

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,代码行数:17,代码来源:criteria_tworeports_2.py


示例12: Copyright

# 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,代码行数:24,代码来源:netshark_msa.py


示例13: software

# 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,代码行数:31,代码来源:netshark_microburst_tcp.py


示例14: Copyright

# 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,代码行数:31,代码来源:netshark_jobs.py


示例15:

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
import steelscript.appfwk.libs.profiler_tools as protools

import steelscript.appfwk.business_hours.datasource.business_hours_source as bizhours
from steelscript.netprofiler.appfwk.datasources import netprofiler
from steelscript.netprofiler.appfwk.datasources import netprofiler_devices

report = Report.create(
    "Business Hour Reporting - NetProfiler Interfaces",
    position=10,
    field_order=[
        "starttime",
        "endtime",
        "netprofiler_filterexpr",
        "business_hours_start",
        "business_hours_end",
        "business_hours_tzname",
        "business_hours_weekends",
    ],
    hidden_fields=["duration", "resolution"],
)

report.add_section()

#
# Define by-interface table from NetProfiler
#
basetable = netprofiler.NetProfilerGroupbyTable.create(
    "bh-basetable", groupby="interface", duration=60, resolution=3600, interface=True
)
开发者ID:riverbed,项目名称:steelscript-appfwk-business-hours,代码行数:32,代码来源:business_hours_report.py


示例16: software

# 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, \
    add_netprofiler_hostgroup_field
#
# NetProfiler report
#

report = Report.create("NetProfiler HostGroup Report - ByLocation",
                       position=10,
                       field_order=['netprofiler_device', 'endtime',
                                    'duration', 'resolution', 'hostgroup',
                                    'netprofiler_filterexpr'])

section = report.add_section()

add_netprofiler_hostgroup_field(report, section, 'ByLocation')

# 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)
开发者ID:,项目名称:,代码行数:31,代码来源:


示例17:

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,代码行数:27,代码来源:criteria_postprocess.py


示例18: plugin

    table = SomeTable.create(name, table_options...)
    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.scc.appfwk.datasources.scc as scc


report = Report.create("SCC Device Throughput", position=10)

report.add_section()

table = scc.SCCThroughputTable.create(name='throughputtable')

table.add_column('timestamp', 'Time', datatype='time', iskey=True)
table.add_column('wan_in', 'inbound wan traffic', units='B/s')
table.add_column('wan_out', 'outbound wan traffic', units='B/s')
table.add_column('lan_in', 'inbound lan traffic', units='B/s')
table.add_column('lan_out', 'outbound lan traffic', units='B/s')

report.add_widget(c3.TimeSeriesWidget, table, "SCC Device Throughput",
                  height=300, width=12)
开发者ID:riverbed,项目名称:steelscript-scc,代码行数:30,代码来源:throughput_report.py


示例19: plugin

    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,代码行数:31,代码来源:multi_stock_report.py


示例20: Copyright

# 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.datasource.models import TableField
from steelscript.appfwk.apps.report.models import Report
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 \
    NetProfilerTimeSeriesTable, NetProfilerGroupbyTable, NetProfilerTable

report = Report.create("DSCP Report", position=10,
                       hidden_fields=['netprofiler_filterexpr'])

netprofiler_filterexpr = TableField.create(
    keyword='netprofiler_filterexpr')

interface_field = TableField.create(
    keyword='interface', label='Interface', required=True)

#
# Overall section
#  - netprofiler_filterexpr = "interface {interface}"
#
section = report.add_section("Overall",
                             section_keywords=['netprofiler_filterexpr',
                                               'interface_expr'])
开发者ID:riverbed,项目名称:steelscript-appfwk,代码行数:31,代码来源:dscp_timeseries.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python filters.TimeFilter类代码示例发布时间:2022-05-27
下一篇:
Python devicemanager.DeviceManager类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap