Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
bcd1a7ba
Commit
bcd1a7ba
authored
Nov 25, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: no longer call getConfigurationDict
parent
25014caf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
33 deletions
+49
-33
dream/platform/src/dream/index.js
dream/platform/src/dream/index.js
+49
-33
No files found.
dream/platform/src/dream/index.js
View file @
bcd1a7ba
...
@@ -37,56 +37,62 @@
...
@@ -37,56 +37,62 @@
"
view_wip_part_spreadsheet
"
:
{
"
view_wip_part_spreadsheet
"
:
{
"
gadget
"
:
"
Input_viewWipPartSpreadsheet
"
,
"
gadget
"
:
"
Input_viewWipPartSpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
WIP Part Spreadsheet
"
,
"
title
"
:
"
WIP Part Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.wip_part_spreadsheet);
.gui.wip_part_spreadsheet);
}
}
*/
},
},
"
view_shift_spreadsheet
"
:
{
"
view_shift_spreadsheet
"
:
{
"
gadget
"
:
"
Input_viewShiftSpreadsheet
"
,
"
gadget
"
:
"
Input_viewShiftSpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Shift Spreadsheet
"
,
"
title
"
:
"
Shift Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.shift_spreadsheet);
.gui.shift_spreadsheet);
}
}
*/
},
},
"
view_available_capacity_spreadsheet
"
:
{
"
view_available_capacity_spreadsheet
"
:
{
"
gadget
"
:
"
Input_viewAvailableCapacitySpreadsheet
"
,
"
gadget
"
:
"
Input_viewAvailableCapacitySpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Available Capacity Spreadsheet
"
,
"
title
"
:
"
Available Capacity Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.capacity_by_project_spreadsheet);
.gui.capacity_by_project_spreadsheet);
}
}
*/
},
},
"
view_required_capacity_spreadsheet
"
:
{
"
view_required_capacity_spreadsheet
"
:
{
"
gadget
"
:
"
Input_viewRequiredCapacitySpreadsheet
"
,
"
gadget
"
:
"
Input_viewRequiredCapacitySpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Required Capacity Spreadsheet
"
,
"
title
"
:
"
Required Capacity Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.capacity_by_station_spreadsheet);
.gui.capacity_by_station_spreadsheet);
}
}
*/
},
},
"
view_dp_capacity_spreadsheet
"
:
{
"
view_dp_capacity_spreadsheet
"
:
{
"
gadget
"
:
"
Input_viewDemandPlanningCapacitySpreadsheet
"
,
"
gadget
"
:
"
Input_viewDemandPlanningCapacitySpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Demand Planning Required Capacity Spreadsheet
"
,
"
title
"
:
"
Demand Planning Required Capacity Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.dp_capacity_spreadsheet);
.gui.dp_capacity_spreadsheet);
}
}
*/
},
},
"
view_dp_route_spreadsheet
"
:
{
"
view_dp_route_spreadsheet
"
:
{
"
gadget
"
:
"
Input_viewDemandPlanningRouteSpreadsheet
"
,
"
gadget
"
:
"
Input_viewDemandPlanningRouteSpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Demand Planning Route Spreadsheet
"
,
"
title
"
:
"
Demand Planning Route Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.dp_route_spreadsheet);
.gui.dp_route_spreadsheet);
}
}
*/
},
},
"
view_simu
"
:
{
"
view_simu
"
:
{
"
gadget
"
:
"
Input_viewSimulation
"
,
"
gadget
"
:
"
Input_viewSimulation
"
,
...
@@ -108,74 +114,82 @@
...
@@ -108,74 +114,82 @@
"
view
"
:
{
"
view
"
:
{
"
gadget
"
:
"
Output_viewStationUtilisationGraph
"
,
"
gadget
"
:
"
Output_viewStationUtilisationGraph
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Stations Utilization
"
,
"
title
"
:
"
Stations Utilization
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.station_utilisation_graph);
.gui.station_utilisation_graph);
}
}
*/
},
},
"
download_excel_spreadsheet
"
:
{
"
download_excel_spreadsheet
"
:
{
"
gadget
"
:
"
Output_viewDownloadExcelSpreadsheet
"
,
"
gadget
"
:
"
Output_viewDownloadExcelSpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Download Excel Spreadsheet
"
,
"
title
"
:
"
Download Excel Spreadsheet
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.download_excel_spreadsheet);
.gui.download_excel_spreadsheet);
}
}
*/
},
},
"
view_capacity_utilization
"
:
{
"
view_capacity_utilization
"
:
{
"
gadget
"
:
"
Output_viewCapacityUtilisationGraph
"
,
"
gadget
"
:
"
Output_viewCapacityUtilisationGraph
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Capacity Utilization
"
,
"
title
"
:
"
Capacity Utilization
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.capacity_utilisation_graph);
.gui.capacity_utilisation_graph);
}
}
*/
},
},
"
view_queue_stat
"
:
{
"
view_queue_stat
"
:
{
"
gadget
"
:
"
Output_viewQueueStatGraph
"
,
"
gadget
"
:
"
Output_viewQueueStatGraph
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Queues Statistics
"
,
"
title
"
:
"
Queues Statistics
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.queue_stat);
.gui.queue_stat);
}
}
*/
},
},
"
view_exit_stat
"
:
{
"
view_exit_stat
"
:
{
"
gadget
"
:
"
Output_viewExitStatistics
"
,
"
gadget
"
:
"
Output_viewExitStatistics
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Exit Statistics
"
,
"
title
"
:
"
Exit Statistics
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.exit_stat);
.gui.exit_stat);
}
}
*/
},
},
"
view_gantt
"
:
{
"
view_gantt
"
:
{
"
gadget
"
:
"
Output_viewJobGantt
"
,
"
gadget
"
:
"
Output_viewJobGantt
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Job Gantt
"
,
"
title
"
:
"
Job Gantt
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.job_gantt);
.gui.job_gantt);
}
}
*/
},
},
"
view_schedule
"
:
{
"
view_schedule
"
:
{
"
gadget
"
:
"
Output_viewJobScheduleSpreadsheet
"
,
"
gadget
"
:
"
Output_viewJobScheduleSpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Job Schedule
"
,
"
title
"
:
"
Job Schedule
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.job_schedule_spreadsheet);
.gui.job_schedule_spreadsheet);
}
}
*/
},
},
"
view_debug
"
:
{
"
view_debug
"
:
{
"
gadget
"
:
"
Output_viewDebugJson
"
,
"
gadget
"
:
"
Output_viewDebugJson
"
,
"
type
"
:
"
object_view
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Debug JSON
"
,
"
title
"
:
"
Debug JSON
"
/*
,
"condition": function (gadget) {
"condition": function (gadget) {
return (gadget.props.configuration_dict['Dream-Configuration']
return (gadget.props.configuration_dict['Dream-Configuration']
.gui.debug_json);
.gui.debug_json);
}
}
*/
}
}
}
}
},
},
...
@@ -407,9 +421,6 @@
...
@@ -407,9 +421,6 @@
result
:
param_list
[
1
]
result
:
param_list
[
1
]
});
});
})
})
.
allowPublicAcquisition
(
"
getConfigurationDict
"
,
function
()
{
return
this
.
props
.
configuration_dict
;
})
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// ready
// ready
...
@@ -456,28 +467,17 @@
...
@@ -456,28 +467,17 @@
})
})
// Configure jIO to use localstorage
// Configure jIO to use localstorage
// And load configuration from server
.
ready
(
function
(
g
)
{
.
ready
(
function
(
g
)
{
var
jio_gadget
;
return
g
.
getDeclaredGadget
(
"
jio
"
)
return
g
.
getDeclaredGadget
(
"
jio
"
)
.
push
(
function
(
gadget
)
{
.
push
(
function
(
gadget
)
{
jio_gadget
=
gadget
;
return
gadget
.
createJio
({
return
jio_gadget
.
createJio
({
type
:
"
local
"
,
type
:
"
local
"
,
username
:
"
dream
"
,
username
:
"
dream
"
,
applicationname
:
"
dream
"
applicationname
:
"
dream
"
});
});
})
.
push
(
function
()
{
// XXX Hardcoded relative URL
return
jio_gadget
.
ajax
({
url
:
"
../../getConfigurationDict
"
});
})
.
push
(
function
(
evt
)
{
g
.
props
.
configuration_dict
=
JSON
.
parse
(
evt
.
target
.
responseText
);
});
});
})
})
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
@@ -510,10 +510,26 @@
...
@@ -510,10 +510,26 @@
}
}
}
}
return
gadget
.
getDeclaredGadget
(
"
jio
"
)
.
push
(
function
(
jio_gadget
)
{
if
(
options
.
id
)
{
return
jio_gadget
.
getAttachment
({
"
_id
"
:
options
.
id
,
"
_attachment
"
:
"
body.json
"
});
}
})
.
push
(
function
(
result
)
{
gadget
.
props
.
data
=
result
?
JSON
.
parse
(
result
)
:
{};
// TODO
window
.
console
.
log
(
"
We got this data
"
,
gadget
.
props
.
data
,
"
we can now set portal_types
"
);
// Get the action information
// Get the action information
return
gadget
.
declareGadget
(
return
gadget
.
declareGadget
(
portal_types
[
portal_type
][
options
.
action
].
gadget
+
"
.html
"
portal_types
[
portal_type
][
options
.
action
].
gadget
+
"
.html
"
)
);
})
.
push
(
function
(
g
)
{
.
push
(
function
(
g
)
{
page_gadget
=
g
;
page_gadget
=
g
;
if
(
page_gadget
.
render
!==
undefined
)
{
if
(
page_gadget
.
render
!==
undefined
)
{
...
...
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