| |
1417 |
1417 |
-arg_list [list package_id $package_id] |
| |
1418 |
1418 |
|
| |
1419 |
1419 |
db_exec_plsql apm_package_instance_delete {} |
| |
1420 |
1420 |
} |
| |
1421 |
1421 |
|
| |
1422 |
1422 |
## |
| |
1423 |
1423 |
## Logging |
| |
1424 |
1424 |
## |
| |
1425 |
1425 |
|
| |
1426 |
1426 |
ad_proc -public apm_log { |
| |
1427 |
1427 |
level |
| |
1428 |
1428 |
msg |
| |
1429 |
1429 |
} { |
| |
1430 |
1430 |
Centralized APM logging. If you want to debug the APM, change |
| |
1431 |
1431 |
APMDebug to Debug and restart the server. |
| |
1432 |
1432 |
} { |
| |
1433 |
1433 |
if {![string equal "APMDebug" $level]} { |
| |
1434 |
1434 |
ns_log $level "$msg" |
| |
1435 |
1435 |
} |
| |
1436 |
1436 |
} |
| |
|
1437 |
|
| |
|
1438 |
ad_proc -private apm_application_new_checkbox {} { |
| |
|
1439 |
Return an HTML checkbox of package_key and package names |
| |
|
1440 |
for applications that can be mounted in the site-map. Excludes |
| |
|
1441 |
singletons that are already instantiated. |
| |
|
1442 |
|
| |
|
1443 |
@author Peter Marklund |
| |
|
1444 |
} { |
| |
|
1445 |
set html_string "<select name=package_key>" |
| |
|
1446 |
|
| |
|
1447 |
db_foreach package_types { |
| |
|
1448 |
select package_key, pretty_name |
| |
|
1449 |
from apm_package_types |
| |
|
1450 |
where not (apm_package.singleton_p(package_key) = 1 and |
| |
|
1451 |
apm_package.num_instances(package_key) >= 1) |
| |
|
1452 |
order by pretty_name |
| |
|
1453 |
} { |
| |
|
1454 |
append html_string "<option value=$package_key>$pretty_name</option>\n" |
| |
|
1455 |
} |
| |
|
1456 |
|
| |
|
1457 |
# If this is a site-wide admin, offer a link to the package manager |
| |
|
1458 |
if { [ad_permission_p 0 admin] } { |
| |
|
1459 |
append html_string "<option value=\"/new\">--Install new package--</option>\n" |
| |
|
1460 |
} |
| |
|
1461 |
|
| |
|
1462 |
append html_string "</select>" |
| |
|
1463 |
|
| |
|
1464 |
return $html_string |
| |
|
1465 |
} |