1 package FS::cacti_page;
2 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::cacti_page - Object methods for cacti_page records
15 $record = new FS::cacti_page \%hash;
16 $record = new FS::table_name {
17 'exportnum' => 3, #part_export associated with this page
18 'svcnum' => 123, #svc_broadband associated with this page
19 'graphnum' => 45, #blank for svcnum index
20 'imported' => 1428358699, #date of import
21 'content' => $htmlcontent, #html containing base64-encoded images
24 $error = $record->insert;
26 $error = $new_record->replace($old_record);
28 $error = $record->delete;
30 $error = $record->check;
34 An FS::cacti_page object represents an html page for viewing cacti graphs.
35 FS::cacti_page inherits from FS::Record. The following fields are currently supported:
39 =item cacti_pagenum - primary key
41 =item exportnum - part_export exportnum for this page
43 =item svcnum - svc_broadband svcnum for this page
45 =item graphnum - cacti graphnum for this page (blank for overview page)
47 =item imported - date this page was imported
49 =item content - text/html content of page, should not include newlines
59 Creates a new object. To add the object to the database, see L<"insert">.
61 Note that this stores the hash reference, not a distinct copy of the hash it
62 points to. You can ask the object for a copy with the I<hash> method.
66 # the new method can be inherited from FS::Record, if a table method is defined
68 sub table { 'cacti_page'; }
72 Adds this record to the database. If there is an error, returns the error,
73 otherwise returns false.
77 # the insert method can be inherited from FS::Record
81 Delete this record from the database.
85 # the delete method can be inherited from FS::Record
87 =item replace OLD_RECORD
89 Replaces the OLD_RECORD with this one in the database. If there is an error,
90 returns the error, otherwise returns false.
94 # the replace method can be inherited from FS::Record
98 Checks all fields to make sure this is a valid example. If there is
99 an error, returns the error, otherwise returns false. Called by the insert
104 # the check method should currently be supplied - FS::Record contains some
105 # data checking routines
111 $self->ut_numbern('cacti_pagenum', 'graphnum')
112 || $self->ut_foreign_key('exportnum','part_export','exportnum')
113 || $self->ut_foreign_key('svcnum','cust_svc','svcnum')
114 || $self->ut_number('imported')
115 || $self->ut_text('content')
117 return $error if $error;
126 Will be described here once found.