-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from charangirijala/homepage
Homepage
- Loading branch information
Showing
19 changed files
with
552 additions
and
325 deletions.
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<div class={isHome}> | ||
<div class="slds-grid"> | ||
<div class="slds-col slds-size_1-of-3"> | ||
<main-log-file-processor></main-log-file-processor> | ||
</div> | ||
<div class="slds-col slds-size_2-of-3 slds-var-p-left_x-small"> | ||
<ui-paste-log></ui-paste-log> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { LightningElement } from 'lwc'; | ||
import { subscribe } from 'services/pubsub'; | ||
|
||
export default class AppHome extends LightningElement { | ||
activeApp = 'Home'; | ||
appChannelSub = null; | ||
connectedCallback() { | ||
if (!this.appChannelSub) { | ||
this.appChannelSub = subscribe('appChannel', (data) => { | ||
this.activeApp = data.activeApp; | ||
console.log('activeApp: ', this.activeApp); | ||
}); | ||
} | ||
} | ||
get isHome() { | ||
return this.activeApp === 'Home' ? '' : 'slds-hide'; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class={isLogViewer}> | ||
<main-log-viewer></main-log-viewer> | ||
</div> | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { LightningElement } from 'lwc'; | ||
import { subscribe } from 'services/pubsub'; | ||
export default class AppLogViewer extends LightningElement { | ||
activeApp; | ||
appChannelSub = null; | ||
connectedCallback() { | ||
if (!this.appChannelSub) { | ||
this.appChannelSub = subscribe('appChannel', (data) => { | ||
this.activeApp = data.activeApp; | ||
// console.log('activeApp: ', this.activeApp); | ||
}); | ||
} | ||
} | ||
get isLogViewer() { | ||
return this.activeApp === 'Log Viewer' ? '' : 'slds-hide'; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.nav-item { | ||
color: rgb(24, 24, 24); | ||
} | ||
|
||
img { | ||
width: 37px; | ||
} | ||
a { | ||
text-decoration: none !important; | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,5 @@ | |
</div> | ||
</div> | ||
</div> | ||
<!-- <c-app-content></c-app-content> --> | ||
<my-app-content></my-app-content> | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:host { | ||
--slds-c-textarea-sizing-min-height: 16rem; | ||
} | ||
|
||
.btn-container { | ||
justify-content: end; | ||
} | ||
|
||
.clear-btn { | ||
color: #747474; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<template> | ||
<article class="slds-card"> | ||
<div class="slds-card__header slds-grid"> | ||
<header | ||
class="slds-media slds-media_center slds-has-flexi-truncate" | ||
> | ||
<div class="slds-media__figure"> | ||
<span | ||
class="slds-icon_container slds-icon-standard-account" | ||
title="Paste Debug Logs" | ||
> | ||
<svg | ||
class="slds-icon slds-icon_small" | ||
aria-hidden="true" | ||
> | ||
<use | ||
xlink:href="/public/assets/icons/standard-sprite/svg/symbols.svg#display_text | ||
" | ||
></use> | ||
</svg> | ||
</span> | ||
</div> | ||
<div class="slds-media__body"> | ||
<h2 class="slds-card__header-title"> | ||
<a | ||
href="#" | ||
class="slds-card__header-link slds-truncate" | ||
title="Paste Debug Logs" | ||
> | ||
<span>Paste Debug Logs</span> | ||
</a> | ||
</h2> | ||
</div> | ||
</header> | ||
</div> | ||
<div class="slds-card__body slds-card__body_inner"> | ||
<div class="slds-form-element"> | ||
<div class="slds-form-element__control"> | ||
<textarea | ||
placeholder="Paste log here..." | ||
class="slds-textarea" | ||
onchange={handleLogChange} | ||
></textarea> | ||
</div> | ||
</div> | ||
<div class="slds-grid btn-container"> | ||
<button | ||
class="slds-button slds-button_neutral clear-btn" | ||
onclick={clearLog} | ||
> | ||
<svg | ||
class="slds-button__icon slds-button__icon_left" | ||
aria-hidden="true" | ||
> | ||
<use | ||
xlink:href="/public/assets/icons/utility-sprite/svg/symbols.svg#clear" | ||
></use> | ||
</svg> | ||
Clear Log | ||
</button> | ||
<button | ||
class="slds-button slds-button_outline-brand analyze-btn" | ||
onclick={analyzeLog} | ||
> | ||
<svg | ||
class="slds-button__icon slds-button__icon_left" | ||
aria-hidden="true" | ||
> | ||
<use | ||
xlink:href="/public/assets/icons/utility-sprite/svg/symbols.svg#service_report" | ||
></use></svg | ||
>Analyze Log | ||
</button> | ||
</div> | ||
</div> | ||
</article> | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
import { publish, subscribe } from 'services/pubsub'; | ||
|
||
export default class PasteLog extends LightningElement { | ||
logText; | ||
|
||
handleLogChange(event) { | ||
// console.log('event', event.target.value); | ||
this.logText = event.target.value; | ||
} | ||
clearLog() { | ||
this.logText = ''; | ||
this.template.querySelector('textarea').value = ''; | ||
publish('logtext', []); | ||
} | ||
|
||
analyzeLog() { | ||
if (this.logText !== null && this.logText !== '') { | ||
const logData = this.logText.split(/\r\n|\n/); | ||
console.log('paste data length: ', logData.length); | ||
publish('logtext', logData); | ||
} | ||
} | ||
} |
This file contains 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
Oops, something went wrong.