Example #1
0
 def get_div_for_tab(self):
     children_list = [
         MyHTMLTabTradeHeaderTable().get_table(),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(TDD.TRADE_TYPE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(TDD.BUY_TRIGGER)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 TDD.TRADE_STRATEGY)),
         # MyHTML.div_with_html_button_submit('my_trades_cancel_trade_button', 'Cancel Trade'),
         MyHTML.div_with_button(
             **self._button_handler.get_button_parameters(TBTN.CANCEL_TRADE)
         ),
         MyHTML.div_with_button(**self._button_handler.
                                get_button_parameters(TBTN.RESTART_REPlAY)),
         MyHTML.div_with_button(
             **self._button_handler.get_button_parameters(
                 TBTN.RESET_TRADE_SELECTION)),
         # MyHTML.div_with_html_button_submit('my_replay_restart_button', 'Restart Trade'),
         MyHTML.div_with_slider('my_replay_speed_slider',
                                0,
                                20,
                                1,
                                self._replay_speed,
                                show=False),
         MyHTML.div_with_table('my_trade_table_div',
                               self.__get_table_for_trades__()),
         MyHTML.div('my_graph_trade_replay_div', '', False)
     ]
     # scatter_graph = self.__get_scatter_graph_for_trades__('trade_scatter_graph')
     return MyHTML.div('my_trades', children_list)
Example #2
0
 def get_div_for_tab(self):
     children_list = [
         self.__get_html_tab_header_table__(),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.CHART_TYPE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.CATEGORY)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.PREDICTOR)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.X_VARIABLE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.Y_VARIABLE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 DDT.CHART_TEXT_VARIABLE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.MODEL_TYPE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DDT.PATTERN_TYPE)),
         MyHTML.div(self._my_statistics_chart_div,
                    self.__get_charts_from_plotter__(), False),
     ]
     # print('self._my_statistics_chart_div={}'.format(self._my_statistics_chart_div))
     return MyHTML.div(self._my_statistics, children_list)
    def _init_cells_(self):
        ticker_label_div = MyHTML.div('my_recommender_position_label_div', 'Position:', True)
        ticker_div = MyHTML.div('my_recommender_position_div', '', False)

        self.set_value(1, 1, MyHTML.div_embedded([ticker_label_div, MyHTML.span(' '), ticker_div]))
        self.set_value(1, 2, MyDCC.markdown('my_recommender_markdown'))
        self.set_value(1, 3, MyDCC.markdown('my_recommender_news_markdown'))
    def _init_cells_(self):
        ticker_label_div = MyHTML.div('my_trade_ticker_label_div', 'Ticker:', True)
        ticker_div = MyHTML.div('my_trade_ticker_div', '', False)

        self.set_value(1, 1, MyHTML.div_embedded([ticker_label_div, MyHTML.span(' '), ticker_div]))
        self.set_value(1, 2, MyDCC.markdown('my_trade_markdown'))
        self.set_value(1, 3, MyDCC.markdown('my_trade_news_markdown'))
Example #5
0
 def get_div_for_tab(self):
     children_list = [
         self.__get_embedded_div_for_last_run_and_start_job_button__(),
         MyHTML.div_with_table(self._data_table_div,
                               self.__get_table_for_jobs__()),
         MyDCC.markdown(self._my_jobs_entry_markdown)
     ]
     return MyHTML.div('my_jobs_div', children_list)
Example #6
0
 def __get_charts_from_plotter__(self):
     charts = self._statistic_plotter.get_chart_list()
     # print('charts = {}'.format(charts))
     if len(charts) == 1:
         return charts[0]
     embedded_element_list = []
     for chart in charts:
         embedded_element_list.append(
             MyHTML.div('HALLO', chart, inline=True))
     return MyHTML.div_embedded(embedded_element_list)
Example #7
0
    def _init_cells_for_search_by_database_entries__(self):
        input_label_div = MyHTML.div(self.my_search_db_label_div,
                                     'Search by database:', True)
        drop_down = MyHTML.div_with_dcc_drop_down(
            **self._dd_handler.get_drop_down_parameters(SRDD.SEARCH_DATABASE)),
        button_search = MyHTML.div_with_html_button_submit(
            self.my_search_db_button, 'Search', hidden='')

        self.set_value(2, 1, input_label_div)
        self.set_value(2, 2, drop_down)
        self.set_value(2, 3, button_search)
 def __get_timer__():
     return MyHTML.div(
         'my_timer',
         [
         MyHTML.h1(
             datetime.now().strftime('%Y-%m-%d'),
             style_input={'opacity': '1', 'color': 'black', 'fontSize': 12}
         ),
         MyHTML.h1(
             datetime.now().strftime('%H:%M:%S'),
             style_input={'font - family': 'Times New Roman', 'opacity': '0.5', 'color': 'black', 'fontSize': 12}
         ),
     ])
Example #9
0
    def _init_cells_for_search_by_input__(self):
        input_label_div = MyHTML.div(self.my_search_input_label_div,
                                     'Search input:', True)
        input_field = MyHTML.div_with_textarea(
            element_id=self.my_search_input,
            placeholder='Please enter search string...',
            size=650,
            height=50)
        button_search = MyHTML.div_with_html_button_submit(
            self.my_search_button, 'Search', hidden='')

        self.set_value(1, 1, input_label_div)
        self.set_value(1, 2, input_field)
        self.set_value(1, 3, button_search)
 def _init_cells_(self):
     column_number = 0
     for wave_type, title in self._header_dict.items():
         row_number = 1
         column_number += 1
         label_div = MyHTML.div('my_waves_{}_{}_label_div'.format(row_number, column_number), title, True)
         self.set_value(row_number, column_number, label_div)
         for index in INDICES.get_index_list_for_waves_tab():
             row_number += 1
             if column_number == 1:
                 label_div = MyHTML.div('my_waves_{}_{}_label_div'.format(row_number, column_number), index, True)
                 self.set_value(row_number, column_number, label_div)
             else:
                 value_div = MyHTML.div('my_waves_{}_{}_value_div'.format(row_number, column_number), index, True)
                 self.set_value(row_number, column_number, value_div)
 def _init_cells_(self):
     column_number = 0
     table_header_dict = self.__get_table_header_dict__()
     today_label_div = MyHTML.div('my_log_today_label_div', 'Today', True)
     all_label_div = MyHTML.div('my_log_all_label_div', 'All', True)
     for log_type, title in table_header_dict.items():
         column_number += 1
         label_div = MyHTML.div('my_log_{}_label_div'.format(log_type), title, True)
         today_value_div = MyHTML.div('my_log_{}_today_value_div'.format(log_type), '0', bold=False)
         all_value_div = MyHTML.div('my_log_{}_all_value_div'.format(log_type), '0', bold=False)
         self.set_value(1, column_number, label_div)
         if log_type == LOGT.DATE_RANGE:
             self.set_value(2, 1, today_label_div)
             self.set_value(3, 1, all_label_div)
         else:
             self.set_value(2, column_number, today_value_div)
             self.set_value(3, column_number, all_value_div)
Example #12
0
 def __get_html_div_with_date_picker_range__():
     return html.Div(
         [
             MyHTML.h3('Select start and end dates:'),
             MyDCC.get_date_picker_range('my_date_picker', datetime.today() - timedelta(days=160))
         ],
         style={'display': 'inline-block', 'vertical-align': 'bottom', 'height': 20}
     )
 def handle_callback_for_search_result_entry_link_text(
         button_hidden: str):
     if button_hidden == 'hidden':
         return ''
     button_text = MyText.get_next_best_abbreviation(
         self._selected_search_result_row[SLDC.TITLE], 30)
     return MyHTML.button_submit('my_link_button',
                                 'Open "{}"'.format(button_text), '')
Example #14
0
 def get_div_for_tab(self):
     children_list = [
         self._header_table.get_table(),
         MyHTML.div_with_input(element_id=self._my_sales_filter_input,
                               placeholder='Please enter filter for my sales...', size=500, height=27),
         MyHTML.div_with_button_link(self._my_sales_link, href='', title='', hidden='hidden'),
         MyHTML.div_with_html_button_submit(self._my_sales_show_detail_button, children='Details', hidden='hidden'),
         MyHTML.div_with_html_button_submit(self._my_sales_reset_button, children='Reset', hidden='hidden'),
         MyHTML.div_with_table(self._data_table_div, self.__get_sale_grid_table__()),
         MyDCC.markdown(self._my_sales_sale_entry_markdown),
         MyHTML.div_with_dcc_drop_down(**self._dd_handler.get_drop_down_parameters(SLDD.SALE_ENTITIES)),
         MyHTML.div(self._my_sales_regression_chart, self.__get_sales_regression_chart__(), inline=False),
         MyHTML.div_with_button_link(self._my_sales_similar_sale_link, href='', title='', hidden='hidden'),
         MyHTML.div_with_table(self._my_sales_similar_sale_grid_table_div, self.__get_similar_sale_grid_table__('')),
         MyDCC.markdown(self._my_sales_similar_sale_entry_markdown),
     ]
     return MyHTML.div(self._my_sales_div, children_list)
Example #15
0
 def __get_div_for_app_layout__(self):
     children_list = [
         MyHTMLHeaderTable().get_table(),
         MyDCC.interval(
             'my_interval_timer',
             self.bitfinex_config.ticker_refresh_rate_in_seconds),
         MyDCC.interval('my_interval_refresh', 120),
         self.__get_tabs_for_app__()
     ]
     return MyHTML.div('my_app', children_list)
Example #16
0
 def __get_embedded_div_for_last_run_and_start_job_button__(self):
     label_div = MyHTML.div(self._my_jobs_last_check_label_div,
                            'Last check:', True)
     value_div = MyHTML.div(self._my_jobs_last_check_value_div, '', False)
     button_start = MyHTML.button_submit(self._my_jobs_start_job_button,
                                         'Start selected job')
     button_activate = MyHTML.button_submit(
         self._my_jobs_activate_job_button, 'Deactivate selected job')
     return MyHTML.div_embedded([
         label_div,
         MyHTML.span(' '), value_div,
         MyHTML.span(' '), button_start, button_activate
     ],
                                inline=True)
Example #17
0
 def get_div_for_tab(self):
     children_list = [
         MyHTML.div_with_html_button_submit('my_switch_trading_mode_button',
                                            self.__get_switch_mode_button_text__(), hidden=''),
         MyHTML.div_with_dcc_drop_down(**self._dd_handler.get_drop_down_parameters(CDD.ORDER_MAXIMUM)),
         MyHTML.div_with_dcc_drop_down(**self._dd_handler.get_drop_down_parameters(CDD.SOUND_MACHINE)),
         MyHTML.div_with_dcc_drop_down(**self._dd_handler.get_drop_down_parameters(CDD.SMALL_PROFIT)),
         MyHTML.div_with_html_button_submit('my_reset_total_result_button',
                                            self.__get_reset_total_result_button_text__(), hidden=''),
         self.get_div_for_tables()
     ]
     return MyHTML.div('my_configuration_div', children_list)
 def get_div_for_tab(self):
     children_list = [
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 DBDD.TABLE, default_value=self._selected_table_name)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DBDD.LIMIT)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(DBDD.DATE_RANGE)),
         MyHTML.span('', margin_left=10),
         MyHTML.div_with_input(element_id=self._my_db_where_clause_input,
                               placeholder='Please enter where clause...',
                               size=500,
                               height=27),
         MyHTML.div(element_id=self._my_db_query),
         MyHTML.div_with_table(self._data_table_div,
                               self.__get_table_for_db__()),
         MyDCC.markdown(self._my_db_entry_markdown)
     ]
     return MyHTML.div('my_db_div', children_list)
 def get_div_for_tab(self):
     children_list = [
         MyHTMLTabLogHeaderTable().get_table(),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 LOGDD.LOG_TYPE, default_value=self._selected_log_type)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(LOGDD.PROCESS)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 LOGDD.PROCESS_STEP)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(LOGDD.DATE_RANGE)),
         MyHTML.div_with_html_button_submit(self._my_log_refresh_button,
                                            'Refresh',
                                            hidden=''),
         MyHTML.div_with_table(self._data_table_div,
                               self.__get_table_for_log__()),
         MyDCC.markdown(self._my_log_entry_markdown)
     ]
     return MyHTML.div('my_log_div', children_list)
Example #20
0
 def handle_callback_for_similar_sales_link_text(button_hidden: str):
     if button_hidden == 'hidden':
         return ''
     button_text = MyText.get_next_best_abbreviation(self._selected_similar_sale.title, 30)
     return MyHTML.button_submit('my_link_button', 'Open "{}"'.format(button_text), '')
 def _init_cells_(self):
     chart_label_div = MyHTML.div('my_pattern_statistics_chart_label_div', 'Chart:', True)
     chart_div = MyHTML.div('my_pattern_statistics_chart_type_div', '', False)
     statistics_label_div = MyHTML.div('my_pattern_statistics_label_div', 'Pattern:', True)
     statistics_div = MyHTML.div('my_pattern_statistics_div', '0')
     statistics_summary_div = MyHTML.div_embedded([statistics_label_div, MyHTML.span(' '), statistics_div])
     statistics_detail_label_div = MyHTML.div('my_pattern_statistics_detail_label_div', 'Type:', True)
     statistics_detail_div = MyHTML.div('my_pattern_statistics_detail_div', '0')
     statistics_detail_summary_div = MyHTML.div_embedded([statistics_detail_label_div, MyHTML.span(' '),
                                                          statistics_detail_div])
     self.set_value(1, 1, MyHTML.div_embedded([chart_label_div, MyHTML.span(' '), chart_div]))
     self.set_value(1, 2, MyDCC.markdown('my_pattern_statistics_markdown'))
     self.set_value(1, 3, MyHTML.div_embedded([statistics_summary_div, statistics_detail_summary_div]))
    def _init_cells_(self):
        crypto_client_label_div = MyHTML.div('my_models_crypto_client_label_div', 'Bitfinex:', bold=True)
        crypto_client_value_div = MyHTML.div('my_models_crypto_client_div', '0', bold=False)
        crypto_client_div = MyHTML.div_embedded([crypto_client_label_div, MyHTML.span(' '), crypto_client_value_div])

        stock_client_label_div = MyHTML.div('my_models_stock_client_label_div', 'IKBR:', bold=True)
        stock_client_value_div = MyHTML.div('my_models_stock_client_div', '0', bold=False)
        stock_client_div = MyHTML.div_embedded([stock_client_label_div, MyHTML.span(' '), stock_client_value_div])

        crypto_client_trades_label_div = MyHTML.div('my_models_crypto_client_trades_label_div',
                                                    'Trades (Bitfinex):', bold=True)
        crypto_client_trades_value_div = MyHTML.div('my_models_crypto_client_trades_div', '0', bold=False)
        crypto_client_trades_div = MyHTML.div_embedded([
            crypto_client_trades_label_div, MyHTML.span(' '), crypto_client_trades_value_div])

        stock_client_trades_label_div = MyHTML.div('my_models_stock_client_trades_label_div',
                                                    'Trades (IBKR):', bold=True)
        stock_client_trades_value_div = MyHTML.div('my_models_stock_client_trades_div', '0', bold=False)
        stock_client_trades_div = MyHTML.div_embedded([
            stock_client_trades_label_div, MyHTML.span(' '), stock_client_trades_value_div])

        self.set_value(1, 1, MyHTML.div_embedded([crypto_client_div, stock_client_div]))
        self.set_value(1, 2, MyDCC.markdown('my_models_statistics_markdown'))
        self.set_value(1, 3, MyHTML.div_embedded([crypto_client_trades_div, stock_client_trades_div]))
    def _init_cells_(self):
        chart_label_div = MyHTML.div('my_trade_statistics_chart_type_label_div', 'Chart:', True)
        chart_div = MyHTML.div('my_trade_statistics_chart_type_div', '', False)

        statistics_label_div = MyHTML.div('my_trade_statistics_label_div', 'Trades:', True)
        statistics_div = MyHTML.div('my_trade_statistics_div', '0 (+0/-0)')
        statistics_summary_div = MyHTML.div_embedded([statistics_label_div, MyHTML.span(' '), statistics_div])

        my_trades_number_label_div = MyHTML.div('my_trades_number_label_div', 'Trades (R/S):', True)
        my_trades_number_div = MyHTML.div('my_trades_number_div', '0/0 0/0')
        my_trades_number_summary_div = MyHTML.div_embedded(
            [my_trades_number_label_div, MyHTML.span(' '), my_trades_number_div])

        my_trades_mean_label_div = MyHTML.div('my_trades_mean_label_div', '...(mean %):', True)
        my_trades_mean_div = MyHTML.div('my_trades_mean_div', '0/0 0/0')
        my_trades_mean_summary_div = MyHTML.div_embedded(
            [my_trades_mean_label_div, MyHTML.span(' '), my_trades_mean_div])

        self.set_value(1, 1, MyHTML.div_embedded([chart_label_div, MyHTML.span(' '), chart_div]))
        self.set_value(1, 2, MyDCC.markdown('my_trade_statistics_markdown'))
        self.set_value(1, 3, MyHTML.div_embedded([statistics_summary_div, my_trades_number_summary_div,
                                                 my_trades_mean_summary_div]))
Example #24
0
 def get_div_for_tables(self):
     return MyHTML.div('my_configuration_tables_div', self.__get_tables_for_div__())
    def _init_cells_(self):
        user_label_div = MyHTML.div('my_user_label_div', 'Username:'******'my_user_name_div', 'Josef Sertl', False)
        date_str = MyDate.get_date_str_from_datetime(datetime.now())
        time_str = MyDate.get_time_from_datetime(datetime.now())
        login_label_div = MyHTML.div('my_login_label_div', 'Last login:'******'my_login_div', '{} {}'.format(date_str, time_str), False)
        sound_label_div = MyHTML.div('my_sound_label_div', 'Sound:', True, True)
        sound_div = MyHTML.div('my_sound_div', '', False)
        mode_label_div = MyHTML.div('my_mode_label_div', 'Mode:', True, True)
        mode_div = MyHTML.div('my_mode_div', '', False)
        max_buy_label_div = MyHTML.div('my_max_buy_label_div', 'Max buy value:', True, True)
        max_buy_div = MyHTML.div('my_max_buy_div', '', False)
        small_profit_label_div = MyHTML.div('my_small_profit_label_div', 'Small profit taking:', True, True)
        small_profit_div = MyHTML.div('my_small_profit_div', '', False)

        my_user_div = MyHTML.div_embedded([user_label_div, MyHTML.span(' '), user_div])
        my_login_div = MyHTML.div_embedded([login_label_div, MyHTML.span(' '), login_date_time_div])
        my_sound_div = MyHTML.div_embedded([sound_label_div, MyHTML.span(' '), sound_div])
        my_mode_div = MyHTML.div_embedded([mode_label_div, MyHTML.span(' '), mode_div])
        my_max_buy_div = MyHTML.div_embedded([max_buy_label_div, MyHTML.span(' '), max_buy_div])
        my_small_profit_div = MyHTML.div_embedded([small_profit_label_div, MyHTML.span(' '), small_profit_div])

        dash_board_title_div = MyHTML.div('my_dashboard_title_div', 'Pattern Detection Dashboard', inline=False)
        dash_board_sub_title_div = MyHTML.div('my_dashboard_sub_title_div', '', bold=False, color='red')

        time_label_div = MyHTML.div('my_time_label_div', 'Time:', True)
        time_value_div = MyHTML.div('my_time_div', '', False)
        time_div = MyHTML.div_embedded([time_label_div, MyHTML.span(' '), time_value_div])

        last_refresh_label_div = MyHTML.div('my_last_refresh_label_div', 'Last refresh:', True)
        last_refresh_time_div = MyHTML.div('my_last_refresh_time_div', time_str)
        next_refresh_label_div = MyHTML.div('my_next_refresh_label_div', 'Next refresh:', True)
        next_refresh_time_div = MyHTML.div('my_next_refresh_time_div', time_str)
        last_refresh_div = MyHTML.div_embedded([last_refresh_label_div, MyHTML.span(' '), last_refresh_time_div])
        next_refresh_div = MyHTML.div_embedded([next_refresh_label_div, MyHTML.span(' '), next_refresh_time_div])

        http_connection_label_div = MyHTML.div('my_http_connection_label_div', 'Connection:', True, True)
        http_connection_div = MyHTML.div('my_http_connection_div', MyHttpClient.get_status_message(), False)
        my_http_connection_div = MyHTML.div_embedded([http_connection_label_div, MyHTML.span(' '), http_connection_div])

        online_trade_label_div = MyHTML.div('my_online_trade_label_div', 'Trades - Online:', True)
        online_trade_active_div = MyHTML.div('my_online_trade_active_div', '0')
        online_trade_all_div = MyHTML.div('my_online_trade_all_div', '0')

        stored_trade_label_div = MyHTML.div('my_stored_trade_label_div', 'Trades - Replay:', True)
        stored_trade_div = MyHTML.div('my_stored_trade_div', '0')

        stored_pattern_label_div = MyHTML.div('my_stored_pattern_label_div', 'Pattern - Replay:', True)
        stored_pattern_div = MyHTML.div('my_stored_pattern_div', '0')

        trade_div = MyHTML.div_embedded([stored_trade_label_div, MyHTML.span(' '), stored_trade_div])
        pattern_div = MyHTML.div_embedded([stored_pattern_label_div, MyHTML.span(' '), stored_pattern_div])

        real_online_trade_label_div = MyHTML.div('my_real_online_trade_label_div', 'Trades - real:', True)
        real_online_trade_div = MyHTML.div('my_real_online_trade_div', '')
        simulation_online_trade_label_div = MyHTML.div('my_simulation_online_trade_label_div', 'Trades - simul.:', True)
        simulation_online_trade_div = MyHTML.div('my_simulation_online_trade_div', '')

        online_div = MyHTML.div_embedded([
            online_trade_label_div, MyHTML.span(' '),
            online_trade_active_div, MyHTML.span('/'), online_trade_all_div], inline=True)
        real_online_trade_div = MyHTML.div_embedded(
            [real_online_trade_label_div, MyHTML.span(' '), real_online_trade_div])
        simulation_online_trade_div = MyHTML.div_embedded(
            [simulation_online_trade_label_div, MyHTML.span(' '), simulation_online_trade_div])

        self.set_value(1, 1, MyHTML.div_embedded([my_user_div, my_login_div, my_sound_div,
                                                  my_mode_div, my_max_buy_div, my_small_profit_div]))
        self.set_value(1, 2, MyHTML.div_embedded([dash_board_title_div, dash_board_sub_title_div]))
        self.set_value(1, 3, MyHTML.div_embedded([time_div, next_refresh_div, last_refresh_div, my_http_connection_div]))
        self.set_value(2, 1, MyDCC.markdown('my_position_markdown'))
        self.set_value(2, 2, MyDCC.markdown('my_dashboard_markdown'))
        self.set_value(2, 3, MyHTML.div_embedded(
            [online_div, trade_div, pattern_div, real_online_trade_div, simulation_online_trade_div]))
Example #26
0
    def _init_cells_(self):
        online_label_div = MyHTML.div(self.my_search_online_label_div,
                                      'Online Search', True)
        online_value_div = MyHTML.div(self.my_search_online_value_div, '',
                                      False)

        found_label_div = MyHTML.div(self.my_search_found_label_div, 'Found:',
                                     True)
        found_valid_value_div = MyHTML.div(
            self.my_search_found_valid_value_div, '0')
        found_all_value_div = MyHTML.div(self.my_search_found_all_value_div,
                                         '0')

        found_div = MyHTML.div_embedded([
            found_label_div,
            MyHTML.span(' '), found_valid_value_div,
            MyHTML.span('/'), found_all_value_div
        ],
                                        inline=True)

        self.set_value(
            1, 1,
            MyHTML.div_embedded(
                [online_label_div,
                 MyHTML.span(' '), online_value_div]))
        self.set_value(1, 2, MyDCC.markdown(self.my_search_markdown))
        self.set_value(1, 3, MyHTML.div_embedded([found_div,
                                                  MyHTML.span(' ')]))
    def _init_cells_(self):
        user_label_div = MyHTML.div('my_user_label_div', 'Username:'******'my_user_name_div', 'Josef Sertl', False)
        time_str = MyDate.get_time_from_datetime(datetime.now())

        login_label_div = MyHTML.div('my_login_label_div', 'Last login:'******'my_login_div', '{}'.format(time_str), False)

        http_connection_label_div = MyHTML.div('my_http_connection_label_div', 'Connection:', True, True)
        http_connection_div = MyHTML.div('my_http_connection_div', MyHttpClient.get_status_message(), False)

        my_user_div = MyHTML.div_embedded([user_label_div, MyHTML.span(' '), user_div])
        my_login_div = MyHTML.div_embedded([login_label_div, MyHTML.span(' '), login_time_div])
        my_http_connection_div = MyHTML.div_embedded([http_connection_label_div, MyHTML.span(' '), http_connection_div])

        dash_board_title_div = MyHTML.div('my_dashboard_title_div', 'Salesman Dashboard', inline=False)
        dash_board_sub_title_div = MyHTML.div('my_dashboard_sub_title_div', '', bold=False, color='red')

        time_label_div = MyHTML.div('my_time_label_div', 'Time:', True)
        time_value_div = MyHTML.div('my_time_div', '', False)
        time_div = MyHTML.div_embedded([time_label_div, MyHTML.span(' '), time_value_div])

        last_refresh_label_div = MyHTML.div('my_last_refresh_label_div', 'Last refresh:', True)
        last_refresh_time_div = MyHTML.div('my_last_refresh_time_div', time_str)
        last_refresh_div = MyHTML.div_embedded([last_refresh_label_div, MyHTML.span(' '), last_refresh_time_div])

        next_refresh_label_div = MyHTML.div('my_next_refresh_label_div', 'Next refresh:', True)
        next_refresh_time_div = MyHTML.div('my_next_refresh_time_div', time_str)
        next_refresh_div = MyHTML.div_embedded([next_refresh_label_div, MyHTML.span(' '), next_refresh_time_div])

        sales_label_div = MyHTML.div('my_sales_label_div', 'My Sales:', True)
        sales_active_div = MyHTML.div('my_sales_active_div', '0')
        sales_all_div = MyHTML.div('my_sales_all_div', '0')

        similar_sales_label_div = MyHTML.div('my_similar_sales_label_div', 'Similar Sales:', True)
        similar_sales_div = MyHTML.div('my_similar_sales_div', '0')

        trade_div = MyHTML.div_embedded([similar_sales_label_div, MyHTML.span(' '), similar_sales_div])

        online_div = MyHTML.div_embedded([
            sales_label_div, MyHTML.span(' '),
            sales_active_div, MyHTML.span('/'), sales_all_div], inline=True)

        self.set_value(1, 1, MyHTML.div_embedded([my_user_div, my_login_div, my_http_connection_div]))
        self.set_value(1, 2, MyHTML.div_embedded([dash_board_title_div, dash_board_sub_title_div]))
        self.set_value(1, 3, MyHTML.div_embedded([time_div, next_refresh_div, last_refresh_div]))
        self.set_value(2, 1, self.__get_timer__())
        self.set_value(2, 2, MyDCC.markdown('my_dashboard_markdown'))
        self.set_value(2, 3, MyHTML.div_embedded([online_div, trade_div]))
 def get_div_for_tab(self):
     children_list = [
         MyHTMLTabPortfolioHeaderTable().get_table(),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 PODD.PERIOD_AGGREGATION,
                 default_value=self.sys_config.period_aggregation)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 PODD.REFRESH_INTERVAL, default_value=900)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(
                 PODD.SECOND_GRAPH_RANGE)),
         MyHTML.div_with_dcc_drop_down(
             **self._dd_handler.get_drop_down_parameters(PODD.INDICATOR)),
         MyHTML.div_with_button(
             **self._button_handler.get_button_parameters(
                 PFBTN.RESET_PORTFOLIO_SELECTION)),
         MyHTML.div_with_html_button_submit('my_portfolio_refresh_button',
                                            'Refresh'),
         MyHTML.div_with_html_button_submit(
             'my_portfolio_active_manage_button',
             self.__get_position_manage_button_text__()),
         MyHTML.div_with_table(self._data_table_div,
                               self.__get_table_for_portfolio__()),
         MyHTML.div('my_graph_portfolio_position_div'),
         MyHTML.div('my_graph_portfolio_position_second_div')
     ]
     return MyHTML.div('my_portfolio_div', children_list)
Example #29
0
    def _init_cells_(self):
        id_label_div = MyHTML.div(self.my_sales_id_label_div, 'Sale ID:', True)
        id_value_div = MyHTML.div(self.my_sales_id_value_div, '', False)

        found_label_div = MyHTML.div(self.my_sales_found_label_div,
                                     'Available:', True)
        found_valid_value_div = MyHTML.div(self.my_sales_found_valid_value_div,
                                           '0')
        found_all_value_div = MyHTML.div(self.my_sales_found_all_value_div,
                                         '0')

        found_div = MyHTML.div_embedded([
            found_label_div,
            MyHTML.span(' '), found_valid_value_div,
            MyHTML.span('/'), found_all_value_div
        ],
                                        inline=True)

        self.set_value(
            1, 1,
            MyHTML.div_embedded([id_label_div,
                                 MyHTML.span(' '), id_value_div]))
        self.set_value(1, 2, MyDCC.markdown(self.my_sales_markdown))
        self.set_value(1, 3, MyHTML.div_embedded([found_div,
                                                  MyHTML.span(' ')]))
Example #30
0
 def get_table_as_div(self):
     return MyHTML.div(self.div_id, [self.get_table()])