Programming/vue.js2024. 4. 18. 16:20

classic editor는 이미지 크기를 조절할 수 없어서 설정 가능한 에디터를 찾아봤더니 document editor라는 녀석이 필요하다고 한다.

그런데 얘는 희한하게(?) 툴바가 안나오는데, 별도의 위치에서 붙여줘야 하는 녀석인 듯.

<template>
    <div class="document-editor__toolbar"></div>
    <div class="document-editor__editable-container">
        <ckeditor :editor="editor" :config="editorConfig"  @ready="onReady"></ckeditor>
    </div>
</template>

// ...

methods: {
      onReady(editor) {
          const toolbarContainer = document.querySelector(  '.document-editor__toolbar' );
          toolbarContainer.appendChild( editor.ui.view.toolbar.element );
      }
}

[링크 : https://github.com/ckeditor/ckeditor5-vue/issues/120]

 

읽기 전용 모드로 바꾸려고 하니

readonly와 disabled가 있는데 

<template>
    <vx-card :title="editorName" v-if="loaded">
        <ckeditor :editor="editor" v-model="editorData" :config="editorConfig" :readonly="editorDisabled" :disabled="editorDisabled" ></ckeditor>
    </vx-card>
</template>

[링크 : https://stackoverflow.com/questions/63344958/inline-editor-disable-editor-and-display-html-render-content-vue]

 

readonly는 readonly property라 상태보는 용도로만 사용해야 하고

[링크 : https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly]

 

setReadOnly() 함수를 이용해 상태를 변경해야 한다.

[링크 : https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setReadOnly]

 

상태에 따라 toolbar의 표시를 on/off 해주는 방법도 좋을 듯.

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        // The editor's configuration.
        // ...
    } )
    .then( editor => {
        const toolbarElement = editor.ui.view.toolbar.element;

        editor.on( 'change:isReadOnly', ( evt, propertyName, isReadOnly ) => {
            if ( isReadOnly ) {
                toolbarElement.style.display = 'none';
            } else {
                toolbarElement.style.display = 'flex';
            }
        } );
    } )
    .catch( error => {
        console.log( error );
    } );

[링크 : https://ckeditor.com/docs/ckeditor5/latest/features/read-only.html]

'Programming > vue.js' 카테고리의 다른 글

vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue 입력창 포커스 설정  (0) 2024.03.28
vue proxy  (0) 2024.03.26
vue.js i18n  (0) 2024.02.19
Posted by 구차니
하드웨어/RAID2024. 4. 18. 10:03

3d 프린터로 가이드 뽑고

[링크 : https://www.thingiverse.com/thing:6319939]

 

대충 밀어우겨넣으니 인식은 되는데 (Drive Type : Solid State Drive)

 

Create CacheCade - SSD caching 은 활성화 되지 않는다.

어떻게 해야지 이게 활성화 될까?

 

 

---

정리하자면 SSD cachecade는 sw키나 hw키가 있어야 하는 기능이다.

2024.04.18 기준 약 46만.. -_-

안해!

 

 

[링크 : https://www.boston-it.fr/gb/accessoires/2114-supermicro-lsi00293-megaraid-cachecade-pro-20-aoc-chcd-pro2-esw.html]

 

Currently SW and HW license keys can be used to enable CacheCade. But in the near future HW keys will be the only option enable CacheCade. Information about the usage of SW keys can be found in

[링크 : https://www.thomas-krenn.com/en/wiki/MegaRAID_CacheCade_SSD_Cache_overview]

 

3. CacheCade 가상 디스크 특성
다음은 CacheCade 가상 디스크 특성입니다.

CacheCade 가상 디스크는 1GB의 NV(Non-Volatile) 캐시가 포함된 컨트롤러에서만 지원됩니다.
CacheCade 가상 디스크는 SSD로만 생성할 수 있습니다.
CacheCade 가상 디스크의 최대 결합 크기는 512GB입니다.
SLN156366_en_US__1icon 참고: 여러 개의 CacheCade 가상 디스크가 생성될 수 있지만, 최대 크기까지 단일 캐시 풀로 작동하도록 결합됩니다.
보안 SED(Self-Encrypting Disk) 또는 SSD가 포함된 가상 디스크의 데이터는 CacheCade에 의해 캐싱되지 않습니다.
CacheCade 가상 디스크는 64KB보다 작은 입력 읽기만 캐싱합니다.
CacheCade 가상 디스크는 읽기 캐시 전용입니다.
CacheCade 가상 디스크는 CacheCade를 지원하지 않는 컨트롤러에는 마이그레이션이 불가능합니다.
CacheCade 드라이브를 가져오면 RAID 0 VD가 발생할 수 있습니다. 가져온 후에는 CacheCade VD를 재구성해야 합니다.
CacheCade 가상 디스크는 운영 체제에 표시되지 않습니다. 
SLN156366_en_US__1icon 참고: 비보안 SED가 있는 VD의 데이터는 CacheCade를 사용하여 캐싱할 수 있습니다.

[링크 : https://www.dell.com/support/kbdoc/ko-kr/000126223/dell-perc-h710-h710p-및-h810-raid-컨트롤러에서-cachecade-가상-디스크-구성-및-관리]

 

Dec 2016
in order to activate CacheCade, you need a hardware or software license, and an LSI approved SSD.
CacheCade Pro 2.0 requires a hardware key only.

[링크 : https://community.spiceworks.com/t/lsi-lsi00330-9271-8i-megaraid-cachecade-option-grayed-out/548888]

 

Question
I have bought CacheCade Pro 2.0 license (AOC-CHCD-PRO2-ESW) and optain the activation key from LSI Advanced Software License Management Portal. When I install the activation key to AOC-SA2LP-H8iR card with 2.130.363-1846 firmware, I can successfully make CacheCade Volume of SSD and assign it to some RAID Volume of HDDs. But the cache policy is locked to Write Through. By document, CacheCade Pro 2.0 support Write Back cache policy as it enhancement from prior version. What can I do to solve this problem?

Answer
Please recommend customer reentering the LSI activation key. The case here is caused of customer was doing activating the license on old firmware previously and then upgrading the firmware without reentering the activation key because they saw there was "CacheCade" on the MegaRAID Advanced Software screen. It seem that the old firmware threat the CacheCade Pro 2.0 license to CacheCade 1.0 and the new firmware still do the same without reentering the same activation key as the attachment.

[링크 : https://www.supermicro.com/support/faqs/faq.cfm?faq=16674]

 

Question
We have your RAID card below:
Supermicro Raid Card: AOC-SAS2LP-H8IR (SMC2108)
Also LSI hardware key:
LSI Cachecade Physical Key: LSI00292
Will the LSI physical cachecade key work on the Supermicro AOC-SAS2LP-H8IR?

Answer
No, it would not. We only support software license, part no is AOC-CHCD-PRO2-ESW.(Note: The license key sold before, AOC-SAS2-CHCD-ESW, was no longer available.)

[링크 : https://www.supermicro.com/support/faqs/faq.cfm?faq=16056]

'하드웨어 > RAID' 카테고리의 다른 글

MSM 디스크 제거시엔 stop!  (0) 2024.04.19
raid drive roaming  (0) 2024.04.18
MSM device id?  (0) 2024.04.17
금단의 키워드(!) San Foreign Configuration  (0) 2024.04.17
MSM으로 4disk raid 5 -> 5disk raid 5로 마이그레이션  (0) 2024.04.15
Posted by 구차니

출근길에 청량리 신호기 고장으로

상하행선 전부 마비되면서

버스타고 7호선 갈아타고 출근함

7호선으로 한강 건너는게 참 오랫만이긴 한데..

덕분에 자면서 가질 못해서 하루종일 골골골

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

산행  (0) 2024.04.26
휴가인데 휴가가 아니네  (0) 2024.04.24
ㄹ미ㅏㄴ어리ㅏㅁㄴ어리ㅏㄴㅁ어리ㅏ  (0) 2024.03.06
소득공제 공부 ㅠ  (0) 2024.02.29
소득공제?  (0) 2024.02.13
Posted by 구차니
하드웨어/RAID2024. 4. 17. 18:06

MSM에서 디스크를 보다보면

Device ID와 Slot Number가 일치하지 않는데

 

메뉴얼을 찾아봐도 무슨 말인지 모르겠다

물리 디스크의 장치 ID라.. 그런데 어떻게 0~7 사이로만 뜨지?

그리고 offline 했다가 online 하니 Media Error Count가 0으로 리셋되던데 원래 의도된 작동인 듯

Device ID Device ID of a physical drive
Connector*2 Group of physical ports to which a physical drive is connected
Slot Number Slot number on which a physical drive is mounted
*2: This item is not displayed for LSI Software RAID.


[링크 :
https://download.hitachivantara.com/download/epcra/com0851.pdf]

 

Device ID 가 아래의 순서대로 써있는데 도대체 멀까?

backplane에 장착되는 순서 인 것 같기도 하고..?

device ID Slot Number
0 3 2 1
7 6 4 5
0 1 2 3
4 5 6 7

 

'하드웨어 > RAID' 카테고리의 다른 글

raid drive roaming  (0) 2024.04.18
SSD cahcecade 포기  (0) 2024.04.18
금단의 키워드(!) San Foreign Configuration  (0) 2024.04.17
MSM으로 4disk raid 5 -> 5disk raid 5로 마이그레이션  (0) 2024.04.15
RAID consistency check fail  (0) 2024.04.09
Posted by 구차니
하드웨어/RAID2024. 4. 17. 17:14

일단은(!) Clear Configuration 을 누르면 /dev/sda로 인식되던 raid5가 날아간다.

 

컨트롤러 레벨에서 클릭해야 뜨는 메뉴인데

Raid가 구성되지 않은 상태에서 외부 설정을 찾아보면...

 

어...? 망했는데?

 

+

2트!

Step 1. 일단은 Alarm 꺼두고(!)

Step 2. 하드를 그냥 과감하게 뽑기!

Step 3. Clear Configuration

Step 4. 하드 꼽기!

Step 5. 어..? (Foreign)이 뜬다.

 

Step 6. Scan Foreign Configuration

 

Step 7. Accept!

 

Step 8. Accept!

 

Step 9. OK

 

아마도 Clear Configuration에서 HDD로 RAID 설정을 삭제하고 raid 컨트롤러의 설정을 지우는 과정이 들어있는 듯

'하드웨어 > RAID' 카테고리의 다른 글

SSD cahcecade 포기  (0) 2024.04.18
MSM device id?  (0) 2024.04.17
MSM으로 4disk raid 5 -> 5disk raid 5로 마이그레이션  (0) 2024.04.15
RAID consistency check fail  (0) 2024.04.09
smc2108  (0) 2024.04.03
Posted by 구차니
프로그램 사용/proxmox2024. 4. 17. 11:45

어? vm 스토리지 어디 도망갔어?

 

어 1TB 짜리 sdb 어딨어?!

 

헐.. SATA link down -_-

SSD가 망가졌나?

 

 

 

---

콘솔에서 shutdown 하고 다시 켜니 정상적으로 올라오긴 했는데, SMART도 정상인데 도대체 머였을까?

'프로그램 사용 > proxmox' 카테고리의 다른 글

proxmox letsencrypt 인증서 만들기  (0) 2024.04.16
proxmox let's encrypt 인증서 자동 등록  (0) 2024.03.29
proxmox nested virtualization  (0) 2024.03.26
proxmox node 추가  (0) 2024.03.25
proxmox 메모리 업그레이드  (0) 2024.03.25
Posted by 구차니
Linux2024. 4. 16. 16:53

raid가 있어서 그런가 뜬금없는(?) 장치가 있는데

/dev/sg0

/dev/sg1

 

fdisk로 열어보려고 하면 illegal seek 이라는게 뜨는데 도대체 머하는데 써먹는 장치일까 싶어

검색해보니 sg는 Scsi Generic에서 온 듯.

[링크 : https://docs.kernel.org/scsi/scsi-generic.html]

 

sas도 sg로 잡히나?

'Linux' 카테고리의 다른 글

lsusb -v 로 본 장치(HID MT, mouse)  (0) 2024.03.08
systemd 지연된 시작  (0) 2024.02.29
btrfs fsck  (0) 2024.02.13
리눅스 파일 시스템 캐싱  (0) 2024.01.09
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
Posted by 구차니
프로그램 사용/pfsense2024. 4. 16. 14:24

아래와 같이 Last renewed가 날짜가 안 찍히면 정상적으로 발급된게 아니다.

아래처럼 날짜가 먼가 그럴싸하게 찍혀야 된다.

 

System / Certificate에 가면 Authroties에 추가된다.

그나저나 웹 인증서로 이걸 쓰게 하려면 어떻게 해야하지?

 

관리자 웹은 여전히 pfSense GUI default Self-Signed Certificate로 나온다. 

 

System / Advanced / Admin / webConfigurator에 SSL/TLS Certificates에서 바꾸어 주면된다.

 

[링크 : https://scbyun.com/entry/VPN-pfSense를-사용하여-Let’s-Encrypt-SSL-인증서-설치]

 

일단은.. 내부에서 https (443) 을 포트포워딩으로 8006으로 돌리고 있었는데

80->80

443->443 으로 돌려줘야 acme를 통해 받아올수 있다.

아니면.. 시스템 웹 포트를 443이 아닌 다른걸로 설정하면 되려나?

 

외부 인증서 넣기

System-Certificate

[링크 : https://jeunna.tistory.com/135]

Posted by 구차니
프로그램 사용/proxmox2024. 4. 16. 12:31

일단은 DNS는 복잡하니 패스하고 HTTP 부터 만들기 테스트

[링크 : https://twoicefish-secu.tistory.com/547]

 

Step 1.

Datacenter에서 ACME

 

Add Account

ACME Directory 에서 Staging은 테스트용

 

Step 2. 

Node 에서 System - Certificates 선택

 

ACME 에서 Add

Domain은 HTTP 챌린지 하면 서브 도메인 포함해서 만들어야 한다.

 

Using Account 에서 staging 으로 연결한 계정을 선택하고 Apply

Order Certificates Now 누르면 약간의 시간이 걸려서 발급된다.

그런데 테스트 서버꺼라 몇번을 해도 문제 없긴한데 본서버(?)는 한번 신청하면 한동안 응답이 없는것으로 알고 있으니

방화벽 이나 port forwarding (80번)은 확실히 확인하는 것이 좋다.

 

인증서가 발급되면 재기동 된다.

 

아래처럼 (STAGING) 이라고 박혀있다 ㅋㅋ

 

+

계정만 staging이 아니라 일반것으로 교체하고 

Order Certificates Now 누르니 바로 된다.

 

 

이걸 어떻게 export 해서 다른데서 쓸 수 있게 하지?

'프로그램 사용 > proxmox' 카테고리의 다른 글

proxmox vm이 맛이 갔다!?  (0) 2024.04.17
proxmox let's encrypt 인증서 자동 등록  (0) 2024.03.29
proxmox nested virtualization  (0) 2024.03.26
proxmox node 추가  (0) 2024.03.25
proxmox 메모리 업그레이드  (0) 2024.03.25
Posted by 구차니

 qr 디코더 소스는 아래의 npm 으로 공개된 녀석을 이용

[링크 : https://github.com/yugasun/qrcode-decoder]

 

 

귀찮으니 최대한 대충 짜기

그나저나 요즘 크롬은 https 로 강제로 돌려서 http로 해두면 되질 않고

그렇다고 사설 인증서 쓰면 또 경고 띄우고 겁나 짱나네?!

$ cat lotto.html 
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Lotto from QR</title>
</head>
<body>
  <span id="result1">decode</span><br />
  <span id="result2">set</span><br />
  <span id="result3">random</span><br />
  <input type="button" onclick="rand();" value="추첨"/><br />
  <input type="file" onchange="previewFile();" /><br />
  <img id="lotto" src="" alt="이미지 미리보기..." />
</body>
<script src="./lib/index.min.js"></script>
<script>
function rand() {
    e = new Set()
    var val = 0;
    for(i = 0; i < 6; i++)
    {
        do {
            val = parseInt(Math.random() * 45 + 1)
        } while(d.has(val) ||  e.has(val))
        e.add(val)
    }

    var result3 = document.querySelector("#result3");
    result3.innerHTML = Array.from(e).sort((a, b) => a - b)
}
  
  async function qr_decode() {
    var qr = new QrcodeDecoder();
    var img1 = document.querySelector("#lotto");
    const code = await qr.decodeFromImage(img1);
    console.log(code);

    var result = document.querySelector("#result1");
    result.innerHTML = code.data;

    a = code.data.split('v=')
    b = a[1].split('q')
    c = b[1]+b[2]+b[3]+b[4] +b[5].slice(0,12) 
    d = new Set()
    for(i = 0; i < c.length ; i+=2)
        d.add(parseInt(c.slice(i, i+2)))
 
     var result2 = document.querySelector("#result2");
    result2.innerHTML = Array.from(d).sort((a, b) => a - b)

    rand();
  }

  function previewFile() {
    var file = document.querySelector("input[type=file]").files[0];
    var reader = new FileReader();
    reader.onload =
      function () {
        var preview = document.querySelector("#lotto");
        preview.src = reader.result;
        preview.onload = function () {
          qr_decode();
        }
      }

    if (file) {
      reader.readAsDataURL(file);
    }
  }
</script>

</html>

'Programming > javascript & HTML' 카테고리의 다른 글

qr decoder  (0) 2024.04.19
javascript 집합(set) 내용 출력하기  (0) 2024.04.16
js split()  (0) 2024.04.12
자바스크립트 옵셔널 체이닝(optional chaining)  (0) 2024.04.08
qr decoder part 2  (0) 2024.04.07
Posted by 구차니