• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF unknown KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16export const SpAiAnalysisPageHtml = `
17<div class="chatBox">
18        <h3 class="chatTitle" style="color:#35a1db">
19            HiSmartPerf AI助手
20        </h3>
21        <div class="contentWindow">
22            <div class="ask_question">
23                <div class="q_a_window">
24                    <div class="aiMessage message">
25                        <div class="aiHeader headerDiv">
26                            <img src="img/logo.png" class="headerImg"/>
27                        </div>
28                        <div class="systemSay">
29                            有什么可以帮助您吗?
30                        </div>
31                        <div class="clear"></div>
32                    </div>
33                </div>
34            <div class="chatInputBox">
35                <div class="chatConfig">
36                    <div class="right-box">
37                        <div class="history">
38                            <img src="img/history.png" style="margin-right: 10px;"/>
39                            <div class="config-tip hisTip">
40                                历史记录
41                            </div>
42                        </div>
43                        <div class="newChat">
44                            <img src="img/new_chat.png"/>
45                            <div class="config-tip">
46                                新建聊天
47                            </div>
48                        </div>
49                    </div>
50                </div>
51                <div class="chatInput">
52                    <textarea class="inputText" placeholder="请输入消息"></textarea>
53                    <img src="img/send.png" class="sendImg">
54                </div>
55            </div>
56            </div>
57            <div class="report_details">
58                <div class="selectionBox">
59                     <div class="startBox">
60                        <div class="timeTip"></div>
61                        startTime:
62                        <span class="startTime"></span>
63                    </div>
64                    <div class="endBox">
65                        <div class="timeTip"></div>
66                        endTime:
67                        <span class="endTime"></span>
68                    </div>
69                </div>
70                <div class="analysisList">
71                    <div class="analysis-header">
72                        <h4
73                            style="text-align: center;background-color: white;padding: 10px 0px;color: #35a1db;border-radius:2px;margin:0">
74                            诊断报告
75                        </h4>
76                    </div>
77                    <lit-table id="tb-contents">
78                        <lit-table-column class="cpu-fre-column" width="40px" title="序号" data-index="id" key="id" align="flex-start">
79                        </lit-table-column>
80                        <lit-table-column class="cpu-fre-column" width="1fr" title="问题类型" data-index="type" key="type" align="flex-start">
81                        </lit-table-column>
82                        <lit-table-column class="cpu-fre-column" width="1fr" title="问题原因" data-index="description" key="description" align="flex-start">
83                        </lit-table-column>
84                    </lit-table>
85                    <div class="data-record"></div>
86                    <div class="tips-content">
87                        <div class="no-data">
88                            <img src="img/nodata.png" />
89                            <div style="text-align: center;">
90                                暂无数据
91                            </div>
92                        </div>
93                    </div>
94                </div>
95                <div class="report-button">
96                    <div class="analysisBtn button">
97                        一键诊断
98                    </div>
99                    <div class="downloadBtn button" style="display: none;">报告下载</div>
100                </div>
101            </div>
102        </div>
103    </div>
104    <div class="rightTabBar">
105        <lit-icon name='close' size = '18' style='position: absolute; top: 12px; right: 17px; cursor: pointer;'></lit-icon>
106        <div class="chatBar active">
107            <img src="img/talk_active.png" class="chatInon"/>
108            <div class="chatBarTitle">聊天</div>
109        </div>
110        <div class="report">
111            <img src="img/report.png" class="chatInon"/>
112            <div class="chatBarTitle">诊断</div>
113        </div>
114    </div>
115    <div class="tipsContainer" style="display:none;"></div>
116    <style>
117    .q_a_window{
118        height: 75%;
119        overflow-y: auto;
120        padding-right: 10px;
121    }
122    .mixedText{
123        text-align: center;
124    }
125    .textTips{
126        font-size: 14px;
127        height: 45px;
128        line-height: 45px;
129        background-color: #dff4fd;
130        padding: 0 10px;
131        border: 1px solid #35a1db;
132        border-radius: 10px;
133    }
134    .tipsContainer{
135        display: flex;
136        justify-content: center;
137        align-items: center;
138        width: 90%;
139        height: 50%;
140        position: absolute;
141        top: 23%;
142        left: 45%;
143        transform: translateX(-50%);
144        background-color: sky-blue;
145    }
146    .report_details {
147        width: 100%;
148        height: 100%;
149        display: none;
150        position: relative;
151    }
152
153    .report-button {
154        position: absolute;
155        bottom: 0;
156        right: 0;
157    }
158
159    .usersay {
160        max-width: 70%;
161        background: rgb(229,246,255);
162        border-radius: 4px;
163        float: right;
164        line-height: 20px;
165        text-overflow: ellipsis;
166        word-break: break-all;
167        display: -webkit-box;
168        -webkit-box-orient: vertical;
169        font-size: 12px;
170        padding: 5px 10px;
171        margin-top: 10px;
172        margin-right: 10px;
173        position: relative;
174        text-align: justify;
175        color: #000;
176        border: 1px solid #c4ebf5;
177        border-radius: 9px;
178        border-top-right-radius: 0px;
179    }
180
181    .tips-content {
182        display: flex;
183        flex-direction: column;
184        justify-content: center;
185        align-items: center;
186        height: 90%;
187    }
188
189    #tb-contents {
190        box-shadow: 0px 2px 5px #bfbfbf;
191        margin-bottom: 5px;
192        margin-top: 1px;
193        border-radius: 7px;
194        font-size: 14px
195    }
196
197    .systemSay {
198        max-width: 70%;
199        border-radius: 4px;
200        background-color: rgb(249,250,252);
201        float: left;
202        line-height: 20px;
203        text-overflow: ellipsis;
204        word-break: break-all;
205        display: -webkit-box;
206        -webkit-box-orient: vertical;
207        font-size: 12px;
208        padding: 5px 10px;
209        margin-top: 10px;
210        position: relative;
211        text-align: justify;
212        color: #000;
213        border: 0.5px solid #eaeaea;
214        border-radius: 0 10px 10px 10px;
215    }
216
217    .chatBox {
218        height: 100%;
219        padding-left: 5px;
220        padding-bottom: 10px;
221        padding-right: 40px;
222    }
223
224    .chatTitle {
225        margin: 0;
226        height: 50px;
227        line-height: 50px;
228    }
229
230    .contentWindow {
231        height: 92%;
232        padding: 0 10px 20px 10px;
233        border-radius: 10px;
234        position: relative;
235        background: rgba(235, 235, 235, 0)
236    }
237
238    .ask_question {
239        overflow-y: auto;
240        position: relative;
241        overflow-x:hidden;
242        height: 100%;
243    }
244
245    .ask_question pre code {
246        white-space: pre-wrap;
247        overflow-wrap: break-word;
248        max-width: 100%;
249        font-family: auto;
250    }
251
252    .msgdiv pre code {
253        white-space: pre-wrap;
254        overflow-wrap: break-word;
255        max-width: 100%;
256        font-family: auto;
257    }
258
259    .chatConfig {
260        width: 100%;
261        height: 30px;
262        position: relative;
263        margin-top: 10px;
264        padding-bottom: 5px;
265        border-top: 1px solid rgba(255, 255, 255, .3);
266    }
267
268    .chatConfig img {
269        width: 20px;
270    }
271
272    .chatConfig img:hover+.config-tip {
273        display: block;
274    }
275
276    .chatInput {
277        position: relative;
278        width: 100%;
279        height: 125px;
280        border-radius: 10px;
281        text-align: justify;
282    }
283
284    .right-box {
285        position: absolute;
286        display: flex;
287        right: 25px;
288        top: 10px;
289    }
290
291    .history,
292    .newChat {
293        position: relative;
294    }
295
296    .config-tip {
297        background-color: rgba(0, 0, 0, .8);
298        padding: 5px 10px;
299        color: #fff;
300        position: absolute;
301        top: -30px;
302        left: -24px;
303        border-radius: 5px;
304        width: 52px;
305        text-align: center;
306        font-size: 12px;
307        z-index: 9999;
308        display: none;
309    }
310
311    .message {
312        width: 100%;
313    }
314
315    .inputText {
316        height: 100%;
317        width: 100%;
318        resize: none;
319        padding: 10px;
320        padding-right: 5px;
321        background-color: #fcfcfc;
322        border-radius: 10px;
323        text-align: justify;
324        box-sizing: border-box;
325        border: 0.5px solid rgb(177, 205, 241);
326        font-weight: 400;
327        line-height: 20px;
328        box-shadow: -5px 5px 10px rgb(246, 246, 246);
329    }
330
331    .chatInputBox {
332        padding-right: 10px;
333        position: absolute;
334        width: 100%;
335        bottom: 5px;
336    }
337
338    .sendImg {
339        position: absolute;
340        bottom: 10px;
341        right: 30px;
342        cursor: pointer;
343        width: 20px;
344        height: 20px;
345    }
346
347    img {
348        cursor: pointer;
349    }
350
351    .rightTabBar {
352        text-align: center;
353        position: absolute;
354        width: 50px;
355        top: 0;
356        right: 0;
357        height: 100%;
358        padding-top: 50px;
359        font-size: 12px;
360        background-color: rgb(246, 246, 246);
361        color: #000;
362        box-sizing:border-box;
363    }
364
365    .chatBar{
366        padding-top: 10px;
367    }
368
369    .chatBarTitle {
370        font-size: 12px;
371        height: 30px;
372        line-height: 20px;
373    }
374
375    .rightTabBar img {
376        width: 20px;
377    }
378
379    .logo {
380        position: absolute;
381        top: 150px;
382        left: 120px;
383        width: 100px;
384        height: 100px;
385
386    }
387
388    .logo img {
389        width: 100%;
390    }
391
392    .report {
393        padding-top: 10px;
394    }
395
396    .headerDiv {
397        width: 30px;
398        height: 30px;
399        border-radius: 50%;
400        border: 1px solid galy;
401        margin-top: 10px;
402    }
403
404    .userHeader {
405        float: right;
406        background-image: url('img/header.png');
407        background-size:40px;
408        background-position:-5px -5px;
409    }
410
411    .clear {
412        clear: both;
413    }
414
415    .aiHeader {
416        float: left;
417        margin-right: 10px;
418    }
419
420    .headerImg {
421        width: 30px;
422        height: 30px;
423    }
424
425    ::-webkit-scrollbar {
426        width: 5px;
427    }
428
429    ::-webkit-scrollbar-track {
430        background: rgba(0,0,0,0.3);
431        border-radius: 3px;
432    }
433
434    ::-webkit-scrollbar-thumb {
435        background: #635d5d;
436        border-radius: 3px;
437    }
438
439    ::-webkit-scrollbar-thumb:hover {
440        background: #4b4848;
441        border-radius: 3px;
442    }
443
444    ::-webkit-scrollbar-thumb:active {
445        background: #4b4848;
446        border-radius: 3px;
447    }
448
449    .history::title {
450        background-color: #dcdfe6;
451    }
452
453    textarea:focus {
454        outline: none;
455    }
456
457    textarea::placeholder {
458        color: #000;
459    }
460
461    .active {
462        color: #35a1db;
463    }
464
465    .analysisList {
466        overflow: hidden;
467        overflow-y: auto;
468        height: 84%;
469        padding-right: 10px;
470        padding-left: 10px;
471        box-shadow: 1px 2px 5px #bfbfbf;
472        border-radius: 8px;
473        position: relative;
474    }
475
476    .analysis-header {
477        position: sticky;
478        top: 0;
479        background-color: white;
480        z-index: 2;
481    }
482
483    .analysisItem {
484        width: 100%;
485        letter-spacing: 1.5px;
486        border-radius: 3px;
487        line-height: 20px;
488        position: relative;
489    }
490
491    .title {
492        font-size: 14px;
493        font-weight: 700;
494        background-color: #8bbcdff7;
495        padding: 10px 5px;
496        color: #fff;
497    }
498
499    .top-up-image {
500        width: 17px;
501        height: 17px;
502        background-image: url('img/top_up.png');
503        background-size: contain;
504        background-repeat: no-repeat;
505        border: 0;
506    }
507
508    .item-name {
509        font-size: 14px;
510        font-weight: 700;
511        display: flex;
512        align-items: center;
513        justify-content: space-between;
514        padding-right: 10px;
515    }
516
517    .item-name img {
518        width: 17px
519    }
520
521    .item {
522        margin-top: 3px;
523        background-color: rgba(212, 227, 227, 0.5);
524        padding: 10px 5px;
525        font-size: 12px;
526        word-break: break-all;
527        font-size: 12px;
528    }
529
530    .two {
531        background-color: rgba(209, 179, 179, 0.5);
532    }
533
534    .button {
535        padding: 3px 35px;
536        height: 26px;
537        background-color: #35a1db;
538        border-radius: 10px;
539        text-align: center;
540        line-height: 26px;
541        color: #fff;
542        font-size: 14px;
543        display: inline-block;
544        cursor: pointer;
545    }
546
547    .loginTip {
548        display: none;
549        font-size: 14px;
550        height: 45px;
551        line-height: 45px;
552        background-color: #dff4fd;
553        padding: 0 10px;
554        border: 1px solid #35a1db;
555        border-radius: 10px;
556    }
557
558    .importTraceTips{
559        width:203px;
560        visibility: hidden;
561        position: absolute;
562        top: 28%;
563        padding: 5px 15px;
564        background-color: rgb(236, 239, 247);
565        border-radius: 2px;
566        color: #000;
567        display: flex;
568        align-items: center;
569        font-size: 14px;
570        height: 50px;
571        line-height: 50px;
572        left: 50%;
573        transform: translateX(-50%);
574    }
575
576    .loadingItem {
577        height: 100px;
578        position: relative;
579        width: 100%;
580        margin-top: 20px;
581    }
582
583    @keyframes opcityliner {
584        from {
585            opacity: 0;
586        }
587
588        to {
589            opacity: 1;
590        }
591    }
592
593    .selectionBox div {
594        font-size: 15px;
595        display: flex;
596        align-items: center;
597        margin-bottom: 10px;
598    }
599
600    .timeTip {
601        width: 10px;
602        height: 10px;
603        border-radius: 5px;
604        background-color: #61da61;
605        margin: 0 10px 0 0 !important;
606    }
607
608    .timeText {
609        color:blue;
610        cursor: pointer;
611    }
612
613    .timeText[active]{
614        color:purple;
615    }
616
617    .timeText:not([active]) {
618        color:blue;
619    }
620
621    p {
622      margin:0;
623    }
624
625    .likeDiv {
626        width:100%;
627        height:25px;
628        margin-top:10px;
629    }
630
631     .getSgtBtn {
632        display: inline-block;
633        border: 1px #999 solid;
634        padding: 2px 20px;
635        border-radius: 15px;
636        font-size: 12px;
637        color:#999;
638        cursor:pointer;
639    }
640
641    .getSgtBtn:hover {
642        color:#000;
643        border-color:@000;
644    }
645</style>
646`;