‎03-24-2009 05:31 PM
‎08-20-2009 01:55 AM
‎05-14-2009 07:35 PM - last edited on ‎06-16-2023 04:08 PM by Mercedes_O
Just an update. We are currently doing this succesfully. We had it done before but forgot to respond.
Wasn't too hard. In our case, we created 2 extra stored procedures using the same style as listed above. Then went into the actions.aspx page and did the following.
- Make a duplicate of the MM:DataSet
- Rename the CommandText for both to be the 2 different stored procedure names (Web30ActionsBasic & Web30ActionsAdvanced)
- Make sure the parameters are adding @comp and @domain grabbing the proper values
- Rename the 2nd dataset id to something different (in our case, dscomputers2 to be simple)
- Right after the first table (which would be left alone but woul be the basic list) we would add the folowing line/code " <% If dscomputers2.DefaultView.Table.Rows.Count > 0 Then%> " which would check the 2nd dataset if it even has rows. If it doesn't, we don't need to add the 2nd table (advanced actions) but if it does, we would need to add it.
- Add the 2nd table (copy the code of the first table changing the tel to tel2, myrow to myrow2, dscomputers to dscomputer2 in any place it needs for table 2)
- Add the line/code at the very end of the page (right under the </table>) "<% End If%>"
As you can see from the picture below, we also added a row above each table that we use as a header/title for that table. That line of code is as follows.
"<tr><td colspan=2 align=center class="bottom">Basic Actions</td></tr>"
to which we added a new class to ls.css called "bottom" that has the following code which adds the grey line to the bottom of that cell as well as makes the text bold.
".bottom
{
BORDER-bottom: #CCCCCC 1px solid;
font-weight: bold;
}"
To us, it makes it look a bit better as well as keeping the actions a bit seperate. Hope this helps others. See below for result.
‎03-25-2009 03:58 AM
‎03-27-2009 01:52 PM
sticky wrote:
I think it's a good idea to be able to hide certain actions from certain users, especially if they're unlikely to be able to do them anyway. It'd avoid the inevitable "why can't I do this?" question. I'll definitely be looking into setting it up something like how frendel has suggested.
On another note, currently all the actions are one big list - it'd be useful if the actions were grouped according to the access rights required on the remote computer to use them, e.g.:
Basic Actions (no remote rights required):
Trigger scan
Ping
Ping (continuous)
Pathping
Traceroute
Advanced Actions (remote rights required):
Remote control
VNC
Remote desktop
Open C$
Open Admin$
Computer management
Event viewer
Remote Registry
Take screenshot
Reboot
Shutdown
Abort shutdown
Computer uptime
Delete old user profiles
Show open files
Remote processes
Who's logged on
Michael
‎03-24-2009 09:01 PM
‎03-24-2009 06:59 PM
ALTER PROCEDURE [dbo].[Web30Actions](@comp varchar(300), @domain varchar(80))
AS
/* Default setting */
if @comp = 'it_laptop'
begin
SELECT Description, Action, Icon, confirmation
FROM dbo.tsysactions
WHERE (enabled = 1)
ORDER BY sortorder
end
/* Begin Secure Actions */
else if @comp = 'accounting_main'
begin
SELECT Description, Action, Icon, confirmation
FROM dbo.tsysactions
WHERE (secure = 0) and (enabled = 1) and (domain = 'F') or
(secure = 0) and (enabled = 1) and (domain = 'A') or
(secure = 0) and (enabled = 1) and (domain = 'W')
ORDER BY sortorder
end
/* Linux VNC only */
else if @comp like 'Linux%'
begin
SELECT Description, Action, Icon, confirmation
FROM dbo.tsysactions
WHERE (enabled = 1) and (domain = 'L')
ORDER BY sortorder
end
else
/* Everything else */
begin
SELECT Description, Action, Icon, confirmation
FROM dbo.tsysactions
WHERE (enabled = 1)
ORDER BY sortorder
end
‎03-24-2009 05:36 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now