Random Bits of Open Code

Check-in [490491d199]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initial cut at stacked team charts. Not fully working yet
Timelines: family | ancestors | descendants | both | margs-chicken-5
Files: files | file ages | folders
SHA1:490491d199376b93ca004a7dfa7b41c3025b88de
User & Date: jmoon18 2019-05-13 20:34:14
Context
2019-05-15
23:35
Removed process from default makefile rule, modified to run only 20 records for easier testing. Super slow for duplicate records. Not fully working Leaf check-in: 79c8aa68fd user: jmoon18 tags: margs-chicken-5
2019-05-13
20:34
Initial cut at stacked team charts. Not fully working yet check-in: 490491d199 user: jmoon18 tags: margs-chicken-5
2019-05-10
21:04
Updated margs to be a chicken 5 compatible egg check-in: 48ce9ce1f4 user: jmoon18 tags: margs-chicken-5
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ringchart/src/cstats.scm.

785
786
787
788
789
790
791

792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811




































812
813
814
815
816
    )
    (query (fold-rows 
      (lambda(user user-xs)
        (print "User: " user )
        (let* (  ;;(peak-data (gen-peak-for-user user #f))
               (peak-data-mgr (gen-peak-for-user user #t)))
          (hash-table-set! usage-ht (conc (car user) "-team") (third peak-data-mgr))

          ;;(create-peak-csv user peak-data)
          ;;(create-peak-html  user peak-data)
          (create-peak-csv  (list (conc (car user) "-team")) peak-data-mgr)
          (create-peak-html (list (conc (car user) "-team")) peak-data-mgr)
          (create-peak-stacked-html (car user) usage-ht)
          ;;(handle-exceptions exn (print "Update-peak-db failed" ((condition-property-accessor 'exn 'message) exn)) (update-peak-db  user peak-data))
          (print "Updated everything for " user)
        )
      ) 0)
    (sql people-db (conc "select uid from people where id in (select distinct mgr_id from people) "
                       (if *cstats-user-list* 
                           (conc "and uid in (" *cstats-user-list* ")")
                           (conc "and uid not null")
                        )
                       (if *cstats-ignore-users* 
                           (conc "and uid not in (" *cstats-ignore-users* ") order by uid asc")
                           (conc "and uid not null order by uid asc")
                        )))

    )




































    (print (hash-table-keys usage-ht))

  ))

)







>




|










|
|



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
    )
    (query (fold-rows 
      (lambda(user user-xs)
        (print "User: " user )
        (let* (  ;;(peak-data (gen-peak-for-user user #f))
               (peak-data-mgr (gen-peak-for-user user #t)))
          (hash-table-set! usage-ht (conc (car user) "-team") (third peak-data-mgr))
          (print (hash-table-ref usage-ht (conc (car user) "-team")))
          ;;(create-peak-csv user peak-data)
          ;;(create-peak-html  user peak-data)
          (create-peak-csv  (list (conc (car user) "-team")) peak-data-mgr)
          (create-peak-html (list (conc (car user) "-team")) peak-data-mgr)
          ;;(create-peak-stacked-html (car user) usage-ht)
          ;;(handle-exceptions exn (print "Update-peak-db failed" ((condition-property-accessor 'exn 'message) exn)) (update-peak-db  user peak-data))
          (print "Updated everything for " user)
        )
      ) 0)
    (sql people-db (conc "select uid from people where id in (select distinct mgr_id from people) "
                       (if *cstats-user-list* 
                           (conc "and uid in (" *cstats-user-list* ")")
                           (conc "and uid not null")
                        )
                       (if *cstats-ignore-users* 
                           (conc " and uid not in (" *cstats-ignore-users* ") order by uid asc")
                           (conc " and uid not null order by uid asc")
                        )))

    )
    (query (fold-rows 
      (lambda(user user-xs)
        (print "User: " user )
        (let* (  ;;(peak-data (gen-peak-for-user user #f))
               ;;(peak-data-mgr (gen-peak-for-user user #t))
               (foo 0 ))
          ;;(hash-table-set! usage-ht (conc (car user) "-team") (third peak-data-mgr))
          (print (hash-table-ref usage-ht (conc (car user) "-team")))
          ;;(create-peak-csv user peak-data)
          ;;(create-peak-html  user peak-data)
          ;;(create-peak-csv  (list (conc (car user) "-team")) peak-data-mgr)
          ;;(create-peak-html (list (conc (car user) "-team")) peak-data-mgr)
          (create-peak-stacked-html (car user) usage-ht)
          ;;(handle-exceptions exn (print "Update-peak-db failed" ((condition-property-accessor 'exn 'message) exn)) (update-peak-db  user peak-data))
          ;;(print "Updated everything for " user)
        )
      ) 0)
    (sql people-db (conc "select uid from people where id in (select distinct mgr_id from people) "
                       (if *cstats-user-list* 
                           (conc "and uid in (" *cstats-user-list* ")")
                           (conc "and uid not null")
                        )
                       (if *cstats-ignore-users* 
                           (conc " and uid not in (" *cstats-ignore-users* ") order by uid asc")
                           (conc " and uid not null order by uid asc")
                        )))

    )








    (print (hash-table-keys usage-ht))

  ))

)