This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| doInit : function(component, event, helper) { | |
| helper.fetchNewsData(component, event, helper); | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="Covid19_IND_TrackerController" access="global"> | |
| <aura:attribute name="newsData" type="Object"/> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
| <div class="slds-grid"> | |
| <div class="slds-col slds-size--12-of-12"> | |
| <div aura:id="new_content" style="padding:20px;"> | |
| <aura:iteration items="{!v.newsData}" var="news" > | |
| <div class="contain" > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class JsonNewWrapper{ | |
| @AuraEnabled | |
| public String status; | |
| @AuraEnabled | |
| public Integer totalResults; | |
| @AuraEnabled | |
| public List<Articles> articles; | |
| public class Articles { | |
| @AuraEnabled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class covid19DataParser { | |
| @AuraEnabled | |
| public List<Cases_time_series> cases_time_series; | |
| @AuraEnabled | |
| public List<Key_values> key_values; | |
| @AuraEnabled | |
| public List<Statewise> statewise; | |
| @AuraEnabled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Covid19_IND_TrackerController { | |
| @AuraEnabled | |
| public static covid19DataParser fecthCovid19Data(){ | |
| string baseURL='https://api.covid19india.org/data.json'; | |
| HttpRequest reqest = new HttpRequest(); | |
| reqest.setEndpoint(baseURL); | |
| reqest.setMethod('GET'); | |
| reqest.setHeader('Accept','application/json'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .THIS #one__item{ | |
| font-size:20px; | |
| } | |
| .THIS #two__item{ | |
| font-size:20px; | |
| } | |
| .THIS #three__item{ | |
| font-size:20px; | |
| } | |
| .THIS #four__item{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| COLUMNS:[ | |
| {label: 'STATE/UT', fieldName: 'STATEUT', type: 'text'}, | |
| {label: 'CNFMD', fieldName: 'CNFMD_CASE', | |
| type: 'number', | |
| sortable: true, | |
| cellAttributes: { alignment: 'left' }}, | |
| {label: 'ACTIVE', fieldName: 'ACTIVE_CASE', type: 'text'}, | |
| {label: 'RCVRD', fieldName: 'RCVRD_CASE', type: 'text'}, | |
| {label: 'DECEASED', fieldName: 'DEATH', type: 'text'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| doInit : function(component, event, helper) { | |
| helper.fetchData(component,event,helper); | |
| helper.setColumns(component); | |
| helper.setData(component); | |
| }, | |
| handleSort: function(component, event, helper) { | |
| helper.handleSort(component, event); | |
| }, | |
| // this function automatic call by aura:waiting event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="Covid19_IND_TrackerController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
| <aura:attribute name="total" type="String"/> | |
| <aura:attribute name="confirmed" type="String"/> | |
| <aura:attribute name="active" type="String"/> | |
| <aura:attribute name="recovered" type="String"/> | |
| <aura:attribute name="deaths" type="String"/> | |
| <!-- attributes --> | |
| <aura:attribute name="sortDirection" type="String" default="asc" /> | |
| <aura:attribute name="defaultSortDirection" type="String" default="asc" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LightningMapCntrl { | |
| @AuraEnabled | |
| public static List<Account> fetchAllAccounts(){ | |
| List<Account> accList = [Select Id,Name,Website,BillingCity,BillingStreet,BillingPostalCode,BillingState,BillingCountry from Account ]; | |
| return accList; | |
| } | |
| } |