Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-sla-management
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-sla-management
Commits
753b3f7a
Commit
753b3f7a
authored
Nov 30, 2010
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- first version of param + indicators running, but in two separate components
parent
26a337fc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
37 deletions
+31
-37
intranet-sla-management-procs.tcl
tcl/intranet-sla-management-procs.tcl
+1
-1
new.adp
www/new.adp
+1
-1
service-hours-component.adp
www/service-hours-component.adp
+4
-4
sla-parameter-indicator-component.adp
www/sla-parameter-indicator-component.adp
+0
-0
sla-parameter-indicator-component.tcl
www/sla-parameter-indicator-component.tcl
+25
-31
No files found.
tcl/intranet-sla-management-procs.tcl
View file @
753b3f7a
...
...
@@ -102,7 +102,7 @@ ad_proc -public im_sla_parameter_list_component {
[
list
return_url
[
im_url_with_query
]]
\
]
set result
[
ad_parse_template -params
$params
"/packages/intranet-sla-management/www/indicator-component"
]
set result
[
ad_parse_template -params
$params
"/packages/intranet-sla-management/www/
sla-parameter-
indicator-component"
]
return
[
string
trim
$result
]
}
...
...
www/new.adp
View file @
753b3f7a
...
...
@@ -18,7 +18,7 @@
<table width="100%">
<tr valign="top">
<td width="50%">
<%= [im_box_header [lang::message::lookup "" intranet-
helpdesk.Ticket_Details "Ticket
Details"]] %>
<%= [im_box_header [lang::message::lookup "" intranet-
sla-management.SAL_Parameter_Details "SLA Parameter
Details"]] %>
<formtemplate id=form></formtemplate>
@param_action_html;noquote@
<%= [im_box_footer] %>
...
...
www/service-hours-component.adp
View file @
753b3f7a
...
...
@@ -2,12 +2,12 @@
<form action="/intranet-sla-management/service-hours-save" method=POST>
<%= [export_form_vars return_url sla_id] %>
<table cellspacing=
1 cellpadding=1
>
<table cellspacing=
0 cellpadding=0
>
<tr class=rowtitle>
<td class=rowtitle><%= [lang::message::lookup "" intranet-sla-management.Day "Day"] %></td>
<multiple name=hours>
<td class=rowtitle align=center>@hours.hour@</td>
</multiple>
<multiple name=hours>
<td class=rowtitle align=center>@hours.hour@</td>
</multiple>
</tr>
@body_html;noquote@
<tr>
...
...
www/indicator-component.adp
→
www/
sla-parameter-
indicator-component.adp
View file @
753b3f7a
File moved
www/indicator-component.tcl
→
www/
sla-parameter-
indicator-component.tcl
View file @
753b3f7a
...
...
@@ -5,13 +5,17 @@
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
# Shows a list of parameters plus the indicators related to the parameter
# This indicator is executed from within the view page for a project
# of sub-type "Service Level Agreement". It shows a list of indicators,
# one for each SLA parameter.
#
# The component is called with a parameter "project_id" representing
# the SLA project.
# ---------------------------------------------------------------
# Variables
# ---------------------------------------------------------------
# { param_id:integer ""
}
# { project_id:integer ""
}
# return_url
...
...
@@ -28,33 +32,13 @@ set page_title [lang::message::lookup "" intranet-reporting.Indicators "Indicato
set
context_bar
[
im_context_bar
$page
_title
]
set
context
""
if
{
!
[
info
exists param_id
]}
{
set param_id
""
}
if
{
!
[
info
exists project_id
]}
{
set project_id
""
}
if
{
""
==
$param
_id &&
""
==
$project
_id
}
{
ad_return_complaint 1
"<b>indicator-component: Neither param_id nor project_id specified</b>"
}
if
{
!
[
info
exists project_id
]}
{
ad_return_complaint 1
"sla-parameter-indicator-component.tcl: variable project_id not defined"
}
# Evaluate indicators every X hours:
set
eval_interval_hours
[
parameter::get_from_package_key -package_key
"intranet-reporting-indicators"
-parameter
"IndicatorEvaluationIntervalHours"
-default 24
]
# Calculate important vars:
# sla_id is the ID of the effective SLA of the parameters
# param_id is one or more (TCL list
)
parameters to display
#
if
{
""
==
$project
_id
}
{
# We know that param_id contains a valid parameter
set sla_id
[
db_string sla
"select param_sla_id from im_sla_parameters where param_id = :param_id"
-default
""
]
}
else
{
# We know that project_id contains the ID of project
set sla_id
$project
_id
set param_id
[
db_list param_per_sla
"
select p.param_id
from im_sla_parameters p
where p.param_sla_id = :sla_id
"
]
lappend param_id 0
}
# Permissions: Check read permissions on the SLA
im_project_permissions
$current
_user_id
$
sla
_id sla_view sla_read sla_write sla_admin
im_project_permissions
$current
_user_id
$
project
_id sla_view sla_read sla_write sla_admin
# $read is queries in the .adp template
...
...
@@ -63,6 +47,14 @@ im_project_permissions $current_user_id $sla_id sla_view sla_read sla_write sla_
# ------------------------------------------------------
set
elements_list
{}
lappend
elements_list
\
param
{
label
"Param"
display_template
{
<a href=@reports.param_view_url@>@reports.param_name@</a>
}
}
lappend
elements_list
\
value
{
label
"Value"
...
...
@@ -110,12 +102,10 @@ set permission_sql "and 't' = im_object_permission_p(r.report_id, :current_user_
#if {$view_reports_all_p
}
{
set permission_sql
""
}
set
indicator_cnt 0
db_multirow -extend
{
report_view_url edit_html value
_html diagram_html help_gif indicator_color
}
reports get_reports
"
db_multirow -extend
{
param_view_url report_view_url report_edit_html value_html edit
_html diagram_html help_gif indicator_color
}
reports get_reports
"
select
r.report_id,
r.report_name,
r.report_description,
r.report_sql,
sp.*,
r.*,
i.*,
im_category_from_id(i.indicator_section_id) as section,
ir.result
...
...
@@ -133,12 +123,13 @@ db_multirow -extend {report_view_url edit_html value_html diagram_html help_gif
group by result_indicator_id
) ir ON (i.indicator_id = ir.result_indicator_id)
where
sp.param_
id in (
[
join
$param
_id
","
]
)
and
sp.param_
sla_id = :project_id
and
re.object_id_one = sp.param_id and
re.object_id_two = r.report_id and
re.rel_id = spir.rel_id and
r.report_id = i.indicator_id and
r.report_type_id =
[
im_report_type_indicator
]
r.report_type_id =
[
im_report_type_indicator
]
and
i.indicator_object_type = 'im_sla_parameter'
$permission
_sql
order by
section
...
...
@@ -147,6 +138,9 @@ db_multirow -extend {report_view_url edit_html value_html diagram_html help_gif
set report_view_url
[
export_vars -base
"/intranet-reporting-indicators/view"
{
indicator_id return_url
}]
set report_edit_url
[
export_vars -base
"/intranet-reporting-indicators/new"
{
indicator_id return_url
}]
set param_view_url
[
export_vars -base
"/intranet-sla-management/new"
{
param_id
{
form_mode display
}
return_url
}]
set perms_url
[
export_vars -base
"/intranet-reporting-indicators/perms"
{{
object_id
$indicator
_id
}
return_url
}]
set edit_html
"
<a href='
$report
_edit_url'>
[
im_gif
"wrench"
]
</a>
...
...
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