Parent: [9d9264] (diff)

Child: [5eefff] (diff)

Download this file

main.mxml    249 lines (216 with data), 10.1 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2013/2014, Intel Performance Learning Solutions Ltd, Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
**/
/**
* Main view.
*
* created by Perumal Kuppuudaiyar (pk.udaiyar@gmail.com)
* modified by Sridhar Voorakkara (vsridhar420@gmail.com)
*/
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="100%" verticalAlign="top" horizontalAlign="center"
borderColor="#020D14" xmlns:components="components.*" layout="vertical" width="100%" color="#D3ECF1"
backgroundGradientAlphas="[1.0, 0.0]" backgroundGradientColors="[#0A0101, #A41E1E]">
<mx:Script>
<![CDATA[
import components.open_project;
import mx.effects.easing.Bounce;
import components.user_login;
import flash.utils.Dictionary;
import mx.collections.*;
import mx.controls.Alert;
import mx.events.MenuEvent;
import net.timbusproject.AppUtility;
import net.timbusproject.ProjectDataHolder;
import net.timbusproject.ProjectHolder;
import net.timbusproject.SocketServerClient;
[Embed(source="../resources/images/timbus-main-logo.png")] [Bindable] public var timbuslogoCls:Class;
[Embed(source="../resources/images/F7_and_EUFlag.PNG")] [Bindable] public var euFlagsCls:Class;
[Bindable] public var menuBarCollection:XMLListCollection;
[Bindable] public static var userLogins:Boolean=false;
public static var _inProgressProjects:ProjectHolder;
public static var _completedprojects:Dictionary;
public static var _networkScandata:Object;
public static var _files:Object;
public static var _installedAppdata:Object;
//public static var _userLogin:Boolean;
public var ui_states:Object;
private function initCollections():void {
menuBarCollection = new XMLListCollection(AppUtility.getMenuItems());
ui_states=AppUtility.getAppStates();
_inProgressProjects=new ProjectHolder();
this.currentState="login";
}
public static function setStatus(status:Boolean):void{
userLogins=status;
}
// Event handler for the MenuBar control's change event.
private function changeHandler(event:MenuEvent):void {
var selMenuData:String=event.item.@data as String;
//enforce project selection
if(ProjectDataHolder.currentProjectID=="" && ((selMenuData=="AA") || (selMenuData=="AB"))){
Alert.show("No Project Selected or Created");
return;
}
if (event.menu != null) {
this.currentState=this.ui_states[event.item.@data];
}
}
// Event handler for the MenuBar control's itemRollOver event.
private function rollOverHandler(event:MenuEvent):void {
}
private function hideNonVVCVS():void{
ProjectDataHolder.hideVVCVS=false;
ProjectDataHolder.hideNonVVCVS=true;
}
private function hideVVCVS():void{
ProjectDataHolder.hideNonVVCVS=false;
ProjectDataHolder.hideVVCVS=true;
Alert.show("hideVVCVS");
}
// Event handler for the MenuBar control's itemClick event.
private function itemClickHandler(event:MenuEvent):void {
// itemClickTextArea.text = "type: " + event.type + "\n";
// itemClickTextArea.text += "target menuBarIndex: " +
// event.index + "\n";
}
]]>
</mx:Script>
<mx:Style source="../css/style.css"/>
<mx:Canvas backgroundColor="#FFFFFF" width="98%" height="83" borderColor="#033B62" borderStyle="solid" borderThickness="6">
<mx:Image source="{timbuslogoCls}" width="219" height="71" left="6"/>
<!-- <mx:Image y="41" source="{intellogoCls}" width="159" height="103" horizontalCenter="-244"/> -->
<mx:Image source="{euFlagsCls}" width="246" height="70" right="4" y="1"/>
<mx:Label text="Digital Preservation Expert Suite" color="#030E10" width="40%" height="45" fontSize="25" horizontalCenter="-13" verticalCenter="-3" textAlign="center" fontWeight="bold" styleName="title1"/>
</mx:Canvas>
<mx:Canvas width="98%" height="8%" backgroundColor="#5DC9EC" borderColor="#033B62" borderStyle="solid">
<mx:MenuBar id="dpesMenu" enabled="{userLogins}" labelField="@label" creationComplete="initCollections()"
dataProvider="{menuBarCollection}"
change="changeHandler(event);"
itemClick="itemClickHandler(event);"
itemRollOver="rollOverHandler(event);" textAlign="left" fontSize="20" width="763" height="90%"
fontWeight="bold" fontFamily="Arial" color="#0F1111" themeColor="#9E2DC8" horizontalCenter="0" verticalCenter="0"/>
</mx:Canvas>
<mx:states >
<!--Project Menu States -->
<mx:State name="create_project" >
<mx:SetProperty target="{pnl_main}" name="title" value="Project->Create new preservation" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:create_project />
</mx:AddChild>
</mx:State>
<mx:State name="open_project" >
<mx:SetProperty target="{pnl_main}" name="title" value="Project->Review existing preservation" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:open_project />
</mx:AddChild>
</mx:State>
<!-- End of Project Menu States -->
<!--Analyse Menu States -->
<mx:State name="model_imports" >
<mx:SetProperty target="{pnl_main}" name="title" value="Analysis->Import business process models" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:import_models />
</mx:AddChild>
</mx:State>
<mx:State name="estimate_costs" >
<mx:SetProperty target="{pnl_main}" name="title" value="Analysis->Estimate preservation costs" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:estimate_costs />
</mx:AddChild>
</mx:State>
<!-- End of Analyse Menu States Preserve Menu States -->
<mx:State name="context_model" >
<mx:SetProperty target="{pnl_main}" name="title" value="Context Model->Artefacts Sources" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:bp_model_analyser />
</mx:AddChild>
</mx:State>
<mx:State name="review_metadata" >
<mx:SetProperty target="{pnl_main}" name="title" value="Preserve->Source artefacts and generate metadata" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:preservation />
</mx:AddChild>
</mx:State>
<mx:State name="vvframe_data" >
<mx:SetProperty target="{pnl_main}" name="title" value="Preserve->Submit verification and validation data" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:verification_validation />
</mx:AddChild>
</mx:State>
<mx:State name="create_package" >
<mx:SetProperty target="{pnl_main}" name="title" value="Preserve->Create preservation package" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:create_package />
</mx:AddChild>
</mx:State>
<mx:State name="create_container" >
<mx:SetProperty target="{pnl_main}" name="title" value="Preserve->Select storage and complete preservation" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:create_container />
</mx:AddChild>
</mx:State>
<mx:State name="send_to_repo" >
<mx:SetProperty target="{pnl_main}" name="title" value="Preserve->Preserve Package" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:send_to_repo />
</mx:AddChild>
</mx:State>
<mx:State name="manage" >
<mx:SetProperty target="{pnl_main}" name="title" value="Manage preservation projects" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:manage_environment />
</mx:AddChild>
</mx:State>
<mx:State name="login" >
<mx:SetProperty target="{pnl_main}" name="title" value="Welcome to Timbus - Please login" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:user_login />
</mx:AddChild>
</mx:State>
<mx:State name="start" >
<mx:SetProperty target="{pnl_main}" name="title" value="Welcome to Timbus - Introduction" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:Start_Page />
</mx:AddChild>
</mx:State>
<mx:State name="redeploy" >
<mx:SetProperty target="{pnl_main}" name="title" value="Redeploy preserved business process" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:redeploy />
</mx:AddChild>
</mx:State>
<mx:State name="ManageVM" >
<mx:SetProperty target="{pnl_main}" name="title" value="Manage Redeployed Environment" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:VM_Mgmt_Console />
</mx:AddChild>
</mx:State>
<mx:State name="Verification" >
<mx:SetProperty target="{pnl_main}" name="title" value="Verify Redeployed Environment" />
<mx:AddChild relativeTo="{pnl_main}" >
<components:verification_validation />
</mx:AddChild>
</mx:State>
<!-- End of Preserve Menu States -->
</mx:states>
<!-- Button controls to open the menus. -->
<mx:Panel width="98%" height="90%" layout="vertical" verticalAlign="top"
horizontalAlign="center" id="pnl_main" fontSize="15" color="#000709">
</mx:Panel>
</mx:Application>