Commit 2a197bf4310e311e27e4fc571fb5d862a41b4683
Exists in
master
Merge branch 'master' of https://github.com/lightbase/WSCacicNeo
Conflicts: wscacicneo/static/cadastro.js wscacicneo/static/computador.js wscacicneo/static/orgao.js wscacicneo/static/relatorio.js wscacicneo/static/sistema.js wscacicneo/views.py
Showing
41 changed files
with
1087 additions
and
139 deletions
Show diff stats
wscacicneo/__init__.py
1 | 1 | from pyramid.config import Configurator |
2 | 2 | |
3 | 3 | |
4 | + | |
4 | 5 | def main(global_config, **settings): |
5 | 6 | """ This function returns a Pyramid WSGI application. |
6 | 7 | """ |
... | ... | @@ -35,5 +36,17 @@ def main(global_config, **settings): |
35 | 36 | config.add_route('cadastro', 'cadastro') |
36 | 37 | config.add_route('sobre', 'sobre') |
37 | 38 | config.add_route('perfil', 'perfil') |
39 | + config.add_route('configapi','configapi') | |
40 | + config.add_route('editarorgao','editarorgao') | |
41 | + config.add_route('notify','notify') | |
42 | + config.add_route('processador','processador') | |
43 | + config.add_route('configcoleta','configcoleta') | |
44 | + config.add_route('configfav','configfav') | |
45 | + config.add_route('reportsgestor','reportsgestor') | |
46 | + config.add_route('questionarcoleta','questionarcoleta') | |
47 | + config.add_route('confighome','confighome') | |
48 | + config.add_route('db','db') | |
38 | 49 | config.scan() |
39 | 50 | return config.make_wsgi_app() |
51 | + | |
52 | + | ... | ... |
wscacicneo/static/admin.js
wscacicneo/static/basico.js
... | ... | @@ -11,25 +11,20 @@ var table = Ext.create('Ext.form.Panel', { |
11 | 11 | defaultType: 'textfield', |
12 | 12 | items: [ |
13 | 13 | { |
14 | - fieldLabel: 'Quantidade', | |
15 | - width:450, | |
16 | - name: 'nome' | |
17 | - }, | |
18 | - { | |
19 | - fieldLabel: 'Data', | |
20 | - width: 250, | |
14 | + fieldLabel: 'Nome', | |
15 | + width: 350, | |
21 | 16 | name: 'matricula' |
22 | 17 | }, |
23 | 18 | { |
24 | - fieldLabel: 'Nome', | |
25 | - width: 300, | |
19 | + fieldLabel: 'Data da instalação', | |
20 | + width: 200, | |
26 | 21 | name: 'email' |
27 | 22 | }, |
28 | 23 | { |
29 | 24 | xtype: 'button', |
30 | 25 | text: 'Enviar', |
31 | 26 | style : { |
32 | - margin : " 0px 10px 0px 0px" | |
27 | + margin : " 0px 10px 0px 330px" | |
33 | 28 | } |
34 | 29 | }, |
35 | 30 | { |
... | ... | @@ -41,7 +36,7 @@ var table = Ext.create('Ext.form.Panel', { |
41 | 36 | |
42 | 37 | painel = Ext.create('Ext.panel.Panel', { |
43 | 38 | layout: 'fit', |
44 | - title: 'Básicos', | |
39 | + title: 'Software Básico', | |
45 | 40 | width: '75%', |
46 | 41 | height: 200, |
47 | 42 | frame: true, | ... | ... |
wscacicneo/static/cadastro.js
... | ... | @@ -42,12 +42,15 @@ var table = Ext.create('Ext.form.Panel', { |
42 | 42 | boxLabel: 'Orgão' |
43 | 43 | }, |
44 | 44 | { |
45 | - fieldLabel: 'Unidade', | |
45 | + xtype:'combobox', | |
46 | + fieldLabel: 'Cargo', | |
46 | 47 | width:450, |
47 | 48 | name: 'cargo' |
48 | 49 | }, |
49 | 50 | { |
50 | 51 | fieldLabel: 'Telefone', |
52 | + xtype:'combobox', | |
53 | + fieldLabel: 'Setor', | |
51 | 54 | width:450, |
52 | 55 | name: 'setor' |
53 | 56 | }, | ... | ... |
wscacicneo/static/computador.js
... | ... | @@ -11,20 +11,26 @@ var table = Ext.create('Ext.form.Panel', { |
11 | 11 | defaultType: 'textfield', |
12 | 12 | items: [ |
13 | 13 | { |
14 | - fieldLabel: 'Patrimonio', | |
14 | + fieldLabel: 'Nº Patrimônio', | |
15 | 15 | width:300, |
16 | 16 | name: 'nome' |
17 | 17 | }, |
18 | 18 | { |
19 | 19 | fieldLabel: 'Fabricante', |
20 | + xtype:'combobox', | |
20 | 21 | width: 300, |
21 | - name: 'matricula' | |
22 | + name: 'tipo' | |
23 | + }, | |
24 | + { | |
25 | + fieldLabel: 'Marca', | |
26 | + width:300, | |
27 | + name: 'marca' | |
22 | 28 | }, |
23 | 29 | { |
24 | 30 | xtype: 'button', |
25 | 31 | text: 'Enviar', |
26 | 32 | style:{ |
27 | - margin: '0px 10px 0px 0px', | |
33 | + margin: '0px 10px 0px 270px', | |
28 | 34 | } |
29 | 35 | }, |
30 | 36 | { | ... | ... |
... | ... | @@ -0,0 +1,66 @@ |
1 | +var table = Ext.create('Ext.form.Panel', { | |
2 | + renderTo: Ext.getBody(), | |
3 | + title: '', | |
4 | + height: 130, | |
5 | + width: 280, | |
6 | + style: { | |
7 | + "text-align": 'left', | |
8 | + }, | |
9 | + | |
10 | + bodyPadding: 10, | |
11 | + defaultType: 'textfield', | |
12 | + items: [ | |
13 | + { | |
14 | + xtype:'combobox', | |
15 | + fieldLabel: 'Fonte', | |
16 | + width:300, | |
17 | + name: 'fonte' | |
18 | + }, | |
19 | + { | |
20 | + xtype:'combobox', | |
21 | + fieldLabel: 'Estilo de cores', | |
22 | + width: 250, | |
23 | + name: 'matricula' | |
24 | + }, | |
25 | + { | |
26 | + xtype: 'button', | |
27 | + text: 'Confirmar', | |
28 | + style:{ | |
29 | + margin: '0px 10px 0px 300px', | |
30 | + } | |
31 | + }, | |
32 | + { | |
33 | + xtype: 'button', | |
34 | + text: 'Cancelar', | |
35 | + }, | |
36 | + | |
37 | + ] | |
38 | +}); | |
39 | + | |
40 | +painel = Ext.create('Ext.panel.Panel', { | |
41 | + layout: 'fit', | |
42 | + title: 'Configuração da Aplicação', | |
43 | + width: '75%', | |
44 | + height: 200, | |
45 | + frame: true, | |
46 | + draggable: true, | |
47 | + collapsible: true, | |
48 | + border : true, | |
49 | + style: { | |
50 | + "text-align": 'center', | |
51 | + margin: '0px auto 15px auto' | |
52 | + }, | |
53 | + items: table, | |
54 | +}); | |
55 | + | |
56 | +Ext.onReady(function(){ | |
57 | + | |
58 | + | |
59 | + Ext.create('Ext.Container', { | |
60 | + padding: '15px', | |
61 | + items: [painel], | |
62 | + renderTo: 'widgets' | |
63 | + }); | |
64 | + | |
65 | +}); | |
66 | + | ... | ... |
... | ... | @@ -0,0 +1,154 @@ |
1 | +// **** FILTRO DE ITENS **** | |
2 | + | |
3 | +Ext.define('User1',{ | |
4 | + extend: 'Ext.data.Model', | |
5 | + fields: ['chbox', 'item' ] | |
6 | +}); | |
7 | + | |
8 | +var userStore1 = Ext.create('Ext.data.Store', { | |
9 | + model: 'User1', | |
10 | + data: [ | |
11 | + { item: 'Computador'}, | |
12 | + { item: 'Processador'}, | |
13 | + { item: 'Memórias'}, | |
14 | + { item: 'Hard Disk (HD)'}, | |
15 | + { item: 'Sistemas Operacionais'}, | |
16 | + { item: 'Suítes de Escritórios'}, | |
17 | + { item: 'Ativos de Redes'}, | |
18 | + { item: 'Softwares Básicos'}, | |
19 | + ] | |
20 | +}); | |
21 | + | |
22 | +table1 = Ext.create('Ext.grid.Panel', { | |
23 | + store: userStore1, | |
24 | + width: 400, | |
25 | + height: 200, | |
26 | + // title: 'Application Users', | |
27 | + columns: [ | |
28 | + { | |
29 | + text: 'Item', | |
30 | + width: 500, | |
31 | + sortable: true, | |
32 | + hideable: false, | |
33 | + dataIndex: 'item' | |
34 | + }, | |
35 | + ] | |
36 | +}); | |
37 | + | |
38 | +tabela1 = Ext.create('Ext.panel.Panel', { | |
39 | + layout: 'fit', | |
40 | + title: 'Campos da Coleta', | |
41 | + width: '75%', | |
42 | + frame: true, | |
43 | + draggable: true, | |
44 | + collapsible: true, | |
45 | + border : true, | |
46 | + style: { | |
47 | + "text-align": 'center', | |
48 | + margin: '0px auto 15px auto' | |
49 | + }, | |
50 | + items: table1, | |
51 | +}); | |
52 | + | |
53 | + | |
54 | + Ext.create('Ext.Container', { | |
55 | + padding:'15px', | |
56 | + items: [tabela1], | |
57 | + renderTo: 'widgets' | |
58 | + }); | |
59 | + | |
60 | + | |
61 | + | |
62 | +//------------------------------------ | |
63 | + | |
64 | + | |
65 | +Ext.define('User2',{ | |
66 | + extend: 'Ext.data.Model', | |
67 | + fields: ['chbox', 'item' ] | |
68 | +}); | |
69 | + | |
70 | +var userStore2 = Ext.create('Ext.data.Store', { | |
71 | + model: 'User2', | |
72 | + data: [ | |
73 | + { item: 'Computador'}, | |
74 | + { item: 'Processador'}, | |
75 | + { item: 'memórias'}, | |
76 | + { item: 'memórias'}, | |
77 | + | |
78 | + ] | |
79 | +}); | |
80 | + | |
81 | +table2 = Ext.create('Ext.grid.Panel', { | |
82 | + store: userStore2, | |
83 | + width: 400, | |
84 | + // title: 'Application Users', | |
85 | + columns: [ | |
86 | + { | |
87 | + text: 'Item', | |
88 | + width: 490, | |
89 | + sortable: true, | |
90 | + hideable: false, | |
91 | + dataIndex: 'item' | |
92 | + }, | |
93 | + ], | |
94 | + bbar:[ | |
95 | + { | |
96 | + xtype: 'button', | |
97 | + text: 'Gerar Relatório', | |
98 | + style:{ | |
99 | + margin: '0px 10px 0px 200px', | |
100 | + } | |
101 | + }, | |
102 | + { | |
103 | + xtype: 'button', | |
104 | + text: 'Limpar Campos', | |
105 | + },{ | |
106 | + xtype: 'button', | |
107 | + text: 'Cancelar', | |
108 | + }, | |
109 | + ] | |
110 | +}); | |
111 | + | |
112 | +tabela2 =Ext.create('Ext.panel.Panel', { | |
113 | + layout: 'fit', | |
114 | + title: 'Campos Selecionados', | |
115 | + width: '75%', | |
116 | + frame: true, | |
117 | + draggable: true, | |
118 | + collapsible: true, | |
119 | + border : true, | |
120 | + style: { | |
121 | + "text-align": 'center', | |
122 | + margin: '0px auto 15px auto' | |
123 | + }, | |
124 | + items: [table2, | |
125 | + { | |
126 | + xtype: 'button', | |
127 | + text: 'Gerar Relatório', | |
128 | + style:{ | |
129 | + margin: '0px 10px 0px 0px', | |
130 | + } | |
131 | + }, | |
132 | + { | |
133 | + xtype: 'button', | |
134 | + text: 'Limpar Campos', | |
135 | + },{ | |
136 | + xtype: 'button', | |
137 | + text: 'Cancelar', | |
138 | + }, | |
139 | +] | |
140 | + | |
141 | +}); | |
142 | + | |
143 | +Ext.onReady(function(){ | |
144 | + | |
145 | + | |
146 | + Ext.create('Ext.Container', { | |
147 | + padding:'15px', | |
148 | + items: [tabela2], | |
149 | + renderTo: 'widgets' | |
150 | + }); | |
151 | + | |
152 | +}); | |
153 | + | |
154 | + | ... | ... |
... | ... | @@ -0,0 +1,130 @@ |
1 | +// **** FILTRO DE ITENS **** | |
2 | + | |
3 | +Ext.define('User1',{ | |
4 | + extend: 'Ext.data.Model', | |
5 | + fields: ['chbox', 'item' ] | |
6 | +}); | |
7 | + | |
8 | +var userStore1 = Ext.create('Ext.data.Store', { | |
9 | + model: 'User1', | |
10 | + data: [ | |
11 | + { item: 'Relatórios'}, | |
12 | + { item: 'Gestão de Orgãos'}, | |
13 | + { item: 'Notificações'}, | |
14 | + { item: 'Meu Perfil'}, | |
15 | + { item: 'Configurar API'}, | |
16 | + ] | |
17 | +}); | |
18 | + | |
19 | +table1 = Ext.create('Ext.grid.Panel', { | |
20 | + store: userStore1, | |
21 | + width: 400, | |
22 | + height: 200, | |
23 | + // title: 'Application Users', | |
24 | + columns: [ | |
25 | + { | |
26 | + text: 'Item', | |
27 | + width: 500, | |
28 | + sortable: true, | |
29 | + hideable: false, | |
30 | + dataIndex: 'item' | |
31 | + }, | |
32 | + ] | |
33 | +}); | |
34 | + | |
35 | +tabela1 = Ext.create('Ext.panel.Panel', { | |
36 | + layout: 'fit', | |
37 | + title: 'Lista de Funcionalidade', | |
38 | + width: '75%', | |
39 | + frame: true, | |
40 | + draggable: true, | |
41 | + collapsible: true, | |
42 | + border : true, | |
43 | + style: { | |
44 | + "text-align": 'center', | |
45 | + margin: '0px auto 15px auto' | |
46 | + }, | |
47 | + items: table1, | |
48 | +}); | |
49 | + | |
50 | + | |
51 | + Ext.create('Ext.Container', { | |
52 | + padding:'15px', | |
53 | + items: [tabela1], | |
54 | + renderTo: 'widgets' | |
55 | + }); | |
56 | + | |
57 | + | |
58 | + | |
59 | +//------------------------------------ | |
60 | + | |
61 | + | |
62 | +Ext.define('User2',{ | |
63 | + extend: 'Ext.data.Model', | |
64 | + fields: ['chbox', 'item' ] | |
65 | +}); | |
66 | + | |
67 | +var userStore2 = Ext.create('Ext.data.Store', { | |
68 | + model: 'User2', | |
69 | + data: [ | |
70 | + { item: 'Relatório'}, | |
71 | + { item: 'Meu Perfil'}, | |
72 | + | |
73 | + ] | |
74 | +}); | |
75 | + | |
76 | +table2 = Ext.create('Ext.grid.Panel', { | |
77 | + store: userStore2, | |
78 | + width: 400, | |
79 | + // title: 'Application Users', | |
80 | + columns: [ | |
81 | + { | |
82 | + text: 'Item', | |
83 | + width: 490, | |
84 | + sortable: true, | |
85 | + hideable: false, | |
86 | + dataIndex: 'item' | |
87 | + }, | |
88 | + ], | |
89 | + bbar:[ | |
90 | + { | |
91 | + xtype: 'button', | |
92 | + text: 'Confirmar', | |
93 | + style:{ | |
94 | + margin: '0px 10px 0px 320px', | |
95 | + } | |
96 | + }, | |
97 | + ,{ | |
98 | + xtype: 'button', | |
99 | + text: 'Cancelar', | |
100 | + }, | |
101 | + ] | |
102 | +}); | |
103 | + | |
104 | +tabela2 =Ext.create('Ext.panel.Panel', { | |
105 | + layout: 'fit', | |
106 | + title: 'Favoritos', | |
107 | + width: '75%', | |
108 | + frame: true, | |
109 | + draggable: true, | |
110 | + collapsible: true, | |
111 | + border : true, | |
112 | + style: { | |
113 | + "text-align": 'center', | |
114 | + margin: '0px auto 15px auto' | |
115 | + }, | |
116 | + items: table2, | |
117 | +}); | |
118 | + | |
119 | +Ext.onReady(function(){ | |
120 | + | |
121 | + | |
122 | + Ext.create('Ext.Container', { | |
123 | + padding:'15px', | |
124 | + items: [tabela2], | |
125 | + renderTo: 'widgets' | |
126 | + }); | |
127 | + | |
128 | +}); | |
129 | + | |
130 | + | ... | ... |
... | ... | @@ -0,0 +1,64 @@ |
1 | +var table = Ext.create('Ext.form.Panel', { | |
2 | + renderTo: Ext.getBody(), | |
3 | + title: '', | |
4 | + height: 130, | |
5 | + width: 280, | |
6 | + style: { | |
7 | + "text-align": 'left', | |
8 | + }, | |
9 | + | |
10 | + bodyPadding: 10, | |
11 | + defaultType: 'textfield', | |
12 | + items: [ | |
13 | + { | |
14 | + fieldLabel: 'Numero de atividades visíveis', | |
15 | + width:200, | |
16 | + name: 'ultimas' | |
17 | + }, | |
18 | + { | |
19 | + fieldLabel: 'Numero da coleta do grafico', | |
20 | + width: 250, | |
21 | + name: 'matricula' | |
22 | + }, | |
23 | + { | |
24 | + xtype: 'button', | |
25 | + text: 'Confirmar', | |
26 | + style:{ | |
27 | + margin: '0px 10px 0px 300px', | |
28 | + } | |
29 | + }, | |
30 | + { | |
31 | + xtype: 'button', | |
32 | + text: 'Cancelar', | |
33 | + }, | |
34 | + | |
35 | + ] | |
36 | +}); | |
37 | + | |
38 | +painel = Ext.create('Ext.panel.Panel', { | |
39 | + layout: 'fit', | |
40 | + title: 'Configurações da Pagina Inicial', | |
41 | + width: '75%', | |
42 | + height: 200, | |
43 | + frame: true, | |
44 | + draggable: true, | |
45 | + collapsible: true, | |
46 | + border : true, | |
47 | + style: { | |
48 | + "text-align": 'center', | |
49 | + margin: '0px auto 15px auto' | |
50 | + }, | |
51 | + items: table, | |
52 | +}); | |
53 | + | |
54 | +Ext.onReady(function(){ | |
55 | + | |
56 | + | |
57 | + Ext.create('Ext.Container', { | |
58 | + padding: '15px', | |
59 | + items: [painel], | |
60 | + renderTo: 'widgets' | |
61 | + }); | |
62 | + | |
63 | +}); | |
64 | + | ... | ... |
wscacicneo/static/dashboard.js
... | ... | @@ -9,7 +9,7 @@ var userStore1 = Ext.create('Ext.data.Store', { |
9 | 9 | model: 'User1', |
10 | 10 | data: [ |
11 | 11 | { item: 'Coletas 1120, 1131, 1149, estão desatualizadas'}, |
12 | - { item: 'Coleta 1123, Incorreta Numero de computadores inconsistente'}, | |
12 | + { item: 'Coleta 1123, Incorreta Número de computadores inconsistente'}, | |
13 | 13 | { item: 'Coleta não efetuada: coleta 1151 está atualizada'}, |
14 | 14 | ] |
15 | 15 | }); | ... | ... |
... | ... | @@ -0,0 +1,68 @@ |
1 | +var table = Ext.create('Ext.form.Panel', { | |
2 | + renderTo: Ext.getBody(), | |
3 | + title: '', | |
4 | + height: 130, | |
5 | + width: 280, | |
6 | + style: { | |
7 | + "text-align": 'left', | |
8 | + }, | |
9 | + | |
10 | + bodyPadding: 10, | |
11 | + defaultType: 'textfield', | |
12 | + items: [ | |
13 | + { | |
14 | + fieldLabel: 'Nome', | |
15 | + width:450, | |
16 | + name: 'nome' | |
17 | + }, | |
18 | + { | |
19 | + fieldLabel: 'Sigla', | |
20 | + width: 300, | |
21 | + name: 'Sigla' | |
22 | + }, | |
23 | + { | |
24 | + fieldLabel: 'E-mail', | |
25 | + name: 'email' | |
26 | + }, | |
27 | + { | |
28 | + fieldLabel: 'Telefone', | |
29 | + name: 'telefone' | |
30 | + }, | |
31 | + | |
32 | + { | |
33 | + xtype: 'button', | |
34 | + text: 'Editar', | |
35 | + style:{ | |
36 | + margin: '50px 10px 0px 350px', | |
37 | + }, | |
38 | + }, | |
39 | + ] | |
40 | +}); | |
41 | + | |
42 | +painel = Ext.create('Ext.panel.Panel', { | |
43 | + layout: 'fit', | |
44 | + title: 'Editar Orgão', | |
45 | + width: '75%', | |
46 | + height: 250, | |
47 | + frame: true, | |
48 | + draggable: true, | |
49 | + collapsible: true, | |
50 | + border : true, | |
51 | + style: { | |
52 | + "text-align": 'center', | |
53 | + margin: '0px auto 15px auto' | |
54 | + }, | |
55 | + items: table, | |
56 | +}); | |
57 | + | |
58 | +Ext.onReady(function(){ | |
59 | + | |
60 | + | |
61 | + Ext.create('Ext.Container', { | |
62 | + padding: '15px', | |
63 | + items: [painel], | |
64 | + renderTo: 'widgets' | |
65 | + }); | |
66 | + | |
67 | +}); | |
68 | + | ... | ... |
wscacicneo/static/escritorio.js
... | ... | @@ -11,16 +11,17 @@ var table = Ext.create('Ext.form.Panel', { |
11 | 11 | defaultType: 'textfield', |
12 | 12 | items: [ |
13 | 13 | { |
14 | - fieldLabel: 'Quantidade', | |
14 | + fieldLabel: 'Nome', | |
15 | 15 | width:450, |
16 | 16 | name: 'nome' |
17 | 17 | }, |
18 | 18 | { |
19 | - fieldLabel: 'Nome', | |
19 | + fieldLabel: 'Data da intalação', | |
20 | 20 | width: 250, |
21 | 21 | name: 'matricula' |
22 | 22 | }, |
23 | 23 | { |
24 | + xtype:'combobox', | |
24 | 25 | fieldLabel: 'Tipo', |
25 | 26 | width: 300, |
26 | 27 | name: 'email' |
... | ... | @@ -29,7 +30,7 @@ var table = Ext.create('Ext.form.Panel', { |
29 | 30 | xtype: 'button', |
30 | 31 | text: 'Enviar', |
31 | 32 | style : { |
32 | - margin : " 0px 10px 0px 0px" | |
33 | + margin : " 0px 10px 0px 330px" | |
33 | 34 | } |
34 | 35 | }, |
35 | 36 | { |
... | ... | @@ -42,7 +43,7 @@ var table = Ext.create('Ext.form.Panel', { |
42 | 43 | |
43 | 44 | painel = Ext.create('Ext.panel.Panel', { |
44 | 45 | layout: 'fit', |
45 | - title: 'Swites De Escritorios', | |
46 | + title: 'Swites De Escritórios', | |
46 | 47 | width: '75%', |
47 | 48 | height: 155, |
48 | 49 | frame: true, | ... | ... |
wscacicneo/static/hd.js
... | ... | @@ -11,29 +11,34 @@ var table = Ext.create('Ext.form.Panel', { |
11 | 11 | defaultType: 'textfield', |
12 | 12 | items: [ |
13 | 13 | { |
14 | - fieldLabel: 'Quantidade', | |
15 | - width:450, | |
16 | - name: 'nome' | |
14 | + fieldLabel: 'Marca', | |
15 | + width: 300, | |
16 | + name: 'matricula' | |
17 | 17 | }, |
18 | + | |
18 | 19 | { |
19 | - fieldLabel: 'Marca', | |
20 | - width: 250, | |
20 | + fieldLabel: 'Tamanho', | |
21 | + width: 200, | |
21 | 22 | name: 'matricula' |
22 | 23 | }, |
24 | + | |
25 | + | |
23 | 26 | { |
27 | + xtype:'combobox', | |
24 | 28 | fieldLabel: 'Tipo', |
25 | 29 | width: 300, |
26 | 30 | name: 'email' |
27 | 31 | }, |
28 | 32 | { |
29 | 33 | fieldLabel: 'Idade', |
30 | - name: 'telefone' | |
34 | + width: 200, | |
35 | + name: 'idade' | |
31 | 36 | }, |
32 | 37 | { |
33 | 38 | xtype: 'button', |
34 | 39 | text: 'Enviar', |
35 | 40 | style : { |
36 | - margin : " 0px 10px 0px 0px" | |
41 | + margin : " 0px 10px 0px 300px" | |
37 | 42 | } |
38 | 43 | }, |
39 | 44 | { | ... | ... |
wscacicneo/static/home.js
1 | 1 | var painelContent= |
2 | 2 | "<br>"+ |
3 | - "Opção 1" + "<br>" + "<hr />" + | |
4 | - "Opção 2" + "<br>" +"<hr />" + | |
5 | - "Opção 3" + "<br>" +"<hr />" + | |
6 | - "Opção 4" + "<br>" +"<hr />" + | |
7 | - "Opção 5" + "<br>" +"<hr />" + | |
8 | - "Opção 6" + "<br>" + "<br>" | |
3 | + "Coleta 123658 - 12/12/2012" + "<br>" + "<hr />" + | |
4 | + "Coleta 115613 - 13/12/2012" + "<br>" +"<hr />" + | |
5 | + "Questionamento da coleta 115613 - 14/12/2012" + "<br>" +"<hr />" + | |
6 | + "Notificação da coleta 123658 - 20/12/2012" + "<br>" +"<hr />" + | |
7 | + "Relatório gerado da coleta 115613 - 25/12/2012" + "<br>" +"<hr />" | |
9 | 8 | |
10 | 9 | admin = Ext.create('Ext.panel.Panel', { |
11 | 10 | title: 'Ultimas Atividades', |
12 | 11 | width: '75%', |
12 | + height : 175, | |
13 | 13 | frame: true, |
14 | 14 | layout: 'fit', |
15 | 15 | collapsible: true, |
... | ... | @@ -87,7 +87,7 @@ var chart = Ext.create('Ext.chart.Chart', { |
87 | 87 | |
88 | 88 | widget = Ext.create('Ext.panel.Panel', { |
89 | 89 | layout: 'fit', |
90 | - title: 'Grafico', | |
90 | + title: 'Gráfico', | |
91 | 91 | width: '75%', |
92 | 92 | frame: true, |
93 | 93 | draggable: true, | ... | ... |
280 Bytes
345 Bytes
wscacicneo/static/list.js
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | |
4 | 4 | Ext.define('User',{ |
5 | 5 | extend: 'Ext.data.Model', |
6 | - fields: [ 'codigo', 'orgao', 'date' ] | |
6 | + fields: [ 'codigo', 'orgao'] | |
7 | 7 | }); |
8 | 8 | |
9 | 9 | var userStore = Ext.create('Ext.data.Store', { |
... | ... | @@ -23,24 +23,30 @@ table = Ext.create('Ext.grid.Panel', { |
23 | 23 | // title: 'Application Users', |
24 | 24 | columns: [ |
25 | 25 | { |
26 | - text: 'Orgão', | |
27 | - width: 300, | |
26 | + text: 'Órgão', | |
27 | + width: 390, | |
28 | 28 | dataIndex: 'orgao', |
29 | 29 | hidden: false, |
30 | 30 | }, |
31 | 31 | { |
32 | - text: '', | |
33 | - sortable: false, | |
34 | - width:80, | |
35 | - flex: 1, | |
36 | - dataIndex: 'date' | |
37 | - }, | |
38 | - ] | |
32 | + xtype: 'actioncolumn', | |
33 | + width: 165, | |
34 | + align: 'center', | |
35 | + items:[{ | |
36 | + icon:'static/icons/edit.png', | |
37 | + tooltip: 'Editar' | |
38 | + }, | |
39 | + { | |
40 | + icon:'static/icons/delete.png', | |
41 | + tooltip: 'Excluir' | |
42 | + }, | |
43 | + ]}, | |
44 | + ] | |
39 | 45 | }); |
40 | 46 | |
41 | 47 | tabela = Ext.create('Ext.panel.Panel', { |
42 | 48 | layout: 'fit', |
43 | - title: 'Orgãos', | |
49 | + title: 'Órgãos', | |
44 | 50 | width: '75%', |
45 | 51 | frame: true, |
46 | 52 | draggable: true, | ... | ... |
wscacicneo/static/main.js
... | ... | @@ -0,0 +1,75 @@ |
1 | +var table = Ext.create('Ext.form.Panel', { | |
2 | + renderTo: Ext.getBody(), | |
3 | + title: '', | |
4 | + height: 130, | |
5 | + width: 280, | |
6 | + style: { | |
7 | + "text-align": 'left', | |
8 | + }, | |
9 | + | |
10 | + bodyPadding: 10, | |
11 | + defaultType: 'textfield', | |
12 | + items: [ | |
13 | + { | |
14 | + xtype:'displayfield', | |
15 | + fieldLabel: 'Nome do responsavel', | |
16 | + name: 'nome', | |
17 | + value: 'João da Silva' | |
18 | + }, | |
19 | + { | |
20 | + xtype:'displayfield', | |
21 | + fieldLabel: 'Orgão da coleta:', | |
22 | + name: 'orgao', | |
23 | + value: 'Ministerio do Planejamento', | |
24 | + }, | |
25 | + { | |
26 | + xtype:'displayfield', | |
27 | + fieldLabel: 'Data', | |
28 | + name: 'data', | |
29 | + value:'12/12/2012', | |
30 | + }, | |
31 | + { | |
32 | + xtype:'textfield', | |
33 | + fieldLabel: 'Descrição', | |
34 | + name: 'Descrição', | |
35 | + width: 450, | |
36 | + height: 100, | |
37 | + }, | |
38 | + | |
39 | + { | |
40 | + xtype: 'button', | |
41 | + text: 'Enviar', | |
42 | + style:{ | |
43 | + margin: '50px 10px 0px 350px', | |
44 | + }, | |
45 | + }, | |
46 | + ] | |
47 | +}); | |
48 | + | |
49 | +painel = Ext.create('Ext.panel.Panel', { | |
50 | + layout: 'fit', | |
51 | + title: 'Enviar Notificação', | |
52 | + width: '75%', | |
53 | + height: 350, | |
54 | + frame: true, | |
55 | + draggable: true, | |
56 | + collapsible: true, | |
57 | + border : true, | |
58 | + style: { | |
59 | + "text-align": 'center', | |
60 | + margin: '0px auto 15px auto' | |
61 | + }, | |
62 | + items: table, | |
63 | +}); | |
64 | + | |
65 | +Ext.onReady(function(){ | |
66 | + | |
67 | + | |
68 | + Ext.create('Ext.Container', { | |
69 | + padding: '15px', | |
70 | + items: [painel], | |
71 | + renderTo: 'widgets' | |
72 | + }); | |
73 | + | |
74 | +}); | |
75 | + | ... | ... |
wscacicneo/static/orgao.js
... | ... | @@ -17,34 +17,36 @@ var table = Ext.create('Ext.form.Panel', { |
17 | 17 | }, |
18 | 18 | { |
19 | 19 | fieldLabel: 'Sigla', |
20 | - width: 250, | |
21 | - name: 'matricula' | |
20 | + width: 200, | |
21 | + name: 'sigla' | |
22 | 22 | }, |
23 | 23 | { |
24 | - fieldLabel: 'Responsável', | |
24 | + fieldLabel: 'Cargo / Gestor', | |
25 | 25 | width: 300, |
26 | - name: 'email' | |
26 | + name: 'cargo' | |
27 | 27 | }, |
28 | + | |
28 | 29 | { |
29 | 30 | fieldLabel: 'Telefone', |
30 | 31 | width: 300, |
31 | - name: 'email' | |
32 | + name: 'telefone' | |
32 | 33 | }, |
33 | 34 | |
34 | 35 | { |
35 | 36 | fieldLabel: 'E-mail', |
36 | - name: 'telefone' | |
37 | + width: 300, | |
38 | + name: 'email' | |
37 | 39 | }, |
38 | 40 | { |
39 | 41 | fieldLabel: 'Endereço', |
40 | 42 | width: 450, |
41 | - name: 'orgao' | |
43 | + name: 'end' | |
42 | 44 | }, |
43 | 45 | { |
44 | 46 | xtype: 'combobox', |
45 | 47 | name: 'checkbox1', |
46 | 48 | fieldLabel: 'Coleta', |
47 | - boxLabel: 'Coleta' | |
49 | + boxLabel: 'coleta' | |
48 | 50 | }, |
49 | 51 | { |
50 | 52 | xtype: 'button', |
... | ... | @@ -57,15 +59,21 @@ var table = Ext.create('Ext.form.Panel', { |
57 | 59 | xtype: 'button', |
58 | 60 | text: 'Limpar', |
59 | 61 | }, |
60 | - | |
62 | + { | |
63 | + xtype: 'button', | |
64 | + text: 'Cadastrar', | |
65 | + style:{ | |
66 | + margin: '50px 10px 0px 350px', | |
67 | + }, | |
68 | + }, | |
61 | 69 | ] |
62 | 70 | }); |
63 | 71 | |
64 | 72 | painel = Ext.create('Ext.panel.Panel', { |
65 | 73 | layout: 'fit', |
66 | - title: 'Orgão', | |
74 | + title: 'Órgão', | |
67 | 75 | width: '75%', |
68 | - height: 270, | |
76 | + height: 265, | |
69 | 77 | frame: true, |
70 | 78 | draggable: true, |
71 | 79 | collapsible: true, |
... | ... | @@ -88,3 +96,33 @@ Ext.onReady(function(){ |
88 | 96 | |
89 | 97 | }); |
90 | 98 | |
99 | + | |
100 | +$('#button-1017-btnIconEl').click(function(){ | |
101 | + var nome = $('#textfield-1010-inputEl').val() | |
102 | + sigla = $('#textfield-1011-inputEl').val() | |
103 | + gestor = $('#textfield-1012-inputEl').val() | |
104 | + telefone = $('#textfield-1013-inputEl').val() | |
105 | + email = $('#textfield-1014-inputEl').val() | |
106 | + end = $('#textfield-1015-inputEl').val() | |
107 | + coleta = $('#combobox-1016-inputEl').val() | |
108 | + var reg = { | |
109 | + 'nome' : nome, | |
110 | + 'sigla': sigla, | |
111 | + 'gestor': gestor, | |
112 | + 'telefone': telefone, | |
113 | + 'email': email, | |
114 | + 'end': end, | |
115 | + 'coleta': '15' | |
116 | + } | |
117 | + $.ajax({ | |
118 | + type: "POST", | |
119 | + url: 'http://10.1.0.121/wscacicneo/orgao', | |
120 | + cache: false, | |
121 | + success: function(jqXHR, textStatus, errorThrown){ | |
122 | + alert('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') | |
123 | + }, | |
124 | + error: function(jqXHR, textStatus, errorThrown){ | |
125 | + alert('ooooooooooooooooooooooooooooooooooooo') | |
126 | + } | |
127 | + }); | |
128 | +}); | ... | ... |
... | ... | @@ -0,0 +1,69 @@ |
1 | +var table = Ext.create('Ext.form.Panel', { | |
2 | + renderTo: Ext.getBody(), | |
3 | + title: '', | |
4 | + height: 130, | |
5 | + width: 280, | |
6 | + style: { | |
7 | + "text-align": 'left', | |
8 | + }, | |
9 | + | |
10 | + bodyPadding: 10, | |
11 | + defaultType: 'textfield', | |
12 | + items: [ | |
13 | + { | |
14 | + fieldLabel: 'Marca', | |
15 | + width: 250, | |
16 | + name: 'matricula' | |
17 | + }, | |
18 | + { | |
19 | + xtype:'combobox', | |
20 | + fieldLabel: 'Tipo', | |
21 | + width: 300, | |
22 | + name: 'email' | |
23 | + }, | |
24 | + { | |
25 | + fieldLabel: 'Idade', | |
26 | + name: 'telefone' | |
27 | + }, | |
28 | + { | |
29 | + xtype: 'button', | |
30 | + text: 'Enviar', | |
31 | + style : { | |
32 | + margin : " 0px 10px 0px 270px" | |
33 | + } | |
34 | + }, | |
35 | + { | |
36 | + xtype: 'button', | |
37 | + text: 'Limpar', | |
38 | + }, | |
39 | + | |
40 | + ] | |
41 | +}); | |
42 | + | |
43 | +painel = Ext.create('Ext.panel.Panel', { | |
44 | + layout: 'fit', | |
45 | + title: 'Processador', | |
46 | + width: '75%', | |
47 | + height: 200, | |
48 | + frame: true, | |
49 | + draggable: true, | |
50 | + collapsible: true, | |
51 | + border : true, | |
52 | + style: { | |
53 | + "text-align": 'center', | |
54 | + margin: '0px auto 15px auto' | |
55 | + }, | |
56 | + items: table, | |
57 | +}); | |
58 | + | |
59 | +Ext.onReady(function(){ | |
60 | + | |
61 | + | |
62 | + Ext.create('Ext.Container', { | |
63 | + padding: '15px', | |
64 | + items: [painel], | |
65 | + renderTo: 'widgets' | |
66 | + }); | |
67 | + | |
68 | +}); | |
69 | + | ... | ... |
... | ... | @@ -0,0 +1,89 @@ |
1 | +var table = Ext.create('Ext.form.Panel', { | |
2 | + renderTo: Ext.getBody(), | |
3 | + title: '', | |
4 | + height: 130, | |
5 | + width: 280, | |
6 | + style: { | |
7 | + "text-align": 'left', | |
8 | + }, | |
9 | + | |
10 | + bodyPadding: 10, | |
11 | + defaultType: 'textfield', | |
12 | + items: [ | |
13 | + { | |
14 | + xtype:'displayfield', | |
15 | + fieldLabel: 'Nome do responsavel', | |
16 | + name: 'nome', | |
17 | + value: 'João da Silva' | |
18 | + }, | |
19 | + { | |
20 | + xtype:'displayfield', | |
21 | + fieldLabel: 'Orgão da coleta:', | |
22 | + name: 'orgao', | |
23 | + value: 'Ministerio do Planejamento', | |
24 | + },{ | |
25 | + xtype:'displayfield', | |
26 | + fieldLabel: 'Codigo da coleta:', | |
27 | + name: 'orgao', | |
28 | + value: '1231654', | |
29 | + }, | |
30 | + | |
31 | + { | |
32 | + xtype:'displayfield', | |
33 | + fieldLabel: 'Data', | |
34 | + name: 'data', | |
35 | + value:'12/12/2012', | |
36 | + }, | |
37 | + { | |
38 | + xtype:'textfield', | |
39 | + fieldLabel: 'Descrição', | |
40 | + name: 'Descrição', | |
41 | + width: 450, | |
42 | + height: 100, | |
43 | + }, | |
44 | + | |
45 | + { | |
46 | + xtype: 'button', | |
47 | + text: 'Enviar', | |
48 | + style:{ | |
49 | + margin: '20px 10px 0px 300px', | |
50 | + }, | |
51 | + }, | |
52 | + { | |
53 | + xtype: 'button', | |
54 | + text: 'Cancelar', | |
55 | + style:{ | |
56 | + margin: '20px 10px 0px 0px', | |
57 | + }, | |
58 | + | |
59 | + }, | |
60 | + ] | |
61 | +}); | |
62 | + | |
63 | +painel = Ext.create('Ext.panel.Panel', { | |
64 | + layout: 'fit', | |
65 | + title: 'Questionar Coleta', | |
66 | + width: '75%', | |
67 | + height: 350, | |
68 | + frame: true, | |
69 | + draggable: true, | |
70 | + collapsible: true, | |
71 | + border : true, | |
72 | + style: { | |
73 | + "text-align": 'center', | |
74 | + margin: '0px auto 15px auto' | |
75 | + }, | |
76 | + items: table, | |
77 | +}); | |
78 | + | |
79 | +Ext.onReady(function(){ | |
80 | + | |
81 | + | |
82 | + Ext.create('Ext.Container', { | |
83 | + padding: '15px', | |
84 | + items: [painel], | |
85 | + renderTo: 'widgets' | |
86 | + }); | |
87 | + | |
88 | +}); | |
89 | + | ... | ... |
wscacicneo/static/rede.js
... | ... | @@ -11,20 +11,20 @@ var table = Ext.create('Ext.form.Panel', { |
11 | 11 | defaultType: 'textfield', |
12 | 12 | items: [ |
13 | 13 | { |
14 | - fieldLabel: 'Quantidade', | |
14 | + fieldLabel: 'Ativos de rede', | |
15 | 15 | width:450, |
16 | 16 | name: 'nome' |
17 | 17 | }, |
18 | 18 | { |
19 | - fieldLabel: 'ativos rede', | |
20 | - width: 250, | |
19 | + fieldLabel: 'Quantidade', | |
20 | + width: 200, | |
21 | 21 | name: 'matricula' |
22 | 22 | }, |
23 | 23 | { |
24 | 24 | xtype: 'button', |
25 | 25 | text: 'Enviar', |
26 | 26 | style : { |
27 | - margin : " 0px 10px 0px 0px" | |
27 | + margin : " 0px 10px 0px 330px" | |
28 | 28 | } |
29 | 29 | }, |
30 | 30 | { | ... | ... |
wscacicneo/static/relatorio.js
... | ... | @@ -50,14 +50,14 @@ table = Ext.create('Ext.grid.Panel', { |
50 | 50 | }, |
51 | 51 | { |
52 | 52 | text: 'MODELO', |
53 | - width: 300, | |
53 | + width: 200, | |
54 | 54 | dataIndex: 'modelo', |
55 | 55 | hidden: false, |
56 | 56 | }, |
57 | 57 | { |
58 | 58 | text: 'FABRICAÇÃO', |
59 | 59 | sortable: false, |
60 | - width:80, | |
60 | + width:100, | |
61 | 61 | renderer: Ext.util.Format.dateRenderer('d/m/Y'), |
62 | 62 | flex: 1, |
63 | 63 | dataIndex: 'fabricacao' |
... | ... | @@ -65,7 +65,7 @@ table = Ext.create('Ext.grid.Panel', { |
65 | 65 | { |
66 | 66 | text: 'QUANTIDADE', |
67 | 67 | sortable: false, |
68 | - width:80, | |
68 | + width:120, | |
69 | 69 | dataIndex: 'quantidade' |
70 | 70 | }, |
71 | 71 | ], |
... | ... | @@ -78,8 +78,9 @@ table = Ext.create('Ext.grid.Panel', { |
78 | 78 | { xtype: 'tbfill'}, |
79 | 79 | 'Favorito', |
80 | 80 | { xtype: 'tbfill'}, |
81 | + 'Questionar Coleta', | |
82 | + { xtype: 'tbfill'}, | |
81 | 83 | 'CSV', |
82 | - | |
83 | 84 | ] |
84 | 85 | }); |
85 | 86 | |
... | ... | @@ -118,7 +119,7 @@ store.load({ |
118 | 119 | |
119 | 120 | tabela = Ext.create('Ext.panel.Panel', { |
120 | 121 | layout: 'fit', |
121 | - title: 'Relatorio de coletas por PROCESSADOR', | |
122 | + title: 'Relatório de coletas por PROCESSADOR', | |
122 | 123 | width: '75%', |
123 | 124 | frame: true, |
124 | 125 | draggable: true, |
... | ... | @@ -203,7 +204,7 @@ var chart = Ext.create('Ext.chart.Chart', { |
203 | 204 | |
204 | 205 | widget = Ext.create('Ext.panel.Panel', { |
205 | 206 | layout: 'fit', |
206 | - title: 'Grafico de PROCESSADORES da SECRETARIA DE LOGISTICA E TECONOLOGIA DA INFORMAÇÃO', | |
207 | + title: 'Gráfico', | |
207 | 208 | width: '75%', |
208 | 209 | frame: true, |
209 | 210 | draggable: true, |
... | ... | @@ -239,7 +240,6 @@ Ext.onReady(function(){ |
239 | 240 | items: [widget], |
240 | 241 | renderTo: 'widgets' |
241 | 242 | }); |
242 | - | |
243 | 243 | }); |
244 | 244 | |
245 | 245 | ... | ... |
wscacicneo/static/reports.js
... | ... | @@ -0,0 +1,79 @@ |
1 | + | |
2 | +// **** FILTRO DE ITENS **** | |
3 | + | |
4 | +Ext.define('User1',{ | |
5 | + extend: 'Ext.data.Model', | |
6 | + fields: ['chbox', 'item' ] | |
7 | +}); | |
8 | + | |
9 | +var userStore1 = Ext.create('Ext.data.Store', { | |
10 | + model: 'User1', | |
11 | + data: [ | |
12 | + { item: 'Computador'}, | |
13 | + { item: 'Processador'}, | |
14 | + { item: 'Memórias'}, | |
15 | + { item: 'Hard Disk (HD)'}, | |
16 | + { item: 'Sistemas Operacionais'}, | |
17 | + { item: 'Suítes de Escritórios'}, | |
18 | + { item: 'Ativos de Redes'}, | |
19 | + { item: 'Softwares Básicos'}, | |
20 | + ] | |
21 | +}); | |
22 | + | |
23 | +table1 = Ext.create('Ext.grid.Panel', { | |
24 | + store: userStore1, | |
25 | + width: 450, | |
26 | + height: 300, | |
27 | + // title: 'Application Users', | |
28 | + columns: [ | |
29 | + { | |
30 | + text: 'Item', | |
31 | + width:'100%', | |
32 | + sortable: true, | |
33 | + hideable: false, | |
34 | + dataIndex: 'item' | |
35 | + }, | |
36 | + ], | |
37 | + bbar:[ | |
38 | + { | |
39 | + xtype: 'button', | |
40 | + text: 'Gerar Relatório', | |
41 | + style:{ | |
42 | + margin: '0px 10px 0px 300px', | |
43 | + } | |
44 | + }, | |
45 | + { | |
46 | + xtype: 'button', | |
47 | + text: 'Cancelar', | |
48 | + }, | |
49 | + ] | |
50 | + | |
51 | +}); | |
52 | + | |
53 | +tabela1 = Ext.create('Ext.panel.Panel', { | |
54 | + layout: 'fit', | |
55 | + title: 'Gerar Relatório', | |
56 | + width: '75%', | |
57 | + frame: true, | |
58 | + draggable: true, | |
59 | + collapsible: true, | |
60 | + border : true, | |
61 | + style: { | |
62 | + "text-align": 'center', | |
63 | + margin: '0px auto 15px auto' | |
64 | + }, | |
65 | + items: table1, | |
66 | +}); | |
67 | + | |
68 | +Ext.onReady(function(){ | |
69 | + | |
70 | + | |
71 | + Ext.create('Ext.Container', { | |
72 | + padding:'15px', | |
73 | + items: [tabela1], | |
74 | + renderTo: 'widgets' | |
75 | + }); | |
76 | + | |
77 | +}); | |
78 | + | |
79 | + | ... | ... |
wscacicneo/static/sistema.js
... | ... | @@ -16,11 +16,6 @@ var table = Ext.create('Ext.form.Panel', { |
16 | 16 | name: 'nome' |
17 | 17 | }, |
18 | 18 | { |
19 | - fieldLabel: 'Marca', | |
20 | - width: 250, | |
21 | - name: 'data instalação' | |
22 | - }, | |
23 | - { | |
24 | 19 | fieldLabel: 'instalação', |
25 | 20 | width: 250, |
26 | 21 | name: 'data instalação' |
... | ... | @@ -31,8 +26,9 @@ var table = Ext.create('Ext.form.Panel', { |
31 | 26 | name: 'email' |
32 | 27 | }, |
33 | 28 | { |
34 | - fieldLabel: 'Verção', | |
35 | - name: 'telefone' | |
29 | + fieldLabel: 'Versão', | |
30 | + width: 250, | |
31 | + name: 'email' | |
36 | 32 | }, |
37 | 33 | { |
38 | 34 | xtype: 'button', |
... | ... | @@ -53,7 +49,8 @@ painel = Ext.create('Ext.panel.Panel', { |
53 | 49 | layout: 'fit', |
54 | 50 | title: 'Sistemas Operacionais', |
55 | 51 | width: '75%', |
56 | - height: 210, | |
52 | + height: 200, | |
53 | + title: 'Processador', | |
57 | 54 | frame: true, |
58 | 55 | draggable: true, |
59 | 56 | collapsible: true, |
... | ... | @@ -73,6 +70,5 @@ Ext.onReady(function(){ |
73 | 70 | items: [painel], |
74 | 71 | renderTo: 'widgets' |
75 | 72 | }); |
76 | - | |
77 | 73 | }); |
78 | 74 | ... | ... |
wscacicneo/static/users.js
1 | -/*GRAFICO DE ORGÃOS*/ | |
2 | - | |
3 | - | |
4 | 1 | Ext.define('User',{ |
5 | 2 | extend: 'Ext.data.Model', |
6 | 3 | fields: [ 'codigo', 'orgao'] |
... | ... | @@ -47,7 +44,7 @@ table = Ext.create('Ext.grid.Panel', { |
47 | 44 | icon:'' |
48 | 45 | }, |
49 | 46 | { |
50 | - icon:'static/icons/delete.gif', | |
47 | + icon:'static/icons/delete.png', | |
51 | 48 | tooltip: 'Excluir' |
52 | 49 | } |
53 | 50 | ] | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +import unittest | |
2 | +import requests | |
3 | +import json | |
4 | +from pyramid import testing | |
5 | + | |
6 | + | |
7 | +class ViewTests(unittest.TestCase): | |
8 | + | |
9 | + def setUp(self): | |
10 | + self.rest_url = 'http://api.brlight.net/api' | |
11 | + | |
12 | + def test_get_orgao(self): | |
13 | + """ | |
14 | + Get órgãos cadastrados! | |
15 | + """ | |
16 | + url = self.rest_url + '/orgao_sg/doc' | |
17 | + get = requests.get(url) | |
18 | + | |
19 | + assert(url) | |
20 | + | |
21 | + def tearDown(self): | |
22 | + testing.tearDown() | |
23 | + | ... | ... |
... | ... | @@ -0,0 +1,16 @@ |
1 | +import unittest | |
2 | +from pyramid import testing | |
3 | + | |
4 | + | |
5 | +class ViewTests(unittest.TestCase): | |
6 | + def setUp(self): | |
7 | + self.config = testing.setUp() | |
8 | + | |
9 | + def tearDown(self): | |
10 | + testing.tearDown() | |
11 | + | |
12 | + def test_my_view(self): | |
13 | + from .views import my_view | |
14 | + request = testing.DummyRequest() | |
15 | + info = my_view(request) | |
16 | + self.assertEqual(info['project'], 'WSCacicNeo') | ... | ... |
wscacicneo/tests.py
... | ... | @@ -1,17 +0,0 @@ |
1 | -import unittest | |
2 | - | |
3 | -from pyramid import testing | |
4 | - | |
5 | - | |
6 | -class ViewTests(unittest.TestCase): | |
7 | - def setUp(self): | |
8 | - self.config = testing.setUp() | |
9 | - | |
10 | - def tearDown(self): | |
11 | - testing.tearDown() | |
12 | - | |
13 | - def test_my_view(self): | |
14 | - from .views import my_view | |
15 | - request = testing.DummyRequest() | |
16 | - info = my_view(request) | |
17 | - self.assertEqual(info['project'], 'WSCacicNeo') |
wscacicneo/views.py
1 | +import requests | |
1 | 2 | from pyramid.response import Response |
3 | +from pyramid.httpexceptions import HTTPFound | |
2 | 4 | from pyramid.view import view_config |
3 | 5 | from sqlalchemy.orm import sessionmaker |
4 | 6 | from sqlalchemy import create_engine, MetaData |
... | ... | @@ -8,12 +10,17 @@ from .models import ( |
8 | 10 | ) |
9 | 11 | |
10 | 12 | engine = create_engine('postgresql://rest:rest@localhost/cacic') |
13 | +REST_URL = 'http://api.brlight.net/api' | |
11 | 14 | |
12 | 15 | Session = sessionmaker(bind=engine) |
13 | 16 | session = Session() |
14 | 17 | @view_config(route_name='master', renderer='templates/master.pt') |
15 | 18 | def master(request): |
16 | - return {'project': 'WSCacicNeo'} | |
19 | + url = REST_URL + '/orgao_sg/doc' | |
20 | + json_reg = request.params | |
21 | + data = {'value': json_reg} | |
22 | + response = requests.post(url, data=data) | |
23 | + return response.text | |
17 | 24 | |
18 | 25 | @view_config(route_name='home', renderer='templates/home.pt') |
19 | 26 | def home(request): |
... | ... | @@ -85,7 +92,7 @@ def sobre(request): |
85 | 92 | def computador(request): |
86 | 93 | return {'project': 'WSCacicNeo'} |
87 | 94 | |
88 | -@view_config(route_name='proc', renderer='templates/proc.pt') | |
95 | +@view_config(route_name='processador', renderer='templates/processador.pt') | |
89 | 96 | def proc(request): |
90 | 97 | return {'project': 'WSCacicNeo'} |
91 | 98 | |
... | ... | @@ -117,6 +124,42 @@ def sistema(request): |
117 | 124 | def bot(request): |
118 | 125 | return {'project': 'WSCacicNeo'} |
119 | 126 | |
127 | +@view_config(route_name='configapi', renderer='templates/configapi.pt') | |
128 | +def configapi(request): | |
129 | + return {'project': 'WSCacicNeo'} | |
130 | + | |
131 | +@view_config(route_name='editarorgao', renderer='templates/editarorgao.pt') | |
132 | +def editarorgao(request): | |
133 | + return {'project': 'WSCacicNeo'} | |
134 | + | |
135 | +@view_config(route_name='notify', renderer='templates/notify.pt') | |
136 | +def notify(request): | |
137 | + return {'project': 'WSCacicNeo'} | |
138 | + | |
139 | +@view_config(route_name='configcoleta', renderer='templates/configcoleta.pt') | |
140 | +def configcoleta(request): | |
141 | + return {'project': 'WSCacicNeo'} | |
142 | + | |
143 | +@view_config(route_name='configfav', renderer='templates/configfav.pt') | |
144 | +def configfav(request): | |
145 | + return {'project': 'WSCacicNeo'} | |
146 | + | |
147 | +@view_config(route_name='reportsgestor', renderer='templates/reportsgestor.pt') | |
148 | +def reportsgestor(request): | |
149 | + return {'project': 'WSCacicNeo'} | |
150 | + | |
151 | +@view_config(route_name='questionarcoleta', renderer='templates/questionarcoleta.pt') | |
152 | +def questionarcoleta(request): | |
153 | + return {'project': 'WSCacicNeo'} | |
154 | + | |
155 | +@view_config(route_name='confighome', renderer='templates/confighome.pt') | |
156 | +def confighome(request): | |
157 | + return {'project': 'WSCacicNeo'} | |
158 | + | |
159 | +@view_config(route_name='db', renderer='templates/db.pt') | |
160 | +def db(request): | |
161 | + return {'project': 'WSCacicNeo'} | |
162 | + | |
120 | 163 | |
121 | 164 | @view_config(route_name='busca', renderer='templates/busca.pt') |
122 | 165 | def my_view8(request): |
... | ... | @@ -149,41 +192,3 @@ def my_view8(request): |
149 | 192 | #print (dc) |
150 | 193 | |
151 | 194 | return {'project':'WSCacicNeo', 'data': data} |
152 | - | |
153 | -# @view_config(route_name='estatisticas', renderer='templates/estatisticas.pt') | |
154 | -# def estatisticas(request): | |
155 | -# response = requests.get('%s/base?$$={"select":"*"}' %(rest_url)).json() | |
156 | -# results = response['results'] | |
157 | - | |
158 | -# return {'project': 'WSCacicNeo', 'results': json.dumps(results)} | |
159 | - | |
160 | -# @view_config(route_name='downloads', renderer='templates/downloads.pt') | |
161 | -# def downloads(request): | |
162 | -# return {'project': 'WSCacicNeo'} | |
163 | - | |
164 | -# @view_config(route_name='relatorios', renderer='templates/relatorios.pt') | |
165 | -# def relatorios(request): | |
166 | -# response = requests.get('http://api.brlight.org/reg/WMI/3').json() | |
167 | -# #response = requests.get('http://api.brlight.org/base/5').json() | |
168 | - | |
169 | -# return {'project': 'WSCacicNeo', 'reg': response} | |
170 | - | |
171 | -# @view_config(route_name='mensagens', renderer='templates/mensagens.pt') | |
172 | -# def mensagens(request): | |
173 | -# return {'project': 'WSCacicNeo'} | |
174 | - | |
175 | -# @view_config(route_name='ajuda', renderer='templates/ajuda.pt') | |
176 | -# def ajuda(request): | |
177 | -# return {'project': 'WSCacicNeo'} | |
178 | - | |
179 | -# @view_config(route_name='usuario', renderer='templates/usuario.pt') | |
180 | -# def usuario(request): | |
181 | -# return {'project': 'WSCacicNeo'} | |
182 | - | |
183 | -# @view_config(route_name='ferramentas', renderer='templates/ferramentas.pt') | |
184 | -# def ferramentas(request): | |
185 | -# return {'project': 'WSCacicNeo'} | |
186 | - | |
187 | -# @view_config(route_name='login', renderer='templates/login.pt') | |
188 | -# def login(request): | |
189 | -# return {'project': 'WSCacicNeo'} | ... | ... |