Skip to content
Browse files

c

  • Loading branch information...
2 parents 1bcc2c3 + 9f46af3 commit 88d8599cb888c6610024a66ee61c7d605a82cbd8 @f-marais committed Aug 22, 2012
View
1 mojo/lib/STM.pm
@@ -5,7 +5,6 @@ use Schema;
use X_Db;
has schema => sub {
- # return Schema->connect('dbi:SQLite:' . ($ENV{TEST_DB} || 'test.db'));
return Schema->connect ( sub {X_Db::connect('MIS') });
};
View
14 mojo/templates/emdet.html.ep
@@ -0,0 +1,14 @@
+% title 'STM Details:' . param('em');
+% my $rs;
+% $rs = $self->app->schema->resultset('EntityMaster')->search(
+% { 'me.name' => param('em'), 'me.max_version' => 1 },
+% {columns => [qw(author rel_notes version )]});
+% my $row=$rs->next;
+<br><table class="Grid">
+<tr><th class="th" FILTER=ALL align=left>Attribute</th>
+<th class="th" FILTER=ALL align=left>Value</th></tr>
+<tr><td>Author</td><td><%= $row->author %></td></tr>
+<tr><td>Changes</td><td><%= $row->rel_notes %></td></tr>
+<tr><td>Version</td><td><%= $row->version %></td></tr>
+</table>
+<br>
View
3 mojo/templates/entdet.html.ep
@@ -2,7 +2,8 @@
% my $rs;
% $rs = $self->app->schema->resultset('Entity')->search(
% { 'me.name' => param('ent'),
-% 'em.name' => param('em') },{
+% 'em.name' => param('em'),
+% 'em.max_version' => 1 },{
% join=> 'em',
% columns => [qw(scope type description )]});
% my $row=$rs->next;
View
2 mojo/templates/lobby/login.html.ep
@@ -5,7 +5,7 @@
<table width='20%'><tr><td>Username:</td><td>
%= text_field 'userid'
</td></tr><tr><td>Password:</td><td>
-%= text_field 'password'
+%= password_field 'password'
</td></tr></table><br>
%= submit_button 'Login'
</td><td> </td></tr></table>
View
25 mojo/templates/search.html.ep
@@ -37,12 +37,10 @@
% }
% }
% if ($row->tgt_itm_nm =~/$match/i) {
-% $itm{$em->name}{$row->tgt_itm_nm}=
-% {ent=>$row->tgt_ent_nm,tgt=>1};
+% $itm{$em->name}{$row->tgt_itm_nm}{$row->tgt_ent_nm}{tgt}=1;
% }
% if ($row->src_itm_nm =~/$match/i) {
-% $itm{$em->name}{$row->src_itm_nm}=
-% {ent=>$row->src_ent_nm,src=>1};
+% $itm{$em->name}{$row->src_itm_nm}{$row->src_ent_nm}{src}=1;
% }
%# if ($row->bus_rule =~/$match/ims) {
%# $itm{$em->name}{$row->bus_rule}
@@ -56,7 +54,8 @@
% }
<H3>Entities</H3>
% for my $em_nm (sort keys %ent) {
-<H3><%= $em_nm %></H3> <table><tr>
+<H3><a href=<%== url_for('/emdet?em=' . $em_nm) %> ><%= $em_nm %>
+</a></H3> <table><tr>
<th class="th" FILTER=ALL align=left> Entity </th>
<th class="th" FILTER=ALL align=left> Type </th>
<th class="th" FILTER=ALL align=left> </th>
@@ -78,19 +77,21 @@ Attributes</a></td></tr>
<H3>Items</H3>
% for my $em_nm (sort keys %itm) {
<H3><%= $em_nm %></H3> <table><tr>
-<th class="th" FILTER=ALL align=left> Entity </th>
<th class="th" FILTER=ALL align=left> Item </th>
+<th class="th" FILTER=ALL align=left> Entity </th>
<th class="th" FILTER=ALL align=left> </th>
<th class="th" FILTER=ALL align=left> </th></tr>
% for my $itm_nm (sort keys %{$itm{$em_nm}}){
-% my $itm_att=$itm{$em_nm}{$itm_nm};
-<tr><td><%= $itm_att->{ent} %></td><td><%= $itm_nm %></td>
-<td><%== $itm_att->{tgt} ? '<a href=' . url_for('/stmlist?em='
- . $em_nm . '&tgt=' . $itm_att->{ent}) . '>Target</a>' : '' %></td>
-<td><%== $itm_att->{src} ? '<a href=' . url_for('/stmlist?em='
- . $em_nm . '&src=' . $itm_att->{ent}) . '>Source</a>' : '' %></td>
+% for my $ent_nm (sort keys %{$itm{$em_nm}{$itm_nm}}){
+% my $itm_att=$itm{$em_nm}{$itm_nm}{$ent_nm};
+<tr><td><%= $itm_nm %></td><td><%= $ent_nm %></td>
+<td><%== exists $itm_att->{tgt} ? '<a href=' . url_for('/stmlist?em='
+ . $em_nm . '&tgt=' . $ent_nm) . '>Target</a>' : '' %></td>
+<td><%== exists $itm_att->{src} ? '<a href=' . url_for('/stmlist?em='
+ . $em_nm . '&src=' . $ent_nm) . '>Source</a>' : '' %></td>
</tr>
% }
+% }
</table>
% }
% }
View
5 mojo/templates/stmlist.html.ep
@@ -5,6 +5,9 @@
% src_itm_type src_itm_precision src_ent_nm deflt) ];
<H3> <%= (param('tgt') ? 'Target:' . param('tgt')
: ' ') . (param('src') ? 'Source:' . param('src') : ' ') %></H3>
+<a href= <%== url_for('/entdet?em=' . param('em')
+ . '&ent=' . (param('tgt') || param('src'))) %> >
+Attributes</a>
% if (param('src')) {
<br><%= param('src') %><a href=<%= $self->url_for('/stmlist?em='
. param('em') . '&tgt=' . param('src')) %>> as Target</a>
@@ -24,6 +27,6 @@ url => {tgt_ent_nm => '/stmlist?em=' . param('em') . '&tgt=tgt_ent_nm'} %>
% { 'tgt_ent_nm' => param('tgt'), 'em_nm' => param('em') },
% {columns=> $cols, order_by => 'seq',distinct => 1});
<%= include 'showrs', partial => 1, rs=> $rs, chk_blanks => 5 ,
- url => {src_ent_nm => '/stmlist?em=' . param('em') . '&src=src_ent_nm'} %>
+ url => {src_ent_nm => '/stmlist?em=' . param('em') . '&tgt=src_ent_nm'} %>
% }
<br>
View
8 script/parsexcel.pl
@@ -371,6 +371,14 @@ =head1 Items per entity master
where a.et_id=b.et_id and b.name like '%MI_STB_REWARD_ALLOCATION_T%'
order by a.seq;
+SELECT me.scope, me.type, me.description
+FROM entity me JOIN entity_master em ON em.em_id = me.em_id
+WHERE ( ( em.name = 'SMART Rewards'
+AND me.name = 'IDMI01.MI_STB_REWARD_ACCT_PURCH_T' ) );
+
+select * from entity
+where name like '%BASE_ACCT_T%';
+
SELECT me.em_id, me.name, me.rel_notes, me.author, me.uploaded, me.version
FROM entity_master me
WHERE version = (

0 comments on commit 88d8599

Please sign in to comment.
Something went wrong with that request. Please try again.