How to fix the width of a tree dropdown ?

G

Guest

Hello,

Im want to fix the width of a dashboard.
I have a field which has a field (in this dashboard on the left part of my
screen)
which could be long and make the right side of the screen out the display.
I wanted the size of the fiedl QueuedCountLabel fixed and the text inside
wrapped up and/or the dashboard itself with a fixed width.

I was trying a syntax as below:
<%@ Control Language="vb" inherits="Altiris.Helpdesk.Web.TemplateControl" %>
<%@ Register TagPrefix="aw" Namespace="Altiris.AppWeaver"
Assembly="Altiris.AppWeaver" %>
<%@ Import Namespace="Altiris.Helpdesk.Services" %>
<asp:Xml id="xmlCustomQueries" Runat="server" Visible="False"
EnableViewState="False">
<queries>
<query id="open"
type="WorkItem"
title="sidMyOpenTitle"
sql="workitem_status_lookup_id = 300" />
<query id="queued"
type="WorkItem"
title="sidQueuedTitle"
sql="" />
</queries>
</asp:Xml>
<script language="VB" runat="server">
' This method is called by the Template Engine every time the template is
loaded.
Public Overrides Sub PrepareTemplate()
Dim title As String
Dim text As String
Dim whereClause As String
Dim count As Integer
Dim reportPeriod As String = "ALLDATES"
Dim dsQueries As Data.DataSet =
ListDataSet.GetQueryDefinitions(xmlCustomQueries.Document)
Dim reportPeriodClause As String = " and " & TryString("sidSqlALLDATES")
Dim currentWorkerClause As String = " and workitem_assigned_to_worker_id =
$current_worker_id$"
' refresh the configuration if necessary
Altiris.Helpdesk.Services.Configuration.Current.CheckRefresh()
lblTime.Text = Now()
' Find the count of open items assigned to the worker
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "open", title, text,
whereClause, reportPeriodClause, currentWorkerClause)
SetHyperLink(hlOpenCount, title, text, whereClause, TryString("sidALLDATES"))
' Find the count of open items assigned to the worker's queue of record (if
any)
Dim queue As Integer = CurrentWorker.worker_queue_id
If queue = 0 Then
' queue is prompted
hlQueuedCount.label = ResourceManager.ResolveString("sidLblQueuedNone")
hlQueuedCount.command = ""
Else
Dim workerQueueClause As String = String.Format(" and
workitem_assigned_to_worker_id = {0}", queue)
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "queued", title,
text, whereClause, workerQueueClause, reportPeriodClause)
SetHyperLink(hlQueuedCount, title, text, whereClause,
CurrentWorker.queue_name)
hlQueuedCount.Label = ResourceManager.TryString("sidLblQueued",
CurrentWorker.queue_name)
End If
End Sub
Private Sub SetHyperLink(ByRef hl As Altiris.AppWeaver.HyperLink, ByVal
title As String, ByVal text As String, ByVal whereClause As String, ByVal
titleParam As String)
dim t as string = ResolveString(title, titleParam)
hl.Text = TryString("sidItemsCount", text)
hl.Tooltip = t
hl.Params.Add(New Param("title", t))
hl.Params.Add(New Param("where", whereClause))
hl.Params.Add(New Param("viewOne", "yes"))
End Sub
</script>
<aw:Layout id="loCounts" runat="server" >
<aw:label runat="server" id="lblTime" Font-Size="xx-small" />
<aw:HyperLink runat="server" id="hlOpenCount" label="sidLblOpen"
Labelposition="top" command="runQuery" />
<aw:HyperLink runat="server" id="hlQueuedCount" labelposition="top"
command="runQuery" />
</aw:Layout>
<td width="1%"><awynamicPanel id="dpDash" runat="server" Command="dashboard"
width="50" refreshPeriod="120"></awynamicPanel>
or
<td width="20"><awynamicPanel id="dpDash" runat="server" Command="dashboard"
refreshPeriod="120"></awynamicPanel>
but these did not have any effect on the size of the dashboard.ascx
I tried also to fix the width through the at one level up through a file
AltirisConsole.ascx
but no luck as well.
<td Width="3"><awynamicPanel id="dpDash" runat="server" Command="dashboard"
width="3" refreshPeriod="120">
or
<td><awynamicPanel id="dpDash" runat="server" Command="dashboard" width="3"
refreshPeriod="120">
but no luck the column remains large as the field name is....
I have this VB code on top of the XML defined below:
Dim queue As Integer = CurrentWorker.worker_queue_id
If queue = 0 Then
' queue is prompted
hlQueuedCount.label = ResourceManager.ResolveString("sidLblQueuedNone")
hlQueuedCount.command = ""
Else
Dim workerQueueClause As String = String.Format(" and
workitem_assigned_to_worker_id = {0}", queue)
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "queued", title,
text, whereClause, workerQueueClause, reportPeriodClause)
SetHyperLink(hlQueuedCount, title, text, whereClause,
CurrentWorker.queue_name)
hlQueuedCount.Label = ResourceManager.TryString("sidLblQueued",
CurrentWorker.queue_name)
End If
could it be fixed at this level ...?
this is the line which is calling the dashboard from the altirisconsole...
<tr>
<td width="1%" height="1"><aw:DynamicPanel id="dpDash" runat="server"
Command="dashboard" refreshPeriod="120"></aw:DynamicPanel></td>
</tr>

If you need more details don't hesitate to ask. Also if you think there
could be a command somewhere which block the sizing
let me know and try to tell me which command or parameter could prevent this.
 
G

Guest

Hello,

Will it be possible to ifx the LABEL size as actually it dpends on the text
pass to it, I wanted to have it fix to one width only not expandable:
<aw:HyperLink runat="server" id="hlQueuedCount" labelposition="top"
labelwidth="30" command="runQuery" />
as if I use the parameter width it just affect the result of the query
displayed by hlQueuedCount I wanted to try on the Label itself... with a
parameter labelwidth but it does not seems to do anything...

thanks,
Dom
 
G

Guest

Hello,

Thank you again and again to John Doyle who has done an excellent solution

Label had to be changed to text....

I just wanted to summarize for an easy use:
Changing the size of the Dashboard.ascx

If queue = 0 Then ' queue is prompted
lblQueuedCount.Text = ResourceManager.ResolveString("sidLblQueuedNone")
hlQueuedCount.command = ""
Else
Dim workerQueueClause As String = String.Format(" and
workitem_assigned_to_worker_id = {0}", queue)
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "queued", title,
text, whereClause, workerQueueClause, reportPeriodClause)
SetHyperLink(hlQueuedCount, title, text, whereClause,
CurrentWorker.queue_name)
lblQueuedCount.Text = ResourceManager.TryString("sidLblQueued",
CurrentWorker.queue_name)
End If

And

<aw:Layout id="loCounts" runat="server">
<aw:label runat="server" id="lblTime" Font-Size="xx-small" />
<aw:HyperLink runat="server" id="hlOpenCount" label="sidLblOpen"
labelposition="top" command="runQuery" />
<aw:label runat="server" id="lblQueuedCount" class="clsLabel"
SuspendRowSpacing="True" style="word-wrap:break-word;" />
<aw:HyperLink runat="server" id="hlQueuedCount" labelposition="top"
command="runQuery" />
</aw:Layout>


Thanks,
Dom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top