Permalink
Browse files

Merge branch '4.1' of https://github.com/Southpaw-TACTIC/TACTIC into 4.1

Conflicts:
	VERSION
	src/client/tactic_client_lib/VERSION
	src/client/tactic_client_lib/tactic.zip
	src/context/VERSION
	src/context/client/tactic.zip
	src/pyasm/application/common/interpreter/tactic_client_lib/VERSION
  • Loading branch information...
2 parents a7969b0 + 26005c5 commit 035af4364c8b50ad2f6a3220b588f5fd2fd37a5a @remkonoteboom remkonoteboom committed Jan 12, 2014
View
2 VERSION
@@ -1 +1 @@
-4.2.0.a01
+4.2.0.a01
View
2 src/client/tactic_client_lib/VERSION
@@ -1 +1 @@
-4.2.0.a01
+4.2.0.a01
View
2 src/client/tactic_client_lib/VERSION_API
@@ -1 +1 @@
-4.0.api04
+4.0.api05
View
17 src/client/tactic_client_lib/tactic_server_stub.py
@@ -2635,6 +2635,7 @@ def get_all_dependencies(my, snapshot_code, mode='explicit', type='ref', include
#
def create_task(my, search_key, process="publish", subcontext=None, description=None, bid_start_date=None, bid_end_date=None, bid_duration=None, assigned=None):
'''API Function: create_task(search_key, process="publish", subcontext=None, description=None, bid_start_date=None, bid_end_date=None, bid_duration=None, assigned=None)
+
Create a task for a particular sobject
@param:
@@ -2651,7 +2652,7 @@ def create_task(my, search_key, process="publish", subcontext=None, description=
assigned - the user assigned to this task
@return:
- dictionary - task that was created
+ dictionary - task created
'''
return my.server.create_task(my.ticket, search_key, process, subcontext, description, bid_start_date, bid_end_date, bid_duration, assigned)
@@ -2679,11 +2680,12 @@ def add_initial_tasks(my, search_key, pipeline_code=None, processes=[]):
def get_input_tasks(my, search_key):
- '''This methods gets the input tasks of a task based on the pipeline
+ '''API Function: get_input_tasks(search_key)
+
+ Get the input tasks of a task based on the pipeline
associated with the sobject parent of the task
@param:
- ticket - authentication ticket
search_key - the key identifying an sobject as registered in
the search_type table.
@@ -2695,11 +2697,12 @@ def get_input_tasks(my, search_key):
def get_output_tasks(my, search_key):
- '''This methods gets the output tasks of a task based on the pipeline
+ '''API Function: get_output_tasks(search_key)
+
+ Get the output tasks of a task based on the pipeline
associated with the sobject parent of the task
@param:
- ticket - authentication ticket
search_key - the key identifying an sobject as registered in
the search_type table.
@@ -2715,7 +2718,9 @@ def get_output_tasks(my, search_key):
# Note methods
#
def create_note(my, search_key, note, process="publish", subcontext=None, user=None):
- '''Add a task for a particular sobject
+ ''''API Function: create_note(search_key, note, process="publish", subcontext=None, user=None)
+
+ Add a note for a particular sobject
@params:
search_key - the key identifying a type of sobject as registered in
View
8 src/config2/search_type/widget/sthpw/note-conf.xml
@@ -108,6 +108,14 @@
<element name="project_code" width="100px"/>
</add_item>
+<simple_filter>
+ <element name='keyword' title=''>
+ <display class='tactic.ui.filter.KeywordFilterElementWdg'>
+ <mode>keyword</mode>
+ <column>process|note</column>
+ </display>
+ </element>
+</simple_filter>
</config>
View
2 src/context/VERSION
@@ -1 +1 @@
-4.2.0.a01
+4.2.0.a01
View
2 src/context/VERSION_API
@@ -1 +1 @@
-4.0.api04
+4.0.api05
View
BIN ...xt/client/tactic-api-python-4.0.api03.zip → ...xt/client/tactic-api-python-4.0.api05.zip
Binary file not shown.
View
8 src/context/spt_js/client_api.js
@@ -1034,14 +1034,6 @@ TacticServerStub = function() {
}
- /*
- * Task methods
- */
- this.create_task = function(search_key, kwargs) {
- return this._delegate("create_task", arguments, kwargs);
- }
-
-
/*
* Note methods
View
2 src/pyasm/application/common/interpreter/tactic_client_lib/VERSION
@@ -1 +1 @@
-4.2.0.a01
+4.2.0.a01
View
2 src/pyasm/application/common/interpreter/tactic_client_lib/VERSION_API
@@ -1 +1 @@
-4.0.api04
+4.0.api05
View
4 src/pyasm/prod/service/api_xmlrpc.py
@@ -4148,7 +4148,7 @@ def add_initial_tasks(my, ticket, search_key, pipeline_code=None, processes=[]):
@xmlrpc_decorator
def get_input_tasks(my, ticket, search_key):
- '''This methods gets the input tasks of a task based on the pipeline
+ '''Get the input tasks of a task based on the pipeline
associated with the sobject parent of the task
ticket - authentication ticket
@@ -4182,7 +4182,7 @@ def get_input_tasks(my, ticket, search_key):
@xmlrpc_decorator
def get_output_tasks(my, ticket, search_key):
- '''This methods gets the output tasks of a task based on the pipeline
+ '''Get the output tasks of a task based on the pipeline
associated with the sobject parent of the task
ticket - authentication ticket
View
22 src/tactic/active_directory/ad_authenticate.py
@@ -88,10 +88,14 @@ def verify(my, login_name, password):
def get_user_mapping(my):
'''returns a dictionary of the mappings between AD attributes to
login table attributes'''
+ # NOTE: ensure this syncs up with the map in get_user_info()
+ # in ad_get_user_info.py
attrs_map = {
'dn': 'dn',
'displayName': 'display_name',
'name': 'name',
+ 'sn': 'last_name',
+ 'givenName': 'first_name',
'mail': 'email',
'telephoneNumber': 'phone_number',
'department': 'department',
@@ -180,13 +184,17 @@ def add_user_info(my, login, password):
# split up display name into first and last name
display_name = data.get('display_name')
- try:
- first_name, last_name = display_name.split(' ', 1)
- first_name = first_name.replace(",","")
- last_name = last_name.replace(",", "")
- except:
- first_name = display_name
- last_name = ''
+ if data.get('first_name') and data.get('last_name'):
+ first_name = data.get('first_name')
+ last_name = data.get('last_name')
+ else:
+ try:
+ first_name, last_name = display_name.split(' ', 1)
+ first_name = first_name.replace(",","")
+ last_name = last_name.replace(",", "")
+ except:
+ first_name = display_name
+ last_name = ''
# alter so that it works for now
data = {
View
14 src/tactic/active_directory/ad_get_user_info.py
@@ -46,6 +46,8 @@ def get_user_info(user_name, domain=None):
print "WARNING: user [%s] cannot be found" % user_name
return {}
+ # turn the most likely single-item generator back to a list
+ user = list(user)[0]
# TODO: need to find a way to get all properties
#print "properties: ", user.properties
@@ -54,8 +56,10 @@ def get_user_info(user_name, domain=None):
attrs_map = {
'dn': 'dn',
- 'displayName': 'first_name',
+ 'displayName': 'display_name',
'name': 'name',
+ 'sn': 'last_name',
+ 'givenName': 'first_name',
'mail': 'email',
'telephoneNumber': 'phone_number',
'department': 'department',
@@ -68,12 +72,12 @@ def get_user_info(user_name, domain=None):
data = []
for key in attrs_map.keys():
- try:
- value = eval("user.%s" % key)
- data.append("%s: %s" % (key, value))
+ try:
+ value = eval("user.%s" % key)
+ data.append("%s: %s" % (key, value))
except AttributeError:
#print "Attribute [%s] does not exist" % key
- pass
+ pass
if hasattr(user,'memberOf'):
for memberOf in user.memberOf:
memberOf = str(memberOf).replace("LDAP://", "")
View
3 src/tactic/ui/app/page_header_wdg.py
@@ -278,7 +278,8 @@ def get_smart_menu(cls):
'cbjs_action': '''
var ok = function(){
var server = TacticServerStub.get();
- server.execute_cmd("SignOutCmd", {login: bvr.login} );
+ var login = spt.Environment.get().get_user();
+ server.execute_cmd("SignOutCmd", {login: login} );
//var href = document.location.href;
//var parts = href.split("#");
//window.location.href=parts[0];
View
1 src/tactic/ui/config/DEFAULT-conf.xml
@@ -318,6 +318,7 @@
<display class="LinkWdg">
<class_name>tactic.ui.panel.ViewPanelWdg</class_name>
<search_type>sthpw/note</search_type>
+ <simple_search_view>simple_filter</simple_search_view>
<view>table</view>
<filter>
[
View
21 src/tactic/ui/input/html5_upload_wdg.py
@@ -68,6 +68,7 @@ def get_display(my):
if not Container.get_dict("JSLibraries", "spt_html5upload"):
form.add_behavior( {
'type': 'load',
+ 'form_id': my.form_id,
'cbjs_action': '''
if (spt.html5upload)
@@ -76,7 +77,7 @@ def get_display(my):
spt.Environment.get().add_library("spt_html5upload")
spt.html5upload = {};
-spt.html5upload.form = null;
+spt.html5upload.form = $(bvr.form_id);
spt.html5upload.files = [];
spt.html5upload.events = {};
@@ -137,21 +138,25 @@ def get_display(my):
alert('remove')
}
*/
+
+ var event_name = 'select_file';
// ensure this listener is only added once
- if (!spt.html5upload.events['select_file']){
+ if (!spt.html5upload.events[event_name]){
+
el.addEventListener("change", onchange, true);
}
// This is necessary for Qt on a Mac??
if (spt.browser.is_Qt() || spt.browser.is_Safari()) {
setTimeout( function() {
el.click();
- spt.html5upload.events['select_file'] = onchange;
+ spt.html5upload.events[event_name] = onchange;
}, 100 );
}
else {
+
el.click();
- spt.html5upload.events['select_file'] = onchange;
+ spt.html5upload.events[event_name] = onchange;
}
// FIXME: this is not very useful as the select file is async, but
@@ -170,7 +175,9 @@ def get_display(my):
var new_element = el.cloneNode(true);
el.parentNode.replaceChild(new_element, el);
- spt.html5upload.events['select_file'] = null;
+ var event_name = 'select_file';
+
+ spt.html5upload.events[event_name] = null;
}
@@ -380,7 +387,9 @@ def get_display(my):
var search_key = bvr.search_key;
// set the form
- spt.html5upload.set_form( $(bvr.upload_id) );
+ if (!spt.html5upload.form) {
+ spt.html5upload.set_form( $(bvr.upload_id) );
+ }
spt.html5upload.clear();
spt.html5upload.kwargs = bvr.kwargs;
View
10 src/tactic/ui/panel/base_table_layout_wdg.py
@@ -11,7 +11,7 @@
#
__all__ = ["BaseTableLayoutWdg"]
-from pyasm.common import Common, Environment, jsondumps, jsonloads, TacticException
+from pyasm.common import Common, Environment, jsondumps, jsonloads, Container, TacticException
from pyasm.search import SearchType, Search, SqlException, SearchKey, SObject
from pyasm.web import WebContainer, Table, DivWdg, SpanWdg, Widget
from pyasm.widget import WidgetConfig, WidgetConfigView, IconWdg, IconButtonWdg, HiddenWdg
@@ -2314,7 +2314,10 @@ def get_data_row_smart_context_menu_details(my):
context = "icon";
// set the form
- spt.html5upload.set_form( $(bvr.upload_id) );
+
+ if (!spt.html5upload.form) {
+ spt.html5upload.set_form( $(bvr.upload_id) );
+ }
spt.html5upload.clear();
var server = TacticServerStub.get();
@@ -2422,6 +2425,9 @@ def get_data_row_smart_context_menu_details(my):
}
bvr_cb["description"] = "Checking in preview ..."
+ # set a dummy
+ if Container.get_dict("JSLibraries", "spt_html5upload"):
+ my.upload_id = '0'
bvr_cb["upload_id"] = my.upload_id
spec_list.append( {
"type": "action",
View
34 src/tactic/ui/panel/table_layout_wdg.py
@@ -475,17 +475,19 @@ def get_display(my):
# can key on this
inner.add_attr("spt_version", "2")
- # add an upload_wdg
- from tactic.ui.input import Html5UploadWdg
- upload_wdg = Html5UploadWdg()
- inner.add(upload_wdg)
- my.upload_id = upload_wdg.get_upload_id()
- inner.add_attr('upload_id',my.upload_id)
if my.kwargs.get('temp') != True:
+ if not Container.get_dict("JSLibraries", "spt_html5upload"):
+ # add an upload_wdg
+ from tactic.ui.input import Html5UploadWdg
+ upload_wdg = Html5UploadWdg()
+ inner.add(upload_wdg)
+ my.upload_id = upload_wdg.get_upload_id()
+ inner.add_attr('upload_id',my.upload_id)
+
# get all client triggers
exp = "@SOBJECT(config/client_trigger['event','EQ','%s$'])" %my.search_type
client_triggers = Search.eval(exp)
@@ -571,13 +573,12 @@ def get_display(my):
- is_refresh = my.kwargs.get("is_refresh")
+ #is_refresh = my.kwargs.get("is_refresh")
if my.kwargs.get("show_shelf") not in ['false', False]:
# draws the row of buttons to insert and refresh
action = my.get_action_wdg()
inner.add(action)
-
# get all the edit widgets
if my.view_editable and my.edit_permission:
my.edit_wdgs = my.get_edit_wdgs()
@@ -661,12 +662,16 @@ def get_display(my):
else:
show_context_menu = True
- menus_in = {}
- if show_context_menu:
- menus_in['DG_HEADER_CTX'] = [ my.get_smart_header_context_menu_data() ]
- menus_in['DG_DROW_SMENU_CTX'] = [ my.get_data_row_smart_context_menu_details() ]
- if menus_in:
- SmartMenu.attach_smart_context_menu( inner, menus_in, False )
+
+ temp = my.kwargs.get("temp")
+
+ if temp != True:
+ menus_in = {}
+ if show_context_menu:
+ menus_in['DG_HEADER_CTX'] = [ my.get_smart_header_context_menu_data() ]
+ menus_in['DG_DROW_SMENU_CTX'] = [ my.get_data_row_smart_context_menu_details() ]
+ if menus_in:
+ SmartMenu.attach_smart_context_menu( inner, menus_in, False )
for widget in my.widgets:
@@ -684,7 +689,6 @@ def get_display(my):
my.handle_table_behaviors(table)
- temp = my.kwargs.get("temp")
# draw 4 (even) rows initially by default
has_loading = False
View
7 src/tactic/ui/tools/ingest_wdg.py
@@ -10,7 +10,7 @@
#
#
-from pyasm.common import Environment, jsonloads, jsondumps
+from pyasm.common import Environment, jsonloads, jsondumps, TacticException
from pyasm.web import DivWdg, Table
from pyasm.widget import IconWdg, TextWdg, CheckboxWdg, RadioWdg, TextAreaWdg, HiddenWdg
from pyasm.command import Command
@@ -903,7 +903,10 @@ def execute(my):
upload_dir = Environment.get_upload_dir()
-
+
+ if not SearchType.column_exists(search_type, "name"):
+ raise TacticException('The Ingestion puts the file name into the name column which is the minimal requirement. Please first create a "name" column for this sType.')
+
for count, filename in enumerate(filenames):
# first see if this sobjects still exists

0 comments on commit 035af43

Please sign in to comment.