<commit_before>@extends('layout.main')
@section('header-script')
	<script>
		var userid = '{{$userid}}';
		var appcode = '{{$appcode}}';

		function onPageLoad(fn) {
			if (window.addEventListener)
				window.addEventListener('load', fn, false);
			else if (window.attachEvent)
				window.attachEvent('onload', fn);
		}

		function throttle(fn, delay) {
			var timer = null;
			return function () {
				var context = this, args = arguments;
				clearTimeout(timer);
				timer = setTimeout(function () {
					fn.apply(context, args);
				}, delay);
			};
		}

		var _helper = {
			notification: {
				error: function (err, options) {

					options = options || {};
					options.type = 'danger';
					options.timer = 3000;
					options.placement = {
						from: 'top',
						align: 'right'
					};

					$.notify({
						icon: "pe-7s-attention",
						message: err
					}, options);
				},
				success: function (message, options) {
					options = options || {};
					options.type = 'success';
					options.timer = 3000;
					options.placement = {
						from: 'top',
						align: 'right'
					};

					$.notify({
						icon: "pe-7s-check",
						message: message
					}, options);
				}
			}
		}
	</script>

	<script>
		window.odometerOptions = {
			duration: 350
		};

		function update_action_count() {
			var data = websock.data[appcode].action_count;
			if (odometer.length !== undefined) {
				for (var i in odometer) if (odometer.hasOwnProperty(i))odometer[i].innerHTML = data;
			}
			else odometer.innerHTML = parseInt(data);
		}

		//websock.appChange(appcode, 'action_count', update_action_count);
		//update_action_count();
	</script>
@endsection
@section('body')

<div class="wrapper">
    <div class="sidebar main_sidebar" data-color="blue" data-image="/img/sidebar-4.jpg">
        <!--   you can change the color of the sidebar using: data-color="blue | azure | green | orange | red | purple" -->
        <div class="sidebar-wrapper">
            <div class="logo">
                <a class="simple-text" href="{{ URL::to('/') }}">
                    <img src="{{ asset('img/meotrics_logo.png') }}"    style="width: 150px; margin-left: 14px;"/>
                    {{--<span class="logo-text"></span>--}}
                </a>
            </div>
            <ul class="nav">
                <li class="{{ Route::getCurrentRoute()->getPath() == 'home' ? 'active' : '' }}">
                    <a href="/dashboard/{{ $appcode }}">
                        <i class="pe-7s-graph"></i>
                        <p>Dashboard</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'trend' ? 'active' : '' }}">
                    <a href="/trend/{{$appcode}}">
                        <i class="pe-7s-graph1"></i>
                        <p>Trend</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'segment' ? 'active' : '' }}">
                    <a href="/segment/{{$appcode}}">
                        <i class="pe-7s-users"></i>
                        <p>Segmentation</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'funnel' ? 'active' : '' }}">
                    <a href="/funnel/{{$appcode}}">
                        <i class="pe-7s-filter"></i>
                        <p>Funnel</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'revenue' ? 'active' : '' }}">
                    <a href="/revenue/{{$appcode}}">
                        <i class="pe-7s-cash"></i>
                        <p>Revenue</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'marketing' ? 'active' : '' }}">
                    <a href="/marketing/{{$appcode}}">
                        <i class="pe-7s-graph3"></i>
                        <p>Marketing Campaign</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'insight' ? 'active' : '' }}">
                    <a href="/insight/{{$appcode}}">
                        <i class="pe-7s-user"></i>
                        <p>User Profile</p>
                    </a>
                </li>

                <!-- <li class="user-area">
                        <ul class="media-list" style="margin-left: 10px; margin-top: 10px;">
                                <li class="media">
                                        <div class="media-left">
                                                <a href="#">
                                                        <img class="media-object" width="40px" src="/img/user.png" alt="">
                                                </a>
                                        </div>
                                        <div class="media-body">
                                                <h5 style="color:white;" class="media-heading">thanhpk</h5>
                                                <a class="small" href="/auth/default/view?id=4">profile</a>
                                                &nbsp; &nbsp;
                                                <a class="small" href="/auth/logout" data-method="get">logout</a>
                                                <a class="small" href="/actiontype" data-method="get">action type</a>
                                        </div>
                                </li>
                        </ul>
                </li> -->
            </ul>
        </div>
    </div>

    <div class="main-panel">
        <nav class="navbar navbar-default navbar-fixed">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <div class="collapse navbar-collapse" style="padding-left: 0">
                    <ul class="nav navbar-nav navbar-left">
                        @yield('action')
                    </ul>

                    <ul class="nav navbar-nav navbar-right">
                        <li class="hidden">
                            <a href="#">
                                <span class="vam">Action count:</span>
                                <span id="odometer" class="vam id_counter odometer"></span>
                            </a>
                        </li>
                        
                        <li class="dropdown" style="margin-top:6px;margin-bottom: 6px">
                            <a href="#" class="button action blue button-radius-mini"
                               data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                <span class="label limit-char font-mini" style="padding: 0px!important;margin-top:5px">{{ $appname }}</span>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu" style="min-width: 137px;">
                                @if(count($apps) !=0)
                                @foreach($apps as $ap)
                                @if($ap->code != $appcode)
                                <li><a href="/dashboard/{{$ap->code }}"> {{$ap->name}}</a></li>
                                @endif
                                @endforeach
                                @endif
                                <li  >
                                    {{--<a href="#" class="blue" data-toggle="modal" data-target="#addModal">Track new app</a>--}}
                                    <button type="button" class="action button blue" data-toggle="modal" data-target="#addModal" style="width: 100%">
                                        <span class="label" data-toggle="modal" data-target="#addModal">Track new app</span>
                                    </button>
                                </li>
                            </ul><commit_msg>Fix bug change UI<commit_after>@extends('layout.main')
@section('header-script')
	<script>
		var userid = '{{$userid}}';
		var appcode = '{{$appcode}}';

		function onPageLoad(fn) {
			if (window.addEventListener)
				window.addEventListener('load', fn, false);
			else if (window.attachEvent)
				window.attachEvent('onload', fn);
		}

		function throttle(fn, delay) {
			var timer = null;
			return function () {
				var context = this, args = arguments;
				clearTimeout(timer);
				timer = setTimeout(function () {
					fn.apply(context, args);
				}, delay);
			};
		}

		var _helper = {
			notification: {
				error: function (err, options) {

					options = options || {};
					options.type = 'danger';
					options.timer = 3000;
					options.placement = {
						from: 'top',
						align: 'right'
					};

					$.notify({
						icon: "pe-7s-attention",
						message: err
					}, options);
				},
				success: function (message, options) {
					options = options || {};
					options.type = 'success';
					options.timer = 3000;
					options.placement = {
						from: 'top',
						align: 'right'
					};

					$.notify({
						icon: "pe-7s-check",
						message: message
					}, options);
				}
			}
		}
	</script>

	<script>
		window.odometerOptions = {
			duration: 350
		};

		function update_action_count() {
			var data = websock.data[appcode].action_count;
			if (odometer.length !== undefined) {
				for (var i in odometer) if (odometer.hasOwnProperty(i))odometer[i].innerHTML = data;
			}
			else odometer.innerHTML = parseInt(data);
		}

		//websock.appChange(appcode, 'action_count', update_action_count);
		//update_action_count();
	</script>
@endsection
@section('body')

<div class="wrapper">
    <div class="sidebar main_sidebar" data-color="blue" data-image="/img/sidebar-4.jpg">
        <!--   you can change the color of the sidebar using: data-color="blue | azure | green | orange | red | purple" -->
        <div class="sidebar-wrapper">
            <div class="logo">
                <a class="simple-text" href="{{ URL::to('/') }}">
                    <img src="{{ asset('img/meotrics_logo.png') }}"    style="width: 150px; margin-left: 14px;"/>
                    {{--<span class="logo-text"></span>--}}
                </a>
            </div>
            <ul class="nav">
                <li class="{{ Route::getCurrentRoute()->getPath() == 'home' ? 'active' : '' }}">
                    <a href="/dashboard/{{ $appcode }}">
                        <i class="pe-7s-graph"></i>
                        <p>Dashboard</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'trend' ? 'active' : '' }}">
                    <a href="/trend/{{$appcode}}">
                        <i class="pe-7s-graph1"></i>
                        <p>Trend</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'segment' ? 'active' : '' }}">
                    <a href="/segment/{{$appcode}}">
                        <i class="pe-7s-users"></i>
                        <p>Segmentation</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'funnel' ? 'active' : '' }}">
                    <a href="/funnel/{{$appcode}}">
                        <i class="pe-7s-filter"></i>
                        <p>Funnel</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'revenue' ? 'active' : '' }}">
                    <a href="/revenue/{{$appcode}}">
                        <i class="pe-7s-cash"></i>
                        <p>Revenue</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'marketing' ? 'active' : '' }}">
                    <a href="/marketing/{{$appcode}}">
                        <i class="pe-7s-graph3"></i>
                        <p>Marketing Campaign</p>
                    </a>
                </li>
                <li class="{{ Route::getCurrentRoute()->getPath() == 'insight' ? 'active' : '' }}">
                    <a href="/insight/{{$appcode}}">
                        <i class="pe-7s-user"></i>
                        <p>User Profile</p>
                    </a>
                </li>

                <!-- <li class="user-area">
                        <ul class="media-list" style="margin-left: 10px; margin-top: 10px;">
                                <li class="media">
                                        <div class="media-left">
                                                <a href="#">
                                                        <img class="media-object" width="40px" src="/img/user.png" alt="">
                                                </a>
                                        </div>
                                        <div class="media-body">
                                                <h5 style="color:white;" class="media-heading">thanhpk</h5>
                                                <a class="small" href="/auth/default/view?id=4">profile</a>
                                                &nbsp; &nbsp;
                                                <a class="small" href="/auth/logout" data-method="get">logout</a>
                                                <a class="small" href="/actiontype" data-method="get">action type</a>
                                        </div>
                                </li>
                        </ul>
                </li> -->
            </ul>
        </div>
    </div>

    <div class="main-panel">
        <nav class="navbar navbar-default navbar-fixed">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <div class="collapse navbar-collapse" style="padding-left: 0">
                    <ul class="nav navbar-nav navbar-left">
                        @yield('action')
                    </ul>

                    <ul class="nav navbar-nav navbar-right">
                        <li class="hidden">
                            <a href="#">
                                <span class="vam">Action count:</span>
                                <span id="odometer" class="vam id_counter odometer"></span>
                            </a>
                        </li>
                        
                        <li class="dropdown" style="margin-top:6px;margin-bottom: 6px">
                            <a href="#" class="button action blue button-radius-mini"
                               data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                <span class="label limit-char font-mini current-appname" style="padding: 0px!important;margin-top:5px">{{ $appname }}</span>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu" style="min-width: 137px;">
                                @if(count($apps) !=0)
                                @foreach($apps as $ap)
                                @if($ap->code != $appcode)
                                <li><a href="/dashboard/{{$ap->code }}"> {{$ap->name}}</a></li>
                                @endif
                                @endforeach
                                @endif
                                <li  >
                                    {{--<a href="#" class="blue" data-toggle="modal" data-target="#addModal">Track new app</a>--}}
                                    <button type="button" class="action button blue" data-toggle="modal" data-target="#addModal" style="width: 100%">
                                        <span class="label" data-toggle="modal" data-target="#addModal">Track new app</span>
                                    </button>
                                </li>
                            </ul>
{'fraction_non_alphanumeric': 0.16004533524218564, 'fraction_numerical': 0.005965163445478406, 'mean_word_length': 1.1823743816714398, 'pattern_counts': {'":': 0, '<': 293, '<?xml version=': 0, '>': 313, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 56, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2006269', 'n_tokens_mistral': 4851, 'n_tokens_neox': 4244, 'n_words': 833}