diff --git a/useful/stg312/.upid.out b/useful/stg312/.upid.out index 3a47b5e3b9b7653e36faa5560e5e011d376d895b..3423dee6ad8b057e2362e01c654584f134554e82 100644 --- a/useful/stg312/.upid.out +++ b/useful/stg312/.upid.out @@ -1 +1 @@ -{"uploadid":"teaMZQqTl8Juxndfl3chV0FmnkYqP33CGYg","status":"ok","code":"003","msg":"New upload succesful"} \ No newline at end of file +{"uploadid":"yDeom6yODgayCGLSwnCqfvTyqWrg0p1PyUc","status":"ok","code":"003","msg":"New upload succesful"} \ No newline at end of file diff --git a/useful/stg312/dependencies.sh b/useful/stg312/dependencies.sh index 2dbb1d18d6ac4de2e976357e7205a38eebd16fc1..fcc3f5b6644b77d9bf2f39c4989498b0897cccd5 100755 --- a/useful/stg312/dependencies.sh +++ b/useful/stg312/dependencies.sh @@ -3,7 +3,7 @@ apt-get install -y squashfs-tools apt-get install -y synaptic apt-get install -y libjansson-dev apt-get install -y libjansson4 -apt-get install -y python_setuptools +apt-get install -y python-setuptools easy_install speedtest_cli apt-get install -y libcurl4-openssl-dev apt-get install -y libgtk-3-dev diff --git a/useful/stg312/openslx_gui b/useful/stg312/openslx_gui index 69d9f10ca6bdff4067b764cd63f44c84f38de941..753039de3c83ae9bd154a4add470f4f3faeb7a9c 100755 Binary files a/useful/stg312/openslx_gui and b/useful/stg312/openslx_gui differ diff --git a/useful/stg312/openslx_gui_v01.glade b/useful/stg312/openslx_gui_v01.glade index 31006192de933f6c96ec512bb5cb9b14598f8e0b..1072e67e9db2b280734335381542d3442e716f5c 100644 --- a/useful/stg312/openslx_gui_v01.glade +++ b/useful/stg312/openslx_gui_v01.glade @@ -629,7 +629,14 @@ instalar softwares</property> <property name="valign">center</property> <property name="label" translatable="yes">Upload completo! Aguarde alguns minutos e sua imagem estará -disponível no nosso site. +disponível no nosso site para configuração. +Clique no botão abaixo para ser levado ao site. +Nele faça login com o mesmo login e senha que usou para logar aqui +e clique em Gerenciamento de Imagens. Edite as configurações da +imagem que fez upload e ela estará pronta para uso! + +Caso o navegador não abra, entre no site: +http://slxbox.dev.c3sl.br </property> </object> </child> @@ -667,16 +674,42 @@ disponível no nosso site. </packing> </child> <child> - <object class="GtkButton" id="button_return_upload_confirm"> - <property name="label" translatable="yes">Voltar</property> - <property name="width_request">300</property> - <property name="height_request">50</property> + <object class="GtkGrid" id="grid15"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes">Utiliza o Squashfs para gerar uma versão compactada da imagem que será utilizada depois.</property> - <property name="valign">center</property> - <property name="resize_mode">immediate</property> + <property name="can_focus">False</property> + <property name="column_spacing">5</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkButton" id="button_return_upload_confirm"> + <property name="label" translatable="yes">Voltar</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Utiliza o Squashfs para gerar uma versão compactada da imagem que será utilizada depois.</property> + <property name="valign">center</property> + <property name="resize_mode">immediate</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button_site"> + <property name="label" translatable="yes">Ir para o site</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> </object> <packing> <property name="left_attach">0</property> diff --git a/useful/stg312/stg4.c b/useful/stg312/stg4.c index 0fee6d5a65bf256c9359c09309bc251561eb9949..97eb07ea1d9ad0763ee8994750bfbff9401509a9 100644 --- a/useful/stg312/stg4.c +++ b/useful/stg312/stg4.c @@ -15,7 +15,7 @@ //void stg4_tela_confirmacao_upload(GtkWidget *w,gpointer p){ void stg4_tela_confirmacao_upload(GPid pid, gint status,gpointer p){ //pid_t pid; // Para quando for implementado - GtkWidget *window_stg4_upload_confirm, *janela_ant, *button_return_upload_confirm; //*loading_screen; // Para quando for implementado + GtkWidget *window_stg4_upload_confirm, *janela_ant, *button_return_upload_confirm, *button_site; //*loading_screen; // Para quando for implementado GtkBuilder *builder; dados *data_ant = p; //Pega os dados recebidos pela chamada da função @@ -45,6 +45,7 @@ void stg4_tela_confirmacao_upload(GPid pid, gint status,gpointer p){ g_signal_connect(window_stg4_upload_confirm, "destroy", G_CALLBACK(chama_tela_principal), NULL); puts("Aqui10"); button_return_upload_confirm = GTK_WIDGET(gtk_builder_get_object(builder, "button_return_upload_confirm")); + button_site = GTK_WIDGET(gtk_builder_get_object(builder, "button_site")); puts("Aqui11"); //loading_screen = GTK_WIDGET(gtk_builder_get_object(builder, "loading_screen")); @@ -59,6 +60,7 @@ void stg4_tela_confirmacao_upload(GPid pid, gint status,gpointer p){ g_signal_connect (G_OBJECT (window_stg4_upload_confirm), "key_press_event", G_CALLBACK (on_key_press), data); //Conecta os sinais pra quando apertar uma tecla g_signal_connect(button_return_upload_confirm, "clicked", G_CALLBACK(mata_janela_e_chama_tela_principal), data); + g_signal_connect(button_site, "clicked", G_CALLBACK(abre_site), data); puts("Aqui3"); diff --git a/useful/stg312/utils.c b/useful/stg312/utils.c index 683c501c1b2e07cfc2640cab613af3fbc17e0830..0127a311a13313d93d9e0200e533cba1e339dc91 100644 --- a/useful/stg312/utils.c +++ b/useful/stg312/utils.c @@ -87,6 +87,15 @@ void abre_shell(GtkWidget *w, gpointer p){ g_spawn_command_line_sync("x-terminal-emulator", NULL, NULL, &status, NULL); // Abre o shell +} + +void abre_site(GtkWidget *w, gpointer p){ + + int status; + + g_spawn_command_line_sync("xdg-open http://slxboxdev.c3sl.ufpr.br", NULL, NULL, &status, NULL); // Abre o shell + + } /* diff --git a/useful/stg312/utils.h b/useful/stg312/utils.h index 47cf084d0bd41f2497cbbe31ee6380f62f401242..01713a92b5263876b2f20a5bb297c996f20c86bf 100644 --- a/useful/stg312/utils.h +++ b/useful/stg312/utils.h @@ -45,6 +45,8 @@ void sai_do_script(GPid pid, gint status, gpointer p); void abre_shell(GtkWidget *w, gpointer p); +void abre_site(GtkWidget *w, gpointer p); + void sair(GtkWidget *w, gpointer p); // Função que checa se os scripts foram rodados com sucesso. Ela é utilizada tanto na tela 2 quanto na tela 3.