<div class="row">
	<div class="col-md-12">
		<!-- <div id="explorer" style="padding: 20px;"></div> -->
		<div class="panel panel-inverse" data-sortable-id="form-stuff-3">
             <div class="panel-heading">
                 <h4 class="panel-title">Data Extraction</h4>
             </div>
             <div class="panel-body">
                 <fieldset>
                     <div class="form-group">
                         <label for="Analysis_Type">Analysis Type *</label>
                         <select class="analysis_type form-control" ng-model="explore.analysis_type" ng-change="changeAnalyseType();">
                             <option value="sum" selected>Sum</option>
                             <option value="count">Count</option>
                             <option value="count_unique">Count Unique</option>
                             <option value="minimum">Minimum</option>
                             <option value="maximum">Maximum</option>
                             <option value="average">Average</option>
                             <option value="select_unique">Select Unique</option>
                             <option value="extraction">Raw Data</option>
                             <!-- <option value="funnel">Funnel</option> -->
                         </select>
                     </div>
                     <div class="form-group">
                         <label for="Events_collections">Events collections *</label>
                         <select class="event_lists form-control" ng-model="explore.event">
                                <option ng-repeat="event in eventList" ng-value="event.event">{{event.event}}</option>
                         </select>
                     </div>
                     <div class="form-group">
                     	 <label for="exampleInputEmail1">Timeframe</label>
                     </div>
                      <div class="form-group">
                      	<div class="col-md-6">
                      		<div class="col-md-6">
                                <div class="input-group date" id="start_date" data-date-format="dd-mm-yyyy">
                                    <input type="text" class="form-control" placeholder="Select Date" ng-model="explore.startDate">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <select class="start_time_list form-control" ng-model="explore.startTime">
	                                 <option ng-repeat="time in timeList" ng-value="time.time">{{time.time}}</option>
	                         </select>
                            </div>
                      	</div>
                     	<div class="col-md-6">
                     		<div class="col-md-6">
                                <div class="input-group date" id="end_date" data-date-format="dd-mm-yyyy">
                                    <input type="text" class="form-control" placeholder="End Date" ng-model="explore.endDate">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </div>
                            <div class="col-md-6">
                                 <select class="end_time_list form-control" ng-model="explore.endTime">
	                                 <option ng-repeat="time in timeList" ng-value="time.time">{{time.time}}</option>
	                         </select>
                            </div>
                     	</div>
                     </div>
                     <div class="form-group">
                     	 <label for="exampleInputEmail1">&nbsp;</label>
                     </div>
                     <div class="form-group" ng-show="isTarget">
                         <label for="exampleInputEmail1">Target Property</label>
                         <select class="target_property form-control" ng-model="explore.target_property">
                          	<option value="" selected>None</option>
                             <option value="key">Event</option>
                             <option value="did">Device ID</option>
                             <option value="context.who.device.p">Platform</option>
                             <option value="context.who.device.av">App Version</option>
                             <option value="context.who.refname">Source</option>
                         </select>
                     </div>
                     <div class="form-group" ng-show="isGroup">
                         <label for="exampleInputEmail1">Group By</label>
                         <select class="target_property form-control" ng-model="explore.group_by">
                         	 <option value="" selected>None</option>
                             <option value="key">Event</option>
                             <option value="did">Device ID</option>
                             <option value="context.who.device.p">Platform</option>
                             <option value="context.who.device.av">App Version</option>
                             <option value="context.who.refname">Source</option>
                          </select>
                     </div>
                     <!-- <div class="form-group">
                         <label for="exampleInputEmail1">Filters</label>
                         <div class="col-md-4">
                             <select class="form-control">
                                 <option>1</option>
                                 <option>2</option>
                                 <option>3</option>
                                 <option>4</option>
                                 <option>5</option>
                             </select>
                         </div>
                     </div> -->
                    <!--  <div class="form-group">
                         <label for="exampleInputEmail1">Filters</label>
                         <input type="text" class="form-control" id="exampleInputPassword1" placeholder="Group by">
                     </div> -->
                 </fieldset>
             </div>
         </div>
		<div class="panel panel-inverse" data-sortable-id="form-stuff-3">
             <div class="panel-body">
                 <fieldset>
                     <div class="form-group">
                        <legend class="pull-left width-full">Explore Data</legend>
                     </div>
                     <div class="form-group">
                         <div style="height:250px; overflow:auto; width:100%;" id="exploreData"></div>
                     </div>
                     <legend class="pull-left width-full"></legend>
                     <div class="form-group" ng-if="isError">
                         <div style="color:red;">{{error}}</div>
                     </div>
                     
                     <button type="submit" class="btn btn-sm btn-primary m-r-5" ng-click="execute();">{{action}}</button>
                     <a id="downloadAnchorElem" class="btn btn-sm btn-primary m-r-5 pull-right" ng-click="download();" ng-show="isDownload">Download</a>
                 </fieldset>
             </div>
         </div>
	</div>
</div>