[SR-Users] Siremis graph time format is a bug!?

Daniel-Constantin Mierla miconda at gmail.com
Mon Sep 18 09:22:11 CEST 2017


Just check the values in database, if (now()+0) is not a valid unix
timestamp value displayed as number, then siremis will just fetch the
value and convert to integer.

Maybe in the future we will also add support for datetime values, but
the spare time is rather limited here for a short term perspective.

Cheers,
Daniel


On 15.09.17 22:10, Humberto Rodríguez wrote:
> Thanks Daniel-Constantin Mierla,
>
> I followed your recommendation, and began to use a date column as INT. Then, I started to insert the date as unix_timestamp, like this (unix_timestamp(now())), which was the only way the graphic showed the date correctly (Active_Failed_Dialogs_4_hours - From 2017-09-15 12:04:01 To 2017-09-15 16:00:01), I failed inserting  (now()+0), siremis didn't understand this format too.
>
>        Cheers,
> Hto 
>
> Now
>
> No Matter How Hard The Past, You Can Always Begin Again ~
>
> --------------------------------------------
> On Thu, 9/14/17, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
>
>  Subject: Re: [SR-Users] Siremis graph time format is a bug!?
>  To: "Humberto Rodríguez" <humberj77 at yahoo.es>, "Kamailio (SER) - Users Mailing List" <sr-users at lists.kamailio.org>, sr-users at lists.sip-router.org
>  Date: Thursday, September 14, 2017, 4:09 AM
>  
>  
>      Hello,
>  
>        
>  
>        try to set the type of the time column to int, so it
>  is retrieved
>        as numeric timestam, not as formated datetime.
>  
>        
>  
>        Cheers,
>  
>        Daniel
>  
>        
>  
>        On 13.09.17 05:39, Humberto Rodríguez wrote:
>  
>      
>      
>        Hello:
>  
>  I added a graphic to Siremis of my actives dialogs.  But, it
>  only shows unix time (From 1969-12-31 19:33:37 To1969-12-31
>  19:33:37)   as Xaxis (19:33). I had siremis 4.2 and never
>  saw it correctly, I just updated to Siremis 4.4 and I see
>  the same problem.Please see the attachment file with the
>  graph, and my configuration files and table bellow
>  
>  Thanks in advance.
>  
>  
>  My /var/www/siremis-4.4.0/siremis/modules/ser/view/xxxx.xml
>  file 
>  
>  <?xml version="1.0"
>  standalone="no"?>
>  
>  <EasyView Name="ChartsSumdialogsView"
>  Description="Charts" class="EasyView"
>  Tab="" TemplateEngine="Smarty"
>  Access="SERAdmin.Administer_Modules"
>  TemplateFile="view.tpl">
>  
>      <FormReferences>
>  
>          <Reference
>  Name="ser.cms.form.ChartsForm"/>
>  
>      </FormReferences>
>  
>  </EasyView>
>  
>  -----------------------------------------------------------
>  My siremisCharts.xml
>  ----------------------------------------------------------
>  <ChartGroup name="sumdialogs">
>            <Chart name="sumdialogs"
>  table="active_dialogs"
>  title="Active_Failed_Dialogs"
>  type="area" order="reverse"
>                          orderby="ORDER BY id DESC"
>  limit="LIMIT 10080">
>                  <XAxis>
>  <!--                        <Item
>  name="date_created"
>  data="hour(date_created)"
>  title="date_created"
>  type="timestamp"/>  -->
>                          <Item
>  name="date_created" data="date_created"
>  title="date_created"
>  type="timestamp"/>  
>                  </XAxis>
>                  <YAxis>
>                          <Item
>  name="active_dialogs"
>  data="active_dialogs"
>  title="active_dialogs" type="dataset"
>  color="#D02020"/>
>  							<Item name="failed_dialogs"
>  data="failed_dialogs"
>  title="failed_dialogs" type="dataset"
>  color="#DFC329"/>
>                 </YAxis>
>      </Chart>
>    </ChartGroup>
>  
>  ---------------------------------------------------------------------------------------
>  See bellow, the portion of the table  used to build the
>  graphic,  the column "date_created"  is the
>  problem, and the format is "TIMESTAMP" 
>  ------------------------------------------------------------------------------------------
>  
>  
>  # id, date_created, active_dialogs, early_dialogs,
>  expired_dialogs, failed_dialogs, processed_dialogs, 
>  '1', '2017-04-11 14:40:40', '220',
>  '0', '1219', '37', '6879491'
>  '2', '2017-04-11 14:42:02', '206',
>  '0', '1219', '37', '6879604'
>  '3', '2017-04-11 14:43:01', '215',
>  '0', '1219', '37', '6879685'
>  '4', '2017-04-11 14:44:01', '191',
>  '0', '1220', '37', '6879744'
>  '5', '2017-04-11 14:45:02', '203',
>  '0', '1220', '37', '6879837'
>  '9', '2017-04-11 14:46:01', '211',
>  '0', '1220', '37', '6879929'
>  '11', '2017-04-11 14:47:01', '234',
>  '0', '1220', '37', '6880019'
>  '12', '2017-04-11 14:48:01', '222',
>  '0', '1220', '37', '6880087'
>  
>  ----------------------------------------------------------------------------------------------------------------------------------
>  
>  No Matter How Hard The Past, You Can Always Begin
>  Again ~
>        
>  
>        
>        
>  
>        _______________________________________________
>  Kamailio (SER) - Users Mailing List
>  sr-users at lists.kamailio.org
>  https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>  
>      
>      
>  
>      
>      -- 
>  Daniel-Constantin Mierla
>  www.twitter.com/miconda
>  -- www.linkedin.com/in/miconda
>  Kamailio Advanced Training - www.asipto.com
>  Kamailio World Conference - www.kamailioworld.com
>    

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com




More information about the sr-users mailing list