Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting-dashboard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-reporting-dashboard
Commits
12cf84f0
Commit
12cf84f0
authored
Nov 25, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Gustaf changes
parent
f458ee2b
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
78 additions
and
78 deletions
+78
-78
project-eva.tcl
lib/project-eva.tcl
+1
-1
top-customers.tcl
lib/top-customers.tcl
+1
-1
intranet-reporting-dashboard-procs.tcl
tcl/intranet-reporting-dashboard-procs.tcl
+48
-48
all_time_top_customers.adp
www/all_time_top_customers.adp
+3
-3
generic.adp
www/generic.adp
+3
-3
index.adp
www/index.adp
+6
-6
index.tcl
www/index.tcl
+1
-1
indicators.adp
www/indicators.adp
+3
-3
indicators.tcl
www/indicators.tcl
+1
-1
project-eva.json.tcl
www/project-eva.json.tcl
+9
-9
top-customers.json.tcl
www/top-customers.json.tcl
+1
-1
yearly_revenues.tcl
www/yearly_revenues.tcl
+1
-1
No files found.
lib/project-eva.tcl
View file @
12cf84f0
...
...
@@ -20,7 +20,7 @@ if {![info exists diagram_project_id]} {
}
# Create a random ID for the diagram
set
diagram_rand
[
expr
round
(
rand
()
* 100000000.0
)
]
set
diagram_rand
[
expr
{
round
(
rand
()
* 100000000.0
)}
]
set
diagram_id
"project_eva_
$diagram
_rand"
set
default_currency
[
im_parameter -package_id
[
im_package_cost_id
]
"DefaultCurrency"
""
"EUR"
]
...
...
lib/top-customers.tcl
View file @
12cf84f0
...
...
@@ -24,7 +24,7 @@ set max_length_customer_name 15
# ----------------------------------------------------
# Create a random ID for the diagram
set
diagram_rand
[
expr
round
(
rand
()
* 100000000.0
)
]
set
diagram_rand
[
expr
{
round
(
rand
()
* 100000000.0
)}
]
set
diagram_id
"top_customers_
$diagram
_rand"
set
default_currency
[
im_parameter -package_id
[
im_package_cost_id
]
"DefaultCurrency"
""
"EUR"
]
...
...
tcl/intranet-reporting-dashboard-procs.tcl
View file @
12cf84f0
This diff is collapsed.
Click to expand it.
www/all_time_top_customers.adp
View file @
12cf84f0
<table cellspacing=
0 cellpadding=0
width="100%">
<tr valign=
center
>
<table cellspacing=
"0" cellpadding="0"
width="100%">
<tr valign=
"center"
>
<td>
</td>
<td align=
right
>
<td align=
"right"
>
@cube_link;noquote@
</td>
</tr>
...
...
www/generic.adp
View file @
12cf84f0
<table cellspacing=
0 cellpadding=0
width="100%">
<tr valign=
center
>
<table cellspacing=
"0" cellpadding="0"
width="100%">
<tr valign=
"center"
>
<td>
<h2>@component_name@</h2>
</td>
<td align=
right
>
<td align=
"right"
>
@cube_link;noquote@
</td>
</tr>
...
...
www/index.adp
View file @
12cf84f0
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">projects</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<h1><%=[lang::message::lookup "" intranet-reporting-dashboard.Dashboard "Dashboard"]%></h1>
<%= [im_component_bay top] %>
<table cellpadding=
0 cellspacing=0 border=0
width="100%">
<table cellpadding=
"0" cellspacing="0" border="0"
width="100%">
<tr>
<td valign=
top
width='50%'>
<td valign=
"top"
width='50%'>
<%= [im_component_bay left] %>
</td>
<td width='5px'> </td>
<td valign=
top
>
<td valign=
"top"
>
<%= [im_component_bay right] %>
</td>
</tr>
</table><br>
<table cellpadding=
0 cellspacing=0 border=0
width="100%">
<table cellpadding=
"0" cellspacing="0" border="0"
width="100%">
<tr><td>
<!-- Bottom Component Bay -->
<%= [im_component_bay bottom] %>
...
...
www/index.tcl
View file @
12cf84f0
...
...
@@ -34,7 +34,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------------
set
show_context_help_p 0
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
return_url
[
im_url_with_query
]
set
current_url
[
ns_conn url
]
set
site_wide_admin_p
[
im_is_user_site_wide_or_intranet_admin
$user
_id
]
...
...
www/indicators.adp
View file @
12cf84f0
<master src="../../intranet-core/www/master">
<property name="
title">@page_title
@</property>
<property name="context_bar">@context_bar;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context_bar">@context_bar;
literal
@</property>
<property name="dashboard">home</property>
<property name="focus">@page_focus;
noquote
@</property>
<property name="focus">@page_focus;
literal
@</property>
<h2>@page_title@</h2>
...
...
www/indicators.tcl
View file @
12cf84f0
...
...
@@ -21,7 +21,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
page_title
"
[
_ intranet-dashboard.Dashboard
]
"
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
www/project-eva.json.tcl
View file @
12cf84f0
...
...
@@ -91,7 +91,7 @@ template::multirow foreach mr {
set message
"Data loaded. Warning: Using default hourly_cost=
$default
_hourly_cost"
set hourly_cost
$default
_hourly_cost
}
set total_planned_ts_value
[
expr
$total
_planned_ts_value +
$planned
_units *
$hourly
_cost
]
set total_planned_ts_value
[
expr
{
$total
_planned_ts_value +
$planned
_units *
$hourly
_cost
}
]
}
set
timeline_list
[
lsort
-integer
[
array
name timeline_hash
]]
...
...
@@ -116,7 +116,7 @@ template::multirow foreach mr {
for
{
set
i
$start
_idx
}
{
$i
<
$end
_idx
}
{
incr
i
}
{
set incl 0.0
if
{[
info
exists inclination_hash
(
$i
)]}
{
set incl
$inclination
_hash
(
$i
)
}
set incl
[
expr
$incl
+
$inclination
*
$hourly
_cost
]
set incl
[
expr
{
$incl
+
$inclination
*
$hourly
_cost
}
]
set inclination_hash
(
$i
)
$incl
}
}
...
...
@@ -128,22 +128,22 @@ template::multirow foreach mr {
# ----------------------------------------------------
set
timeline_list_len
[
expr
[
llength
$timeline
_list
]
- 1
]
set
timeline_list_len
[
expr
{[
llength
$timeline
_list
]
- 1
}
]
set
value 0.0
array
set planned_ts_value_hash
{}
set
planned_ts_value_hash
(
0
)
$value
for
{
set
i 0
}
{
$i
<
$timeline
_list_len
}
{
incr
i
}
{
set start_epoch
[
lindex
$timeline
_list
$i
]
set end_epoch
[
lindex
$timeline
_list
[
expr
$i
+1
]
]
set end_epoch
[
lindex
$timeline
_list
$i
+1
]
set inclination 0.0
if
{[
info
exists inclination_hash
(
$i
)]}
{
set inclination
$inclination
_hash
(
$i
)
}
set duration_hours
[
expr
(
$end
_epoch -
$start
_epoch
)
/ 3600.0
]
set delta
[
expr
$duration
_hours *
$inclination
]
set value
[
expr
$value
+
$delta
]
set delta
[
expr
{
$duration
_hours *
$inclination
}
]
set value
[
expr
{
$value
+
$delta
}
]
ns_log Notice
"project-eva: i=
$i:
start:
[
im_date_epoch_to_ansi
$start
_epoch
]
[
im_date_epoch_to_time
$start
_epoch
]
, end:
[
im_date_epoch_to_ansi
$end
_epoch
]
[
im_date_epoch_to_time
$end
_epoch
]
, duration_hours=
$duration
_hours, inclination=
$inclination
, delta=
$delta
, value=
$value
"
set planned_ts_value_hash
([
expr
$i
+1
])
$value
set planned_ts_value_hash
([
expr
{
$i
+1
}
])
$value
}
...
...
@@ -202,7 +202,7 @@ db_foreach ts $timesheet_sql {
# Update the hash
set key
"
$cost
_type_id-
$ctr
"
set value
[
expr
$value
+
$amount
]
set value
[
expr
{
$value
+
$amount
}
]
set cost_hash
(
$key
)
$value
}
...
...
@@ -223,7 +223,7 @@ while {0 != $old_cost_type_id && $ctr < $timeline_list_len} {
set
ctr 0
set
json_lines
{}
foreach
epoch
$timeline
_list
{
set planned_ts_value
[
expr
round
(
100.0 *
$planned
_ts_value_hash
(
$ctr
))
/ 100.0
]
set planned_ts_value
[
expr
{
round
(
100.0 *
$planned
_ts_value_hash
(
$ctr
))
/ 100.0
}
]
set json_values
[
list
]
lappend json_values
"'date': '
[
im_date_epoch_to_ansi
$epoch
]
[
im_date_epoch_to_time
$epoch
]
'"
...
...
www/top-customers.json.tcl
View file @
12cf84f0
...
...
@@ -67,7 +67,7 @@ db_foreach top_customers $top_customers_sql {
if
{
$count
<
$diagram
_max_customers
}
{
multirow append top_customers
$customer
_name_limited
$customer
_revenues
}
else
{
set other_revenues
[
expr
$other
_revenues +
$customer
_revenues
]
set other_revenues
[
expr
{
$other
_revenues +
$customer
_revenues
}
]
}
incr count
...
...
www/yearly_revenues.tcl
View file @
12cf84f0
...
...
@@ -65,7 +65,7 @@ template::diagram::create \
}
}
if
{
[
exists_and_not_null csv
]
}
{
if
{
([
info
exists csv
]
&&
$csv
ne
""
)
}
{
template::diagram::write_output -name dia1
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment